SRU

Start script (With channel lock)

SRU
Apr 7th, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 5.78 KB | None | 0 0
  1. on *:TEXT:*:#: {
  2.   ;*** +/-BOT (Used to activate/disable the bot in channels)
  3.   if ($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/)) && ($left($strip($1),1) isin +-) && ($me isin $1) {
  4.     ;*** Already ON/OFF
  5.     if ($left($strip($1),1) == + && $istok(%ChanList,$+($network,$chan),32)) || ($left($strip($1),1) == - && !$istok(%ChanList,$+($network,$chan),32)) { .msg # System is already $+($iif($left($strip($1),1) == -,4de,9),activated) }
  6.     else { set %ChanList $iif($left($strip($1),1) == -,$remtok(%ChanList,$+($network,$chan),1,32),$addtok(%ChanList,$+($network,$chan),32)) | .msg # $iif($left($strip($1),1) == -,Comenzing... system shutdown,Initializing... start up sequence) activated by $xNiCK($nick) }
  7.   }
  8.   ;*** Check to see if activated (and/or SPAMMiNG the channel) - If so we don't do anything... funny enough
  9.   elseif (!$istok(%ChanList,$+($network,$chan),32)) || ($timer($+(SPAM,$network,$chan))) { halt }
  10.   ;**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  11.   ;*** Flood Protection (Network) Channel based *** Currently set to 7 secs
  12.   .timer $+ $+(SPAM,$network,$chan) 1 6 noop
  13.   ;*** Setting variables for late use (Setting where to output the reply aka where / who to messages)
  14.   var %SEND $iif(%action != !,.notice $nick,$iif($regex($nick($chan,$nick).pnick,/(!|~|&|@|%|\+)/),.msg $chan,.notice $nick))
  15.   ;**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  16.   ;******* Commands below here
  17.   ;*** !CMDS
  18.   if ($istok(!Commands !Help !CMDS !CMD !Command,$replace($1,@,!,.,!),32)) { msg # Nothing added yet... but hopefully at some point you'll be able to do more then just $1 }
  19.   ;*** !BEER
  20.   elseif ($istok(!Beer !Soda,$replace($1,@,!,.,!),32)) { describe # hands $nick a $mid($1,2,$len($1)) }
  21.   ;**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  22.   ;*** ChanServ
  23.   ;* Owner
  24.   elseif ($regex($nick($chan,$nick).pnick,/(!|~)/)) && ($regex($nick($chan,$me).pnick,/(!|~)/)) && ($istok(!Owner !Kingpin !DeOwner !DeKingpin,$replace($1,@,!,.,!),32)) { mode # $+($iif($mid($1,2,2) == de,-,+),qo) $str($2,2) }  
  25.   ;**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  26.   ;* Admin
  27.   elseif ($regex($nick($chan,$nick).pnick,/(!|~|&)/)) && ($regex($nick($chan,$me).pnick,/(!|~)/)) && ($istok(!Admin !DeAdmin !Henchman !DeHenchman !Protect !DeProtect,$replace($1,@,!,.,!),32)) { mode # $+($iif($mid($1,2,2) == de,-,+),ao) $str($2,2) }
  28.   ;**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  29.   ;* Operator
  30.   elseif ($regex($nick($chan,$nick).pnick,/(!|~|&|@)/)) && ($regex($nick($chan,$me).pnick,/(!|~|&)/)) && ($istok(!OP !DEOP !Operator !DeOperator,$replace($1,@,!,.,!),32)) { mode # $+($iif($mid($1,2,2) == de,-,+),o) $2 }
  31.   ;**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  32.   ;* HalfOP
  33.   elseif ($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/)) && ($regex($nick($chan,$me).pnick,/(!|~|&|@)/)) && ($istok(!HalfOP !DEHalfOP !Enforcer !DeEnforcer,$replace($1,@,!,.,!),32)) { mode # $+($iif($mid($1,2,2) == de,-,+),h) $2 }
  34.   ;**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  35.   ;* Voice
  36.   elseif ($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/)) && ($regex($nick($chan,$me).pnick,/(!|~|&|@|%)/)) && ($istok(!Voice !DEVoice !VOP !DV,$replace($1,@,!,.,!),32)) { mode # $+($iif($mid($1,2,2) == de,-,+),v) $2 }
  37.   ;**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  38.   ;*** Add more commands below here (Copy/Paste)
  39.   elseif ($istok(!You !Can !Add !As !Many !CMDS !As !You !Want !Here !Just !Seperate !With !A !Space,$replace($1,@,!,.,!),32)) { msg # Here a command can be place }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment