Bot Snippet

By Soubi on Sep 23, 2010

This is just a simple bot command script i put together. just load it into your remotes and follow the instructions. Put comments if you'd like, but dont be saying stuff like " oh, i made that script, or something just like it" because most likely...it does look like yours..there are many bot scripts on hawkee, and it doesnt mean that this one is yours. And you will notice that there are a few new levels ;). Bot Superowners can change the password and such. I did add a protection part, where it notices all superowners the new password, and the nick that changed it. Hope you enjoy ^_^

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;Soubi's Bot Command Script;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:load: {
  echo -a 4T5hank 4Y5ou for loading 4S5oubi12'5s 4B5ot 4S5cript12!
  echo -a 4A5nd a reminder12,4I 5must have owner status in a room to use some of these commands12!
  set %botpw $$?="Enter Your Bots Password"
  set %superowners $$?="Enter Your Bot Owners. Ex: superowner1,superowner2,superowner3" 
  set %superowner $$?="Enter the nick of the orginal superowner of your bot." 
/auser superowner %superowner
}

#botscript on

on owner:TEXT:*:#: {
  Tokenize 32 $Strip($1-)
  if ($1 == .op)  { mode $chan +o $2 } 
  if ($1 == .mode) { mode $chan $2 }
  if ($1 == .deop) { mode $chan -o $2 }
  if ($1 == .partall) { partall }
  if ($1 == .voice) { mode $chan +v $2 }
  if ($1 == .devoice) { mode $chan -v $2 }
  if ($1 == .halfop) { mode $chan +h $2 }
  if ($1 == .dehalfop) { mode $chan -h $2 }
  if ($1 == .protect) { mode $chan +a $2 } 
  if ($1 == .deprotect) { mode $chan -a $2 }
  if ($1 == .owner) { mode $chan +q $2 } 
  if ($1 == .deowner) { mode $chan -q $2 }
  if ($1 == .part)  { /part $chan }
  if ($1 == .hop) { hop $chan } 
  if ($1 == .partall) { partall }
  if ($1 == .d/c) { disconnect }
  if ($1 == .getpass) { notice $nick %botpw }
  if ($1 == .r/c) { timer 1 1 /amsg Restarting | timer -o 1 3 server %server }
  if ($1 == .addowner) { auser owner $address($2,4) | notice $nick 4I 5have added 11 $2 5 to the owner list4. 
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot Owner. Bot Command used in: $chan }
  if ($1 == .addmaster) { auser master $address($2,4) | notice $nick 4I 5have added 11 $2 5 to the master list4. 
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot Master. Bot Command used in: $chan }
  if ($1 == .addoperator) { auser operator $address($2,3) | notice $nick 11 $2 5 is now a 4B5ot 4O5perator4. 
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot Operator. Bot Command used in: $chan }
  if ($1 == .adduser) { auser user $address($2,3) | notice $nick 11 $2 5 is now on the 4B5ot 4U5sers list4. 
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot User. Bot Command used in: $chan } 
  if ($1 == .delowner) { ruser owner $address($2,3) | notice $nick11 $nick 5 has deleted 11 $2 5 from the owner list4. 
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot Owner. Bot Command used in: $chan }
  if ($1 == .cn) { nick $2 }
  if ($1 == .ban) { mode $chan +bb $2 $address($2,2) | kick $chan $2 $3-  }
  if ($1 == .delmaster) { ruser master $address($2,3) | notice $nick 11 $2 5has been deleted from the master list4. 
  .notice %superowners Warning: $nick has deleted $2 off of the User list as a Bot Master. Bot Command used in: $chan }
  if ($1 == .deloperator) { ruser operator $address($2,3) | notice $nick 11 $2 5has been deleted from the operator list4. 
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot Operator. Bot Command used in: $chan }
  if ($1 == .deluser) { ruser user $address($2,3) | notice $nick 11 $2 5has been deleted from the bot's user list4. 
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot User. Bot Command used in: $chan }
  if ($1 == .invite) { invite $2 $chan }
  if ($1 == .owners) { msg $chan %owner %users }
  if ($1 == .ownercmds) { .notice $nick My owner commands are ( .op, .mode, .getpass, .kb, .ban, .deop, .voice, .devoice, .halfop, .dehalfop, .d/c, .hop, .part, .deowner, .owner, .addowner, .delowner, .addmaster, .delmaster, .addoperator, .deloperator, .adduser, .deluser, .join(in notice), .cn(change nick), .invite, .r/c, .id( in notice, .kick) } 
  if ($1 == .kick) { kick $chan $2 $3- }
  if ($1 == .mastercmds) { .notice $nick My Master Commands are: .op, .mode, .deop, .voice, .devoice, .halfop, .dehalfop, .protect, .deprotect, .hop, .addoperator, .adduser, .ban, .kick, .kb, .invite, .deloperator, .deluser }
  if ($1 == .kb) { kick $chan $2 $3- | ban $chan $address($2,2) }
  if ($1- == explain yourself $me) { timer 1 1 msg $chan Yes $nick | timer 1 3 msg $chan I am a bot, my Super Owners are %superowners , i am in the beta stages, i am using NNS..and i like pie :P }
  if ($1 == .operatorcmds) { .notice $nick My Operator Commands are: .voice, .devoice, .halfop, .dehalfop, .op, .deop, .invite, .kick, .mode, .ban, .kb, .hop }
  if ($1 == .usercmds) { .notice $nick My User Comamnds are: .voice, .devoice, .kick, .mode, .hop, invite }
}

