Author Topic: Random action script  (Read 3826 times)

hrmmm

  • Guest
Random action script
« on: July 12, 2006, 11:13:54 AM »
So I've been playing around with IceChat recently and teaching myself some of the coding.  I'm still quite now at it but adept at picking up on things.  I wrote my own code to voice people on a join.  So what I'm trying to do now, is write something which will produce random actions with a given text in channel.  ie: !insult  Upon seeing this, the script would execute and randomly select an insult from a list.  I don't have the know how to figure it out but some pointing in the right direction would be helpful.  Thanks. :)

I'm using IceChat 5.50.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Random action script
« Reply #1 on: July 12, 2006, 01:14:39 PM »
Well, you would use the ONTEXT script event for checking for "!insult" type messages, thats a start.
According to the help file, the $randphrase identifier lets you pick a random line from a file called randphrase.txt, which would be in the IceChat5 folder. You could easily use this to pick a random line from that file.
If you wish to use different files for different insults, etc, you will need to switch to IceChat7, as it lets you choose a filename with the $randphrase identifier, and placing those files in the Scripts folder. IE: $randphrase(insult.txt) or $randphrase(slap.txt) , etc etc.
The IceChat God