alias opx {
if ($chr(35) isin $active) {
/set -u0 %x 1
while (%i <= $nick($active, 0)) {
if ($nick !isop $active) && ($level($address($nick($active, %l), 5)) == x) {
/set -u0 %opnick %opnick $nick($active, %l)
}
if ($numtok(%opnicks, 32) == $modespl) || (%i == $nick($active, 0)) {
/mode $active $+(+,$str(o, $modespl)) %opnick
/unset %opnick
}
/inc -u0 %i
}
}
}

The reason yours didn't work was it was in an infinate loop. There was no condition to make it exit. You just had it keep going back to hehe. This should work much better


-KingTomato