Originally Posted by maroon
This alias will run itself at intervals ranging from 5 to 10 seconds each time you run it. It will stop that if you do "/dostuff off"

Code
alias dostuff {
  if ($1 == off) { timerdostuff off | return }
  timerDoStuff 1 $rand(5,10) dostuff
  here is where to put the things to do each time the timer triggers
 }


It's a strange code in programming, basically the trick is in the alias costruction, acts like a kind of "while" command or infinite loop as goto .
The core of the code is the costruction:

alias dostuff {
timerDoStuff 1 $rand(5,10) dostuff
commands
}

what does it mean to specify the alias name after the timer command? Moreover the commands must be put on a new line, otherwise it gives an error

This is really cryptic.

Thx

Last edited by Anti; 22/08/20 01:14 PM.