|
Joined: Jun 2006
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Jun 2006
Posts: 10 |
i have a power script and i want to know how no make it show my hop (%) power too how do i do that? here is my code so far: alias power {
set %power.chan.counter 0
set %power.powerover 0
set %power.opchans 0
set %power.totalnetworks $scon(0)
set %power.totalnetworks.count 0
set %power.total.channels 0
set %power.max.chans 0
:connectionloop
inc %power.totalnetworks.count
if ( %power.totalnetworks.count > %power.totalnetworks ) { goto end }
scon %power.totalnetworks.count
set %power.total.channels %power.total.channels + $chan(0)
set %power.max.chans $chan(0)
set %power.chan.counter 0
:loop
if ( %power.chan.counter > %power.max.chans ) { goto connectionloop }
set %power.chan.counter $calc( %power.chan.counter + 1 )
if ( $me isop $chan(%power.chan.counter) ) {
set %power.powerover %power.powerover + $nick($chan(%power.chan.counter),0)
inc %power.opchans
}
goto loop
:end
scon -r
if ( %power.total.channels = 1 ) var %power.chanword channel
if ( %power.total.channels > 1 ) var %power.chanword channels
if ( %power.totalnetworks = 1 ) var %power.netword network
if ( %power.totalnetworks > 1 ) var %power.netword different networks
msg $active 4 I am OP'd in 14 %power.opchans $+ / $+ %power.total.channels 15 $+ %power.chanword 4 on < 14 %power.totalnetworks 4 >15 %power.netword $+ . 4 I pwn < 14 %power.powerover 4 >15 n00bs
unset %power.*
}
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Do you mean that you want your half-ops to show as well as your ops? If so, then I'll re-do your code (might re-do it anyways as your coding methodology is not the greatest). If you want your half-ops to be included, like your ops currently are, then no problem..also do you want your voiced (+) to be included? Do you want everything in one display, or separate displays?
I'll re-code based on your response, and post back with a replacement as soon as I can.
|
|
|
|
Joined: Jun 2006
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Jun 2006
Posts: 10 |
Do you mean that you want your half-ops to show as well as your ops? yes If so, then I'll re-do your code (might re-do it anyways as your coding methodology is not the greatest). lol i didnt even make the code i suck at scripting also do you want your voiced (+) to be included? sure Do you want everything in one display, or separate displays? one please I'll re-code based on your response, and post back with a replacement as soon as I can. thanks
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
menu channel,nicklist,query {
Power : power
}
alias power {
var %a = 1, %b = $scon(0)
var %networks = network $+ $iif(%b > 1,s), %chan = channel
while %a <= %b {
.scon %a
var %c = 1, %d = $chan(0)
inc %chans %d
if %d > 1 {
%chan = $addtok(%chan,s,32)
}
%chan = $remove(%chan,$chr(32))
while %c <= %d {
inc %noobs $nick($chan(%c),0,r)
inc %Op $iif($me isop $chan(%c),1,0)
inc %hop $iif($me ishop $chan(%c),1,0)
inc %Voice $iif($me isvoice $chan(%c),1,0)
inc %c
}
inc %a
}
scon -r
msg $active 4 I am OP'd in 14 %op $+ / $+ %chans 15 $+ %chan 4 on < 14 $scon(0) 4 >15 %networks $+ .
msg $active 4 I am Half-OP'd in 14 %hop $+ / $+ %chans 15 $+ %chan 4 on < 14 $scon(0) 4 >15 %networks $+ .
msg $active 4 I am OP'd in 14 %op $+ / $+ %chans 15 $+ %chan 4 on < 14 $scon(0) 4 >15 %networks $+ .
msg $active 4 I pwn < 14 %noob 4 >15 n00bs
unset %Op
unset %hop
unset %voice
}
Last edited by RusselB; 17/09/06 09:00 PM.
|
|
|
|
Joined: Jun 2006
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Jun 2006
Posts: 10 |
* Invalid parameters: $nick (line 16, script1.txt)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Replacement code with reported errors and other small items repaired menu channel,nicklist,query {
Power : power
}
alias power {
var %a = 1, %b = $scon(0)
var %networks = network $+ $iif(%b > 1,s), %chan = channel
while %a <= %b {
.scon %a
var %c = 1, %d = $chan(0)
inc %chans %d
if %d > 1 || %chan == channels {
%chan = channels
}
%chan = $remove(%chan,$chr(32))
while %c <= %d {
inc %noobs $nick($chan(%c),0,r)
inc %Op $iif($me isop $chan(%c),1,0)
inc %hop $iif($me ishop $chan(%c),1,0)
inc %Voice $iif($me isvoice $chan(%c),1,0)
inc %c
}
inc %a
}
scon -r
msg $active 4 I have 14 %op Ops, 14 %hop Half-Ops and 14 %voice Voices over 14 %chans 15 $+ %chan 4 on < 14 $scon(0) 4 >15 %networks $+ . 4 I pwn < 14 %noobs 4 >15 n00bs
unset %Op
unset %hop
unset %voice
unset %chans
unset %noobs
}
Last edited by RusselB; 17/09/06 09:30 PM.
|
|
|
|
Joined: Jun 2006
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Jun 2006
Posts: 10 |
[04:03:09] <%trombone2009> I am OP'd in 1/42 channels on < 1 > network. [04:03:09] <%trombone2009> I am Half-OP'd in 3/42 channels on < 1 > network. [04:03:09] <%trombone2009> I am OP'd in 1/42 channels on < 1 > network. [04:03:09] <%trombone2009> I pwn < > n00bs something is still wrong
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Use the LAST code I posted. It has a number of repairs done to it.
|
|
|
|
Joined: Jun 2006
Posts: 10
Pikka bird
|
OP
Pikka bird
Joined: Jun 2006
Posts: 10 |
I have 1 Ops, 3 Half-Ops and Voices over 6 channels on < 1 > network. I pwn < 2 > n00bs << this seems wrong I have ~ in one room % in three rooms and + in 2 rooms in the one that i have ~ in there are currently 16 ppl that I have a higher power than in the 3 that i have % in there are 6 ppl that i have a higher power than so there must be something wrong
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
The ~ is not recognized by the script as a power option. The only items that are recognized are @, %, and +
Make sure you're using just the script I supplied, as it was tested by Ryu (whom you met in the scripting channel on maximum-irc) and it works for him.
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
Ameglian cow
Joined: Aug 2006
Posts: 44 |
menu channel,nicklist,query { Power : power } alias power { var %a = 1, %b = $scon(0) var %networks = network $+ $iif(%b > 1,s), %chan = channel while %a <= %b { .scon %a var %c = 1, %d = $chan(0) inc %chans %d if %d > 1 || %chan == channels { %chan = channels } %chan = $remove(%chan,$chr(32)) while %c <= %d { inc %noobs $nick($chan(%c),0,r) inc %Op $iif($me isop $chan(%c),1,0) inc %hop $iif($me ishop $chan(%c),1,0) inc %Voice $iif($me isvoice $chan(%c),1,0) inc %c } inc %a } scon -r msg $active 15C14onnected 15H14ere 15V14ia:3 $+ $server $+ . I have %op Ops, %hop Half-Ops and %voice Voices over %chans %chan on < $scon(0) > %networks $+ . I pwn < %noobs > n00bs unset %Op unset %hop unset %voice unset %chans unset %noobs }
|
|
|
|
Joined: Sep 2006
Posts: 71
Babel fish
|
Babel fish
Joined: Sep 2006
Posts: 71 |
hmmm I can't get this to work? can someone help?
|
|
|
|
Joined: Aug 2006
Posts: 44
Ameglian cow
|
Ameglian cow
Joined: Aug 2006
Posts: 44 |
Aliases
power {
var %a = 1, %b = $scon(0)
var %networks = network $+ $iif(%b > 1,s), %chan = channel
while %a <= %b {
.scon %a
var %c = 1, %d = $chan(0)
inc %chans %d
if %d > 1 || %chan == channels {
%chan = channels
}
%chan = $remove(%chan,$chr(32))
while %c <= %d {
inc %noobs $iif($me ison $chan(%c),$nick($chan(%c),0,a,o),$iif($me ishop $chan(%c),$nick($chan(%c),0,a,oh),$nick($chan(%c),0,r)))
inc %Op $iif($me isop $chan(%c),1,0)
inc %hop $iif($me ishop $chan(%c),1,0)
inc %Voice $iif($me isvoice $chan(%c),1,0)
inc %c
}
inc %a
}
scon -r
msg $active 15C14onnected 15H14ere 15V14ia3: 10<12 $+ $server $+ 10>14. 15I H14ave: 10<4 $+(%op, $+ 3/04 $+ ,%chans) 10> 15O14ps, 10<4 $+(%hop, $+ 3/04 $+ ,%chans) 10> 15H14elp10-15O14ps 15a14nd 10<4 $+(%voice, $+ 3/04 $+ ,%chans) 10> 15V14oices. 15I A14m 15O14n 10<4 $scon(0) 10> 15N14etwork(s). 15I H14ave 15C14ontrol 15O14ver 10<4 %noobs 10> 15M14ortal 15V14ictoms.
unset %Op
unset %hop
unset %voice
unset %chans
unset %noobs
}
PopUps (Channel Section)
|
|
|
|
|