mIRC Homepage
Posted By: Deep3D Voice Script - 27/04/03 07:51 PM
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
Posted By: KingTomato Re: Voice Script - 27/04/03 09:15 PM
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
    }
  }
}
Posted By: Nimue Re: Voice Script - 28/04/03 12:33 AM
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) }
}
Posted By: KingTomato Re: Voice Script - 28/04/03 01:23 PM
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
Posted By: Nimue Re: Voice Script - 28/04/03 03:12 PM
There was no error grin
Your code is ugly not mine, mine doesn't have needless parenthesis and slashes corrupting it! wink
Posted By: KingTomato Re: Voice Script - 28/04/03 03:22 PM
Okay, so they're needless, but worthless? Nope Esp when you have a lot of conditions, make everything nice and neat. grin
Posted By: Deep3D Re: Voice Script - 28/04/03 07:06 PM
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
Posted By: KingTomato Re: Voice Script - 28/04/03 07:17 PM
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
       }
     }
  }
}
Posted By: Deep3D Re: Voice Script - 29/04/03 06:09 PM
wii.. thanks dude.. grin
Posted By: Deep3D Re: Voice Script - 29/04/03 08:37 PM
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
© mIRC Discussion Forums