$2 will refer to the 2nd word specified in an on text event.
Basic syntax:
Code:
on *:text:!command &:#: {
msg # $2 was targeted!
}


Useful reads for starting mSL scripting:
/help on text
/help if then else
/help variables


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net