mzxrules

Zeux Stuff

Aug 24th, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. . "This is a comment, useful for comments like this!"
  2. . "This command inc. the number of commands a robot can process per cycle"
  3. set "commands" to 4000
  4.  
  5. . "this is a basic expression."
  6. . "This allows you to set values beyond the standard signed 16 bit limit"
  7. set "commands" to "(60000)"
  8.  
  9. . "this is an expression with a custom variable"
  10. . "variables are called 'Counters' in MegaZeux"
  11. set "myVal" to 5
  12.  
  13. . "this is a custom string. Strings begin with $"
  14. set "$myStr" to "NarcissaWright"
  15.  
  16. . "this command prints something to the message line"
  17. . "you can embed variables into the message line in different ways"
  18. * "~f&myVal& ('myVal'-9) &$myStr&"
  19.  
  20. . "Expressions can be used in many places where numbers are accepted"
  21. . "note that this writes a bomb to 5,5 on the overlay"
  22. write overlay c0f " " at "myVal" "('myVal')"
  23.  
  24. . "this is a built-in counter. Be carful not naming a counter after one"
  25. . "to find more info for built-ins, check the following:"
  26. . "Counters, Built-in Counters, and Local Counters"
  27. : "q"
  28. wait for 1
  29. write overlay c0f "รป" at "playerx" "playery"
  30. goto "q"
  31.  
  32. : "keyq"
  33. . "this is the loop command. this command zeroes the loopcounter built-in"
  34. loop start
  35. write overlay c0f "Hi" at "playerx" "Loopcount"
  36. loop for 4
  37. end
  38.  
  39. : "keyw"
  40. . "outside of (), expressions are always parsed left to right"
  41. . "note that myVar becomes -1, instead of 1"
  42. set "myVar" to "(4-6/2)"
  43. * "~f&myVar&"
Add Comment
Please, Sign In to add comment