Solved!
To turn off sleeping, you can use the following command:
#scr nembot_vars['script']['sleep'] = '-1' (apostrophes optional around -1)
however, it will only work until you end the current script. I solved this by aliasing /begin to the following:
#scr nembot_begin();#scr nembot_vars['script']['sleep'] = -1
and '/beginsleep' just does #scr nembot_begin(); in case you actually need to sleep on ticks.
If you want to change it in-game, set the value to 2. Easiest thing is to create another alias that aliases the above command to e.g. 'sleepset', but minus the value, so "sleepset -1' would turn off sleeping, 'sleepset 2' would turn it on. Or leave the = off if you want, but it's nice to not have to type that long string every time you start a script.
I'm still working on the kinks, but this works well.
Another way to sleep on ticks outside of nembot is set an action to sleep on "#10 seconds to tick" and wake on "#tick". Another action to turn it off.
Thanks to the post 'Nembot actions in Nembot commands', would never have figured this out without it.
(can use /debug to check what state your sleep is set to if in doubt.)
Happy insomniac scripting!
-Jilporanth
|