another way to use while,
[SELECT ALL] Code:
//while_ by =SA=macm
//exmp: /while_ [= $x 1] [consoleline = $conline]
addcheck_msa while__
if (checkalias whl) [] [whl = []]
alias while_ [
if (= $numargs 2) [
(concatword "whl" (listlen $whl)) = (concat "(" $arg1 ")"); add2list whl (concatword "whl" (listlen $whl))
(concatword "whl" (listlen $whl)) = (concat "(" $arg2 ")"); add2list whl (concatword "whl" (listlen $whl))
] []
]
alias while__ [
whlp = 0;
loop whloop (listlen $whl) [
tmp_whl = (concat "if" (getalias (at $whl $whlp)) "[ (at $whl (+ $whlp 1))] []");
tmp_whl;
whlp = (+ $whlp 2)
];
sleep 0 [while__]
]
// just in case...
alias reset_while_ [loop a (listlen $whl) [delalias (concatword "whl" $a)]; whl = []]