mIRC Home    About    Download    Register    News    Help

Print Thread
#21217 27/04/03 07:51 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
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?? wink

Last edited by Deep3D; 27/04/03 08:17 PM.
#21218 27/04/03 09:15 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
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
#21219 28/04/03 12:33 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Code:
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) }
}

#21220 28/04/03 01:23 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
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:

Code:
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
#21221 28/04/03 03:12 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
There was no error grin
Your code is ugly not mine, mine doesn't have needless parenthesis and slashes corrupting it! wink

#21222 28/04/03 03:22 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
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. grin


-KingTomato
#21223 28/04/03 07:06 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
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.. shocked

#21224 28/04/03 07:17 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
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..

Code:
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
#21225 29/04/03 06:09 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
wii.. thanks dude.. grin

#21226 29/04/03 08:37 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
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? grin


Link Copied to Clipboard