mIRC Homepage
Posted By: BoXeRn_ Op All With Level X - 27/05/03 10:31 PM
alias opx {
if (# ischan) && (#) {
set %x 1
:hehe
.set %xen $nick(#,%x)
if ($level($address(%xen,1)) == x) .mode # +ooo %xen
inc %x
goto hehe | halt
else { halt
}
}
}

i dont know but mirc get screwed and i must restart mirc!
Anyone help me?
shocked
Posted By: KingTomato Re: Op All With Level X - 27/05/03 10:38 PM
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
Posted By: BoXeRn_ Re: Op All With Level X - 27/05/03 10:51 PM
thnx!! smile
Posted By: BoXeRn_ Re: Op All With Level X - 27/05/03 11:16 PM
Weird , nothing happens , no error or something , and i dont op anyone smirk
Posted By: pheonix Re: Op All With Level X - 27/05/03 11:21 PM
alias opx {
if ($chr(35) isin $active) {
.set %x 1
}
while (%x <= $nick($chan,0)) {
if ($nick($active,%x) !isop $active) && ($level($address($nick($active,%x),1)) == x) {
mode $active +o $nick($chan,%x)
}
inc %x
}
}
}


its quite slow frown but it worked for me smile
Posted By: KingTomato Re: Op All With Level X - 27/05/03 11:43 PM
my mistake, i initalized %x not %i at the beginning

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

See if that doesn't help
Posted By: Nimue Re: Op All With Level X - 28/05/03 02:44 AM
Code:
alias opx {
  if $me isop # {
    var %i = 1,%a,%b
    while $nick(#,%i) {
      %b = $ifmatch
      if %b !isop # &amp;&amp; $level($ial(%b)) == x { %a = %a %b }
      inc %i
      if $numtok(%a,32) == $modespl || !$nick(#,%i) { mode # + $+ $$str(o,$numtok(%a,32)) %a | var %a }
    }
  }
}
Posted By: BoXeRn_ Re: Op All With Level X - 28/05/03 02:02 PM
smile THANX! laugh
© mIRC Discussion Forums