mIRC Home    About    Download    Register    News    Help

Print Thread
#26496 27/05/03 10:31 PM
Joined: Apr 2003
Posts: 29
B
BoXeRn_ Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Apr 2003
Posts: 29
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: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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
#26498 27/05/03 10:51 PM
Joined: Apr 2003
Posts: 29
B
BoXeRn_ Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Apr 2003
Posts: 29
thnx!! smile

#26499 27/05/03 11:16 PM
Joined: Apr 2003
Posts: 29
B
BoXeRn_ Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Apr 2003
Posts: 29
Weird , nothing happens , no error or something , and i dont op anyone smirk

#26500 27/05/03 11:21 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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.

new username: tidy_trax
#26501 27/05/03 11:43 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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


-KingTomato
#26502 28/05/03 02:44 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
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
Joined: Apr 2003
Posts: 29
B
BoXeRn_ Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Apr 2003
Posts: 29
smile THANX! laugh


Link Copied to Clipboard