on owner:notice:*:*: { 
  if ($1 == .join) { /join $2 }
  if ($1 == .id) { identify $2- }
}

on master:text:*:#: {
  Tokenize 32 $Strip($1-)
  if ($1 == .op) { mode $chan +o $2 }
  if ($1 == .mode) { mode $chan $2 }
  if ($1 == .deop) { mode $chan -o $2 }
  if ($1 == .voice) { mode $chan +v $2 }
  if ($1 == .devoice) { mode $chan -v $2 }
  if ($1 == .halfop) { mode $chan +h $2 }
  if ($1 == .dehalfop) { mode $chan -h $2 }
  if ($1 == .protect) { mode $chan +a $2 } 
  if ($1 == .deprotect) { mode $chan -a $2 }
  if ($1 == .hop) { hop $chan }
  if ($1 == .addoperator) { auser operator $address($2,3) | notice $nick 11 $2 5 is now a 4B5ot 4O5perator4.
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot Operator. Bot Command used in: $chan }
  if ($1 == .adduser) { auser user $address($2,3) | notice $nick 11 $2 5 is now on the 4B5ot 4U5sers list4.
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot User. Bot Command used in: $chan  }
  if ($1 == .ban) { mode $chan +bb $2 $address($2,2) | kick $chan $2 $3-  } 
  if ($1 == .deloperator) { ruser operator $address($2,3) | notice $nick 11 $2 5has been deleted from the operator list4.
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot Operator. Bot Command used in: $chan  }
  if ($1 == .deluser) { ruser user $address($2,3) | notice $nick 11 $2 5has been deleted from the bot's user list4.
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot User. Bot Command used in: $chan  }
  if ($1 == .invite) { invite $2 $chan }
  if ($1 == .kick) { kick $chan $2 $3- }
  if ($1 == .kb) { kick $chan $2 $3- | ban $chan $address($2,2) }
  if ($1 == .mastercmds) { .notice $nick My Master Commands are: .op, .mode, .deop, .voice, .devoice, .halfop, .dehalfop, .protect, .deprotect, .hop, .addoperator, .adduser, .ban, .kick, .kb, .invite, .deloperator, .deluser }
}

