set flagname; sets a flag to true-This sets a flag in the player's flag list with the value of what you put for "flagname".
if (playertouchsme){ 
  set iwastouched; 
}
This would put "iwastouched" in the player's flag list.
unset flagname; sets a flag to false - Removes the flag from the player's flag list (assuming it's in his list).
if (playertouchsme){ 
  unset iwastouched; 
}
This would remove "iwastouched" from the player's flag list.
break; ends a loop and continues with the script that follows to the loop - causes a loop to end, and doesn't execute what follows the break command.
while (myvar<5) { 
    myvar++; 
    if (myvar=5) { 
      break
    } 
    var2++; 
}
While myvar is less than 5, it will add 1 to myvar, and if myvar equals 5 after that 1 is added to it, then the loop will break and the rest of the script executes, otherwise var2 gets 1 added to it.
continue; jumps to the beginning of the loop (next loop round) - restarts the loop from the beginning
while (myvar<5) { 
  myvar++; 
  if (myvar<4) { 
    continue
  } 
  var2++; 
}
While myvar is less than 5, it will add 1 to myvar, and if it is less than 4, the loop will go back to the beginning and add 1 to myvar again, once it is no longer less than 4, then it will also add 1 to var2; until myvar is equal to 5 of course.
function functionname(){operations} Defines a function. - Creates a function with the specified name and operations.
function AddVars() { 
  total=var1+var+var3; 
}
This defines the function 'AddVars'.  When 'AddVars' is called, it will add the values of var1, var2, and var3 and store that value in the variable 'total'.
functionname (); Calls an already defined function.
if (gotvalues){ 
  AddVars()
}
When the flag 'gotvalues' is set, the function 'AddVars' will be called.
return; ends the function immediatelly and returns to the function caller - Stops executing from the function and goes back to the rest of the script.
function Rup(){ 
  if (playerrupees<100) return
  message A lot of rupees!; 
  sleep 3; 

if (playertouchsme){ 
  Rup(); 
  message Bye!; 
}
If the NPC is touched, 'Rup' will be called.  In the function 'Rup', when it is called, if the player has more than 100 rupees, the NPC will say 'A lot of rupees!' then sleep for 3 seconds, then continue with the rest of the script.  If they have less than 100 however, then the NPC will not say 'A lot of rupees!' and will just go back to the line after the function was called (therefore saying 'Bye!').
sleep seconds; pauses the script execution for the specified time - This causes the NPC to sleep for the amount of time indicated.  No other actions will be executed will the NPC is sleeping.
if (playertouchsme){ 
  sleep 1; 
  putexplosion 1,x,y; 
}
This would put the NPC to sleep for 1 second, then put an explosion at it's x,y.
setarray var,size; initializes var as an array of  the specified size - This would set the array with the name you specify for "var" and with a size you specified for "size".  For information on this read section 2H.
if (created){ 
  setarray myarray,5; 
}
This would set the array "myarray" with a size of 5 when the NPC is created.
setstring varname,value; creates a string variable ‘varname’ with the given value - This sets a string with the name you put for "varname" with the value specified for "value". This information is stored in the player's flag list, and the value can be either text or numerical.
if (playerchats){ 
  setstring playersaid,#c; 
}
This would set the string "playersaid" with the value of whatever the player said to cause the string to be set.  For information on messages strings (such as #c) read sections 2F, and 13.
addstring list,text; adds a string to a string list (saved as a flag) - With this you can turn any string into a string-array.
if (playertouchsme){ 
  setstring playeraction,touched; 

if (washit){ 
  addstring playeraction,hit

if (waspelt){ 
  addstring playeraction,pelt
}
Once touched, the string (or "list") "playeraction" will be set, and given the value 'touched' (index of 0).  If the NPC is is then hit the list (or string) 'playeraction' will have the text value 'hit' added to it (index of 1).  If instead of being hit, the NPC was pelt, then pelt would be added at index 1.  If it was hit, then pelted, then hit again the resulting string/list would read: 
playeraction = touched,hit,pelt,hit
insertstring list,index,text; inserts a string into a string list at the specified index - This will add a string of text to an already existing list at the index
if (created) setstring new,1; 
if (washit){ 
  insertstring new,0,5
}
When hit, this NPC will put the value of "5" at the beginning (index 0) of the string 'new', all previous values in the string will have their indexes increased by 1.  So after hitting the NPC twice, the string will read: 
new = 5,5,1
replacestring list,index,text; replaces string at position 'index' with 'text' - This will change the value of the string at the specified index to whatever is put in for "text".
if (waspelt) { 
  replacestring new,0,ow!
}
Using the string from the previous example, if the NPC were then pelt after being hit a couple times, then string would read: 
new = ow!,5,1 
Note that pelting it again won't change anything, since the specified index and text are the same..
removestring list,text; removes all occurences of a string - This will search the specified string for any time "text" appears, and then remove it.
if (created) { 
  setstring person,m; 
  addstring person,o; 
  addstring person,n; 
  addstring person,o; 
  addstring person,t; 
  addstring person,o; 
  addstring person,u; 
  addstring person,s; 

if (washit) { 
  removestring person,o
}
Upon creation of the NPC the string "person" will read: person = m,o,n,o,t,o,u,s 
But after hitting the NPC, the string will read: person = m,n,t,u,s 
Notice how the indexs will change as a result...
deletestring list,index deletes string list entry at index - Removes the value of the list at the specified index.
if (created) { 
  setstring happy,happy; 
  addstring happy,joy; 
  addstring happy,joy; 

if (washit) { 
  deletestring happy,1
}
In this case, when the NPC is created the list "happy" will read: happy = happy,joy,joy 
After hitting the NPC once the string will read: happy = happy,joy 
Hitting it a second time will cause "happy" to be: happy=happy 
Hitting it a third time won't do anything since there is no longer a value at index "1"
timereverywhere; allows timeouts on this machine even if the player didn’t entered the level first - This stops some glitches when timeouts are used in online mode.  It makes it so the NPC goes by the same timeout for each person on the level, not just the first person that entered.
if (created){ 
  timereverywhere; 
}
Makes the timeouts done by the NPC the same for all people on a level.