|
Joined: Dec 2006
Posts: 9
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Dec 2006
Posts: 9 |
ok since I started with this I had nothing but probleme's i need help, figuring out a way of doiing this script in a better way. it's suposed to op all the user whit access level 2 on #channel & level 3 owner with the maximum $modespl for now everything work really well. my probleme is even if the var are empty it keep starting a empty timer. i have try to set up an if to check if (%o != $null) and then start de timer but it still goes off witout any data in it, so that's what i need help whit !?! * Timer .fix126.#wire 1 time(s) 126s delay mode #wire +oooooo [C]hocolat [W]indows Admx-Tech amdx-bot amdx-drone web (UnderNet) * Timer .fix127.#wire 1 time(s) 16129s delay mode #wire +oooooo (UnderNet) <-====== ??? empty timer ??? * Timer .fix128.#wire 1 time(s) 16384s delay mode #wire +oooooo [W]indows Admx-Tech amdx-bot amdx-drone web (UnderNet) the USERS access are added this way: /guser 3 nick 2 owner /guser 2 nick 2 #channel
menu channel {
fix channel:{ set %o.c $chan | fix }
}
alias fix {
set %o 0 | var %i = 1
while (%i <= $nick(%o.c,%i,a,o)) {
if $me !isop %o.c halt
var %n = $nick(%o.c,%i,a,o) | var %c = $address(%n,2)
if ($ulist(%c,3,1) != $null) && ($ulist(%c).info == owner) {
inc %o | set %op. [ $+ [ %o ] ] %n
if (%o == $modespl) { goto fastn }
}
if ($ulist(%c,2,1) != $null) && ($ulist(%c).info == $chan) {
inc %o | set %op. [ $+ [ %o ] ] %n
if (%o == $modespl) { goto fastn }
}
:fastn
if (%o == $modespl) {
var %full = %op.2 %op.3 %op.4 %op.5 %op.6 %op.7 | if (%full == $null) { halt }
if %x < 5 || %x == $null && %rp < 15 || %rp = $null { mode %o.c + $+ $str(o,$modespl) %op.1 %op.2 %op.3 %op.4 %op.5 %op.6 %op.7 | unset %op.* }
else { inc -u120 %rp | timer.fix $+ %rp $+ . $+ %o.c 1 %rp mode %o.c + $+ $str(o,$modespl) %op.1 %op.2 %op.3 %op.4 %op.5 %op.6 %op.7 | unset %op.* }
}
inc %i
}
if (%o != $null) { inc -u120 %rp | timer.fix $+ %rp $+ . $+ %o.c 1 $calc(%rp * %rp) mode %o.c + $+ $str(o,$modespl) %op.1 %op.2 %op.3 %op.4 %op.5 %op.6 %op.7 | unset %op.* }
}
this script is actully in a mirc bot, I put it like this so you guys can have a better look
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
This is based on similar requests that I have seen a number of times previously, so it should work without any problems. Your obviously fairly skilled in mIRC scripting already, so there shouldn't be anything you don't understand, however, if there is, then I'd be happy to explain anything you don't understand menu channel {
fix channel: fix $chan
}
alias fix {
var %a = 1, %b = $nick($1,0,a,o)
while %a <= %b {
var %nick = $nick($1,%a,a,o), %address = $address(%nick,2)
if ($ulist(%address,3,1) && $ulist(%address).info == owner) || ($ulist(%address,2,1) && $ulist(%c).info == $1) {
set %opnick $addtok(%opnick,%nick,32)
if $numtok(%opnick,32) == $modespl {
.mode $1 $+(+,$str(o,$modespl)) %opnick
unset %opnick
}
}
inc %a
}
if %opnick {
.mode $1 $+(+,$str(o,$modespl)) %opnick
unset %opnick
}
}
|
|
|
|
Joined: Dec 2006
Posts: 9
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Dec 2006
Posts: 9 |
ok i have tryed whit this new "alias fix" im not sure if you tryed it but it only op 2 user and then stop's if try to change a couple thing but i have the same result seem's like my first script was working better even with the empty timers. if someone could help me i will be more then happy.
i found out that when a do a //who #channel before the executing /fix #channel it was working a litle better but i still dont understant why i dosent work properly.
Last edited by SICORPS; 30/12/06 10:08 PM.
|
|
|
|
Joined: Jan 2004
Posts: 162
Vogon poet
|
Vogon poet
Joined: Jan 2004
Posts: 162 |
where is the %c set, used in $ulist(%c).info ?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
5th line of the original fix alias var %n = $nick(%o.c,%i,a,o) | var %c = $address(%n,2)
|
|
|
|
Joined: Dec 2006
Posts: 9
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Dec 2006
Posts: 9 |
Russel do you know any other ways of making this script working properly. because the one u gave me yesterday is not working, i have tested it and double tested it still dont have any good result.
Last edited by SICORPS; 31/12/06 08:15 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Sorry, I don't...the script that I gave you is a slightly modified version of a script that I use for the same purpose. The differences are in the manner that the information is stored in the userlist.
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
var %full = %op.2 %op.3 %op.4 %op.5 %op.6 %op.7 | if (%full == $null) { halt } Is the above missing a %op.1 element? Why not just add each element to a single list?
Sais
|
|
|
|
|