Random script terminator

A Snippet from: Dorian Ellis

//Generate a random number between 1 and 10
Random>10,RandomResult
Let>RandomResult=RandomResult+1

//Optional.. show what number was generated
Messagemodal>You threw a %RandomResult%

//If it isn't 7, exit the script
if>RandomResult<>7
  //Optional message for testing/playing purposes :)
  Messagemodal>You didn't throw a 7, exiting
  exit>0
endif

//If it *is* a 7, whatever comes next will still be executed...

Select the code above to paste into your macro. Or: View Raw Text

Link: http://www.mjtnet.com/snip.htm?g=58865b2fc5ce6

Forum Embed Code - click to select all then copy (CTRL-C):

When pasting into the forum do NOT modify the script code or it will not match what is in the database - create a new snippet instead!