on operator:text:*:#: { 
  Tokenize 32 $Strip($1-)
  if ($1 == .voice) { mode $chan +v $2 }
  if ($1 == .devoice) { mode $chan -v $2 }
  if ($1 == .halfop) { mode $chan +h $2 }
  if ($1 == .dehalfop) { mode $chan -h $2 }
  if ($1 == .op) { mode $chan +o $2 }
  if ($1 == .deop) { mode $chan -o $2 }
  if ($1 == .invite) { invite $2 $chan }
  if ($1 == .kick) { kick $chan $2 $3- }
  if ($1 == .mode) { mode $chan $2 }
  if ($1 == .ban) { mode $chan +b $address($2,2) }
  if ($1 == .kb) { mode $chan +b $address($2,2) | kick $chan $2 $3- }
  if ($1 == .hop) { hop $chan }
  if ($1 == .operatorcmds) { .notice $nick My Operator Commands are: .voice, .devoice, .halfop, .dehalfop, .op, .deop, .invite, .kick, .mode, .ban, .kb, .hop }
}

on user:text:*:#: {
  Tokenize 32 $Strip($1-)
  if ($1 == .voice) { mode $chan +v $2 }
  if ($1 == .devoice) { mode $chan -v $2 }
  if ($1 == .kick) { kick $chan $2 $3- }
  if ($1 == .mode) { mode $chan $2 }
  if ($1 == .hop) { hop $chan }
  if ($1 == .invite) { invite $2 $chan }
  if ($1 == .usercmds) { .notice $nick My User Comamnds are: .voice, .devoice, .kick, .mode, .hop, .invite }
}
on !superowner:join:#: { msg $chan 4,1W5,1elcome back 4 $+ $nick $+ 12,1, 5,1you are one of my 4,1S5,1uper 4,1O5,1wners $+ 12,1. 
}
on owner:join:#: { msg $chan 4,1W5,1elcome back 4 $+ $nick $+ 12,1, 5,1you are one of my  4,1O5,1wners $+ 12,1. 
}

on master:join:#: { msg $chan 4,1W5,1elcome back 4 $+ $nick $+ 12,1, 5,1you are one of my 4,1M5,1asters $+ 12,1.
}

on operator:join:#: { msg $chan 4,1W5,1elcome back 4 $+ $nick $+ 12,1, 5,1you are one of my 4,1O5,1perators $+ 12,1.
}

on user:join:#: { msg $chan 4,1W5,1elcome back 4 $+ $nick $+ 12,1, 5,1you are one of my 4,1B5,1ot 4,1U5,1sers $+ 12,1.
}

#botscript end

