Author Topic: Random Number and Creating a Chance Event (help)  (Read 4496 times)

airikita

  • Newbie
  • *
  • Posts: 17
Random Number and Creating a Chance Event (help)
« 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"???

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Random Number and Creating a Chance Event (help)
« Reply #1 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.
The IceChat God

airikita

  • Newbie
  • *
  • Posts: 17
Re: Random Number and Creating a Chance Event (help)
« Reply #2 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?

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Random Number and Creating a Chance Event (help)
« Reply #3 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.
The IceChat God

Windows_95

  • Newbie
  • *
  • Posts: 31
  • Who's cool and has two thumbs? This guy!
Re: Random Number and Creating a Chance Event (help)
« Reply #4 on: September 12, 2008, 01:06:04 PM »
um... remove the second asterisk cuz that makes it trigger on any text
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. Galileo Galilei

airikita

  • Newbie
  • *
  • Posts: 17
Re: Random Number and Creating a Chance Event (help)
« Reply #5 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.