you just need to remember to put in all the parts of the event

on text Where
channel? query? dcc?
Code:
 on *:TEXT:!help: [color:red]{/q[/color]uery $nick This will help you learn the IRC commands.
/query $nick You can register your nick by typing /nickserv REGISTER <password> <email> Password being your desired password. and Email being your valid email.
} 
you have to have spaces between the brackets and the code
you dont need / in a script, only on a command line in the edit box for chats status channel etc.
you dont really need to use query here,  msg will work fine

 on *:TEXT:!help *:*: {
if ($$2 == register) {
msg $nick This will help you learn the IRC commands.
msg $nick You can register your nick by typing /nickserv REGISTER <password> <email> Password being your desired password. and Email being your valid email.
} 
}