|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
Ok, i need a script to my bot. but i really don't know how to make it.. emm, like if 2 people on my channel don't have voice.. and like if the bot has a timer set to 800sec (eg. timer 0 800 check-no-voice) and when it checks.. and find the two ppl without voice.. then it voices them.. any ideas??
Last edited by Deep3D; 27/04/03 08:17 PM.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
alias check-no-voice {
; Set the channel name here
/set -u0 %channame #mIRC
; set the names to have voices here
/set -u0 %nickname Deep3D KingTomato
; we are on channel, and have the power
if (($me ison %channame) && (($me isop $chan) || ($me ishop $chan))) {
/set -u0 %a 1
while (%a <= $numtok(%nickname, 32)) {
/set -u0 %curnick $gettok(%nickname, %a, 32)
if ((%curnick ison %channame) && (%curnick !isvoice %channame)) {
/mode %channame +v
}
/inc -u0 %a
}
}
}
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 699 |
alias check-no-voice {
tokenize 32 [color:blue]#channel[/color] [color:#00009C]Nick1 Nick2[/color]
if $me isop $1 || $me ishop $1 { mode $1 vv $iif($2 isreg $1,$2) $iif($3 isreg $1,$3) }
}
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
OKay, sure.. Shorten the code.. >:( All my hard work (of 30 seconds).. But, just incase you missed it, found an error:
alias check-no-voice {
tokenize 32 [color:green]#channel Nick1 Nick2[/color]
if (($me isop $1) || ($me ishop $1)) {
/mode $1 [color:red]+[/color]vv $iif($2 isreg $1,$2) $iif($3 isreg $1,$3)
}
}
Sry, i wanted to pretty up ur conditionals too. I'm a neat freak like that. >:D
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 699 |
There was no error Your code is ugly not mine, mine doesn't have needless parenthesis and slashes corrupting it!
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Okay, so they're needless, but worthless? Nope Esp when you have a lot of conditions, make everything nice and neat.
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
hmm, vel.. the script needs to find the nick it self.. like, if some persons dont have voice, then it vosies them.. whitout typing the nick ect..
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Ohhh.. I thought you meant you were specifying that a specific two people should be voiced. Okay, no problem..
alias check-no-voice {
[color:green]; name of the channel[/color]
/set -u0 %chan [color:Red]#mychan[/color]
[color:green];we are on the channel, and have the power[/color]
if ($me ison %chan) && (($me isop %chan) || ($me ishop %chan)) {
[color:green]; users without a voice exist[/color]
if ($nick(%chan, 0, a, v) > 0) {
[color:green]; voice the users[/color]
/set -u0 %a 1
while (%a <= $nick(%chan, 0, a, v)) {
/set -u0 %nicks $addtok(%nicks, $nick(%chan, %a, a, v), 32)
[color:green]; group voice statements[/color]
if ($numtok(%nicks, 32) == $modespl) || (%a == $nick(%chan, 0, a, v)) {
/mode %chan + [ $+ [ $str(v, $modespl) ] ] %nicks
/unset %nicks
}
/inc -u0 %a
}
}
}
}
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
wii.. thanks dude..
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
one more thing.. it shold not voice it self and X.. what shold i add to the script then? Like if X, ME and a dude dont have voice.. then just voice the dude,, since X and me allready have voice.. u undersand me?
|
|
|
|
|