Introduction
Updates
Course Notes
Course Test
Examples
 

Getting Started | Aliases | /msg and /echo | Identifiers
If-Then-Else | Variables | Pop-Ups | Remotes

     You might be thinking 'big deal, how does this help me.'  Well, what you've seen so far is extremely limited, useful only to save on typing in very specific situations, because you can only use one line.  This is where brackets come in.  Brackets allow the script to span multiple lines.  Let's try it out, put the following in your aliases:

/anybody {
/msg $chan Is anybody here?
/msg $chan hello?
}

    Type /anybody in the channel.

<nick> Is anybody here?
<nick> hello?

     As you can see, the { caused the alias to activate all the commands in the brackets, instead of just the line after the /anybody.  Also in the script is that /msg $chan that we saw earlier.  Those two commands are very useful, and can be used a lot.  Try some multi-line scripts on your own, be sure to close the brackets } or you might get some unexpected results.  Also try mixing in some /me commands and see what happens.  /action can also be used in replacement of /me.
     Now let's try using a timer.  The timer is a / command, and will cause for the command to execute after a delay for a number of times.  syntax is: /timer[name] [# of times] [delay].  You do not need to give the timer a name.  /timer1 1 1 will cause the next command to be executed once after a one second delay.

/delayed {
/msg $chan How's it going everybody?
/timer1 1 1 /msg $chan That's good to know
}

     /delayed will now cause you to say <nick> How's it going everybody?.  And then <nick> That's good to know exactly one second later.
     Another very useful command is /echo.  This will cause for text to be displayed that only you can see.  (Showed as orange in this course).  Type /echo nobody can see this in your current channel.  You will see a new line with no <nick> tag that reads nobody can see this.  Let's try it in an alias:

/quiet {
/echo $chan Text only I can see
/echo $chan so very useful in scripting
}

     Will display in the active window:

Text only I can see
so very useful in scripting

     Echos can be used to convey to you information that you don't want everybody on the channel to see.

Identifiers