mIRC -> Tutorials -> 04

Are you getting l33t yet? :)
Now you know how the On Text command work so I'm going to show you a little more using variables and stuff.

First the code I'll be using:

     
on *:text:!set *:#:{
  set %memory $nick --> $2-
  msg $chan ok I'm remembering: $2-
}

on *:text:!get:#:{
  msg $chan in memory remembering: %memory
}
     
    
This code should be very easy to understand. What it does is that it saves what a user tells it to %memory and then returns it using "!get". There are a billion ways to use and save variables, this was just a quick example.
If you want to look at all your variables or change them press Alt+R and go to the Variables tab to the right and you will see all the variables you and your script use.

Another thing people have asked me about is how the can use the On Text to private messages and not messages to a channel. It's very easy:
     
on *:text:hello:?:{
  msg $nick hi $nick !
}
     
    
You just replace the # with a ? and it's turned from channel to private. If you want to use the same On Text for both channels and private messages just use * instead.

Now go code something fun :)

<< Previous | Next >>