on !superowner:text:*:#: {
  Tokenize 32 $Strip($1-)
  if ($1- == return to safe mode) { amsg 4B5ot is returning to 4S5afe 4M5ode 10[4C5ommand used by 4S5uper 4O5wner10: 4 $nick 10] | /enable #botscript }
  if ($1- == bot lockdown) {  amsg 4B5ot 4L5ock 4D5own has be activated 10[4C5ommand used by 4S5uper 4O5wner10: 4 $nick 10] | /disable #botscript }
  if ($1 == .op)  { mode $chan +o $2 } 
  if ($1 == .deop) { mode $chan -o $2 }
  if ($1 == .mode) { mode $chan $2 }
  if ($1 == .partall) { partall }
  if ($1 == .addsuperowner) { auser superowner $address($2,3) | notice $nick 4 $+ $2 5 has been added to my 4S5uper 4O5wner list2.
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot Super Owner. Bot Command used in: $chan  }
  if ($1 == .delsuperowner) { ruser superowner $address($2,3) | notice $nick 4 $+ $2 5has been deleted off of my 4S5uper 4O5wner list2.
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot Super Owner. Bot Command used in: $chan  }
  if ($1 == .voice) { mode $chan +v $2 }
  if ($1 == .devoice) { mode $chan -v $2 }
  if ($1 == .halfop) { mode $chan +h $2 }
  if ($1 == .dehalfop) { mode $chan -h $2 }
  if ($1 == .protect) { mode $chan +a $2 } 
  if ($1 == .deprotect) { mode $chan -a $2 }
  if ($1 == .owner) { mode $chan +q $2 } 
  if ($1 == .deowner) { mode $chan -q $2 }
  if ($1 == .part)  { /part $chan }
  if ($1 == .hop) { hop $chan } 
  if ($1 == .d/c) { disconnect }
  if ($1 == .getpass) { notice $nick %botpw }
  if ($1 == .r/c) { timer 1 1 /amsg Restarting | timer -o 1 3 server %server }
  if ($1 == .addowner) { auser owner $address($2,3) | notice $nick 4I 5have added 11 $2 5 to the owner list4.
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot Owner. Bot Command used in: $chan  }
  if ($1 == .addmaster) { auser master $address($2,3) | notice $nick 4I 5have added 11 $2 5 to the master list4.
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot Master. Bot Command used in: $chan  }
  if ($1 == .addoperator) { auser operator $address($2,3) | notice $nick 11 $2 5 is now a 4B5ot 4O5perator4.
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot Operator. Bot Command used in: $chan  }
  if ($1 == .adduser) { auser user $address($2,3) | notice $nick 11 $2 5 is now on the 4B5ot 4U5sers list4.
  .notice %superowners Warning: $nick has added $2 to the User list as a Bot User. Bot Command used in: $chan  } 
  if ($1 == .delowner) { ruser owner $address($2,3) | notice $nick 11 $nick 5 has deleted 11 $2 5 from the owner list4.
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot Owner. Bot Command used in: $chan  }
  if ($1 == .cn) { nick $2 }
  if ($1 == .ban) { mode $chan +bb $2 $address($2,2) | kick $chan $2 $3-  }
  if ($1 == .delmaster) { ruser master $address($2,3) | notice $nick 11 $2 5has been deleted from the master list4.
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot Master. Bot Command used in: $chan  }
  if ($1 == .deloperator) { ruser operator $address($2,3) | notice $nick 11 $2 5has been deleted from the operator list4.
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot Operator. Bot Command used in: $chan  }
  if ($1 == .deluser) { ruser user $address($2,3) | notice $nick 11 $2 5has been deleted from the bot's user list4.
  .notice %superowners Warning: $nick has deleted $2 off of User list as a Bot User. Bot Command used in: $chan  }
  if ($1 == .invite) { invite $2 $chan }
  if ($1 == .superownercmds) { .notice $nick My Super Owner commands are ( .op, .obliterate( drops nick groub), .release, .mode, .delsuperowner, .totalreset, .addsuperowner, .getpass,  bot lockdown, return to safe mode .kb, .ban, .deop, .voice, .devoice, .halfop, .dehalfop, .d/c, .hop, .part, .deowner, .owner, .addowner, .delowner, .addmaster, .delmaster, .addoperator, .deloperator, .adduser, .deluser, .join(in notice), .cn(change nick), .invite, .r/c, .id(notice).kick }
  if ($1 == .ownercmds) { .notice $nick My owner commands are ( .op, .kb, .mode,  .getpass, .ban, .deop, .voice, .devoice, .halfop, .dehalfop, .d/c, .hop, .part, .deowner, .owner, .addowner, .delowner, .addmaster, .delmaster, .addoperator, .deloperator, .adduser, .deluser, .join(in notice), .cn(change nick), .invite, .r/c, .id(in notice), .kick) } 
  if ($1 == .kick) { kick $chan $2 $3- }
  if ($1 == .mastercmds) { .notice $nick My Master Commands are: .op, .mode, .deop, .voice, .devoice, .halfop, .dehalfop, .protect, .deprotect, .hop, .addoperator, .adduser, .ban, .kick, .kb, .invite, .deloperator, .deluser }
  if ($1 == .kb) { mode $chan +b $address($2,2) | kick $chan $2 $3-   }
  if ($1- == explain yourself $me) { timer 1 1 msg $chan Yes $nick | timer 1 3 msg $chan I am a bot, my Super Owners are %superowners , i am in the beta stages, i am using NNS..and i like pie :P }
  if ($1 == .operatorcmds) { .notice $nick My Operator Commands are: .voice, .devoice, .halfop, .dehalfop, .op, .deop, .invite, .kick, .mode, .ban, .kb, .hop }
  if ($1 == .usercmds) { .notice $nick My User Comamnds are: .voice, .devoice, .kick, .mode, .hop, invite } 
  if ($1 == .obliterate) { /msg nickserv drop $me | msg $chan I have been obliterated }
} 

on superowner:notice:*:*: {
 if ($1 == .release) { ns release $2 $3 }
  if ($1 == .join) { /join $2 }
  if ($1 == .id) { identify $2- }
  if ($1 == .totalreset) { /msg nickserv set password $2- | notice %superowners 4B5ot passwords have been changed by 4S5uper O5wner: 4 $nick to : $2- | set %botpw  $2 }
  if ($1 == .release) { ns release $me $2 }
  if ($1 == .msg) { msg $2 $3- }
}

Comments

Sign in to comment.
CrazyShady   -  Sep 09, 2011

Very nice script. Like+rate. :)

 Respond  
ExternalIRC   -  Aug 09, 2011

Well when i did that it has a user set up so i set it only for superowner and they didnt have to use . @ ! or % any of that :) It was remade to suit me. But i know i should have done that.

 Respond  
