IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: airikita on September 12, 2008, 11:21:38 AM

Title: Random Number and Creating a Chance Event (help)
Post by: airikita on September 12, 2008, 11:21:38 AM
ok, so I'm having trouble writing just something like.. var %x = rnd(#) it tells me var is invalid, then if I use set %x = rnd(#) it's fine, but when I put like say set %x = rnd(1) I have to put if (%x == rnd(1)) otherwise it does nothing, and then it's not even random.

I might be doing it wrong, can I get help on how to put rnd(#) so that it will activate on a specific number on if (var == #)?

Also, I need to know why is says "->> var :Unknown command"???
Title: Re: Random Number and Creating a Chance Event (help)
Post by: Snerf on September 12, 2008, 11:53:10 AM
Sorry, but the mirc scripting in IceChat is very limited.

It would be best to write scripts in the IceChat 5 style (VBS).
It is fully functional, and really has no limits as to what you can do.
Title: Re: Random Number and Creating a Chance Event (help)
Post by: airikita on September 12, 2008, 12:05:54 PM
Okay.. how about this: what about a way to make it so that on *:TEXT:*:#:{, or something like it, doesn't activate all the time?
Title: Re: Random Number and Creating a Chance Event (help)
Post by: Snerf on September 12, 2008, 12:26:22 PM
Well, I have no idea what you are actually trying to do, would help a great deal if you explained what you want/need.
Title: Re: Random Number and Creating a Chance Event (help)
Post by: Windows_95 on September 12, 2008, 01:06:04 PM
um... remove the second asterisk cuz that makes it trigger on any text
Title: Re: Random Number and Creating a Chance Event (help)
Post by: airikita on September 12, 2008, 01:08:26 PM
it's supposed to trigger on any text, it's a phrase randomizer.. oh, and I figured out how to make it not all the time, I just spaced all the quotes (in the txt file) twice inbetween each, creating a 3/12 roll without scripting, which makes it not send anything if it rolls onto an empty line.