mIRC Home    About    Download    Register    News    Help

Print Thread
#26496 27/05/03 10:31 PM
B
BoXeRn_
BoXeRn_
B
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

#26497 27/05/03 10:38 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
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

#26498 27/05/03 10:51 PM
B
BoXeRn_
BoXeRn_
B
thnx!! smile

#26499 27/05/03 11:16 PM
B
BoXeRn_
BoXeRn_
B
Weird , nothing happens , no error or something , and i dont op anyone smirk

#26500 27/05/03 11:21 PM
P
pheonix
pheonix
P
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

Last edited by pheonix; 27/05/03 11:24 PM.
#26501 27/05/03 11:43 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
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

#26502 28/05/03 02:44 AM
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
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 }
    }
  }
}

#26503 28/05/03 02:02 PM
B
BoXeRn_
BoXeRn_
B
smile THANX! laugh


Link Copied to Clipboard