Jethro   -  Aug 08, 2011

ExternalIRC, it is $1 without the dash. $1- means $1 $2 $3 $4 etc... etc...

if ($1 == cmd) { is more like it.

 Respond  
ExternalIRC   -  Aug 08, 2011

Seeing how you couldnt figure out how to make it do %version i redid that and made the whole script if ($1- == command) instead of using triggers

 Respond  
ExternalIRC   -  Aug 08, 2011

Soubi on the Explain yourself $me i took the advantage of making the whole thing say
if ($1- == explain yourself $me) { timer 1 1 msg $chan Yes $nick | timer 1 3 msg $chan I am a bot, my Super Owners are %superowners , i am in the beta stages, i am using mIRC %version $+ ..and i like pie :P }

 Respond  
Soubi   -  Sep 24, 2010

eh...you prove a good point :P

 Respond  
gooshie   -  Sep 24, 2010

Because the event is * $ulevel will return user level 1 no matter what the user level of $nick. The help file is vague on $ulevel. You must use $level($fulladdress). Also I would not tokenize until after the level match. Also maybe require two words to trigger.

on *:text:* *:#:{

  if $istok(owner.superowner.master.operator,$level($fulladdress),46) {

   tokenize 32 $strip($1-)

   ;here u can put all commands that all levels can do
    ...
    ...
    if $level($fulladdress) != operator {
      ;here u can put all command that all levels exclude operator can do
      ...
      ...
      if $level($fulladdress) != master {
        ;here u can put all cmds exclude operator and master
        ...
        ...
        if $level($fulladdress) != owner {
          ;and here for superowner
          ...
          ...
        }
      }
    }
  }
}
___________________________________________________________________________
 Respond  
WorldDMT   -  Sep 23, 2010

ok look

on *:text:*:#:{
  tokenize 32 $strip($1-)
  if $istok(owner.superowner.master.operator,$ulevel,46) {
    ;here u can put all commands that all levels can do
    ...
    ...
    if $ulevel != operator {
      ;here u can put all command that all levels exclude operator can do
      ...
      ...
      if $ulevel != master {
        ;here u can put all cmds exclude operator and master
        ...
        ...
        if $ulevel != owner {
          ;and here for superowner
          ...
          ...
        }
      }
    }
  }
}

then no repetition ;)

 Respond  
Soubi   -  Sep 23, 2010

Yes there is a lot of repetition, but really doesnt matter. Same commands throughout the script, but only certain users can use certain commands. That is why its split up into five different levels. It works for what i want it to do, and thats all i care about ^_^. I'm new at scripting anyways...its not like I have time to sit down several hours a day and study scripting :/ i have plenty of Calculus and College Algebra work i could be doing.

 Respond  
WorldDMT   -  Sep 23, 2010

why all this repetition u can use $ulevel in condition

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.