forked from ModDamage/ModDamage
-
Notifications
You must be signed in to change notification settings - Fork 0
Routine: While Loop
Deide edited this page Jan 8, 2013
·
3 revisions
Loop through routines until statement is false.
- 'while [statement to test]':
- 'Do stuff here"It's basically the same as an if statement, except that it loops until the statement is false
- 'set.$x': 'rand(1, 300)'
- 'set.$y': '1'
- 'set.$z': 'rand(1, 300)'
- 'while world_block($x, $y, $z)_typeid !== 0':
- 'message.server': "[LOG] Loop no.%{$y}"
- 'set.$y': '$y + 1'
- 'set.world_block($x, $y, $z)_typeid': '54'