Basic Mirc Bot

By Aucun50 on Dec 15, 2008

Updated to fit on one script.

To get started type:
!start

Before any updates ideas from http://www.hawkee.com/snippet/2846/ were used credit go to them for the help before updates.

on *:LOAD: { writeini users.ini Botowners Nicks Test | writeini users.ini BotMasters Nicks Test | writeini users.ini BotUsers Nicks Test }
on *:TEXT:*:#: {
  if (!Start == $strip($1)) {
    notice $nick Lets get started, first off you need to be the owner of $me, for this type in my irc status window /set -n %owner Your Nick. After that type !Next.
  }
  if (!Next == $strip($1)) {
    if ($nick == %owner) {
      set -n %botowner $nick
      notice $nick You are now added as the owner of $me as well as you have access to !owner commands, type !commands. 
      unset %owner 
    }
    else { notice $nick Your not an owner | haltdef } 
  }
  if (!owner == $strip($1))  {
    if (commands == $strip($2)) {
      notice $nick Owner's Commands are !v, !dv, !h, !dh, !op, !deop, !a, !da, !kick, !ban, !unban
    }
    else { .notice $nick Did you mean !owner commands? }
  }  
  if (!master == $strip($1)) {
    if (commands == $strip($2)) {
      notice $nick Master's Commands are !v, !dv, !h, !dh, !op, !deop, !kick, !ban, !unban
    }  
    else { .notice $nick Did you mean !master commands? }
  }
  if (!user == $strip($1)) {
    if (commands == $strip($2)) {
      notice $nick User's commands are !v, !dv, !kick 
    }
    else { .notice $nick Did you mean !user commands? }
  }
  if (!commands == $strip($1)) {
    notice $nick My commands are: !Help, !commands, !user commands, !master commands, !owner commands.
  }
  if (!help == $strip($1)) && (!$2) { notice $nick If you are looking for commands type !commands are if you need help with something else type !help (what you need help with) ex. !help user commands.  }
  elseif (!help == $strip($1)) && ($2) {
    if (commands == $strip($2)) { notice $nick Type !commands for a list of commands. }
    if (user == $strip($2)) && (commands == $strip($3)) { notice $nick This is a list of commands that only users are higher of $me can use. }
    if (master == $strip($2)) && (commands == $strip($3)) { notice $nick This is a list of commands that only master are higher of $me can use. }
    if (owner == $strip($2)) && (commands == $strip($3)) { notice $nick This is a list of commands that only owners of $me can use. }
  }
  if ($nick == %botowner) {
    if (!aowner == $strip($1)) { writeini users.ini BotOwners Nicks $2 $($+(%,BotOwners),2) | msg $chan Added $nick as owner of $me }
    if (!downer == $strip($1)) { writeini users.ini BotOwners Nicks $remove($readini(users.ini,BotOwners,Nicks),$2,) | msg $chan Deleted $nick as owner of $me }   
    if (!amaster == $strip($1)) { writeini users.ini BotMasters Nicks $2 $($+(%,botmasters),2) | msg $chan Added $nick as master of $me }
    if (!dmaster == $strip($1)) { writeini users.ini BotMasters Nicks $remove($readini(users.ini,BotMasters,Nicks),$2) | msg $chan Deleted $nick as master of $me }
    if (!auser == $strip($1)) { writeini users.ini BotUsers Nicks $2 $($+(%,BotUsers),2) | msg $chan Added $nick as user of $me } 
    if (!duser == $strip($1)) { writeini users.ini BotUsers Nicks $remove($readini(users.ini,BotUsers,Nicks),$2) | msg $chan Deleted $nick as user of $me }
    if (!V == $strip($1)) { mode $chan +v $2 }
    if (!dv == $strip($1)) { mode $chan -v $2 }
    if (!h == $strip($1)) { mode $chan +h $2 }
    if (!dh == $strip($1)) { mode $chan -h $2 }
    if (!op == $strip($1)) { mode $chan +o $2 }
    if (!deop == $strip($1)) { mode $chan -o $2 }
    if (!a == $strip($1)) { mode $chan +a $2 }
    if (!da == $strip($1)) { mode $chan -a $2 }
    if (!kick == $strip($1)) { mode kick $chan $2 }
    if (!ban == $strip($1)) { mode $chan +b $2 }
    if (!unban == $strip($1)) { mode $chan -b $2 }
  }
  if ($nick isin $readini(users.ini,BotOwners,Nicks)) { 
    if (!V == $strip($1)) { mode $chan +v $2 }
    if (!dv == $strip($1)) { mode $chan -v $2 }
    if (!h == $strip($1)) { mode $chan +h $2 }
    if (!dh == $strip($1)) { mode $chan -h $2 }
    if (!op == $strip($1)) { mode $chan +o $2 }
    if (!deop == $strip($1)) { mode $chan -o $2 }
    if (!a == $strip($1)) { mode $chan +a $2 }
    if (!da == $strip($1)) { mode $chan -a $2 }
    if (!kick == $strip($1)) { mode kick $chan $2 }
    if (!ban == $strip($1)) { mode $chan +b $2 }
    if (!unban == $strip($1)) { mode $chan -b $2 }
  }

  elseif ($nick isin $readini(users.ini,BotMasters,Nicks)) {
    if (!V == $strip($1)) { mode $chan +v $2 }
    if (!dv == $strip($1)) { mode $chan -v $2 }
    if (!h == $strip($1)) { mode $chan +h $2 }
    if (!dh == $strip($1)) { mode $chan -h $2 }
    if (!op == $strip($1)) { mode $chan +o $2 }
    if (!deop == $strip($1)) { mode $chan -o $2 }
    if (!kick == $strip($1)) { mode kick $chan $2 }
    if (!ban == $strip($1)) { mode $chan +b $2 }
    if (!unban == $strip($1)) { mode $chan -b $2 }
  }
  elseif ($nick isin $readini(users.ini,BotUsers,Nicks)) {
    if (!v == $strip($1)) { mode $chan +v $2 }
    if (!dv == $strip($1)) { mode $chan -v $2 }
    if (!kick == $strip($1)) { mode kick $chan $2 } 
  }
}
on !@*:JOIN:#: {
  if ($me isop $chan) {
  msg $chan Hello, $nick
  mode $chan +v $nick 
  }
  else { .notice $me I need to be oped }
}

Comments

Sign in to comment.
aLFx   -  Nov 13, 2009

thanks PunkTuReD..

 Respond  
PuNkTuReD   -  Nov 12, 2009

once you open your mirc, or a blank mirc for a bot, press ctrl + r
then, if that opens and you see code, goto -- file -- new, and paste there in a blank remote file.

 Respond  
aLFx   -  Nov 12, 2009

sorry to ask..where to put all these codes?do i need to copy and paste?paste where?

 Respond  
Aucun50   -  Jan 08, 2009

I'm sorry for acting like that it was sercan386's post after i add the URLs and still people say things like, "you didnt make the full script.", "Looking at your rules, i could release this script with no credits by changing 1 character in it. think again, sparky".
That's just not needed, and napa, yes "useing an "on text event" does not mean rip, and no one said you ripped it." no one did, idk why i said that I'll have to look better before i post.

Theonlyjesse, i know there trying to make sure the right people get credited, this wasn't @ Bullet_Dodger.

 Respond  
napa182   -  Jan 08, 2009

Aucun50 Said:

That means EVERYONE here is a ripper because you all at one point used "on :TEXT::#: {".

useing an "on text event" does not mean rip, and no one said you ripped it.

Oh and Bullet_Dodger i find it funny that you are spouting rules. I remember when you joined here every code you posted was Ripped.

 Respond  
theonlyjesse   -  Jan 08, 2009

dude relax
they're making sure the right people get credit

 Respond  
Aucun50   -  Jan 04, 2009

Does anyone read? "Before any updates ideas from http://www.hawkee.com/snippet/2846/ were used credit go to them for the help before updates."

ASLO! "Looking at your rules, i could release this script with no credits by changing 1 character in it. think again, sparky, you didn't make the full script." | "Ok i made the update from scratch", I DON'T care if you rip it all that means is you can't do it by yourself.

Now before you say "will look what you did", I look at the other one and used the !IDEAS!.
Just because someone looks at the way someone else scripts its ripping? That means EVERYONE here is a ripper because you all at one point used "on :TEXT::#: {".

STFU already about the URLs i added them.

 Respond  
sercan386   -  Jan 04, 2009

Looking at your rules, i could release this script with no credits by changing 1 character in it. think again, sparky, you didnt make the full script.

 Respond  
Aucun50   -  Jan 03, 2009

Put it in intro "Before any updates ideas from http://www.hawkee.com/snippet/2846/ were used credit go to them for the help before updates."

 Respond  
Bullet_Dodger   -  Jan 03, 2009

You said

Ok i made the update from scratch, so i don't see why i would need any URL's?

Rule:

• Must include URL to original script or snippet if you did not build it from scratch.

Put credz
http://www.hawkee.com/snippet/2846/

 Respond  
Aucun50   -  Jan 03, 2009

Far as i know all the bugs are worked out noting was copied to do update NO URL'S need, big thanks to PunkTuReD for helping write/edit it and being a test subject.

 Respond  
Aucun50   -  Jan 03, 2009

Basically it need more work, and i will get to it thank you for pointing those out.

 Respond  
PuNkTuReD   -  Jan 02, 2009

also none of this will work if your trying to use actual levels
like /auser
in this snippet you are using variables, and i dont see anywhere to add a nick to said variable

 Respond  
PuNkTuReD   -  Jan 02, 2009

i didnt notice b4 but

 if ($1 == !Start) && (!owner) {

should be

 if ($1 == !Start) && (!%owner) {

and

To get started type:
!start or !owner

should be

To get started type:
!start

 Respond  
Aucun50   -  Jan 02, 2009

Ok i made the update from scratch, so i don't see why i would need any URL's?

 Respond  
sercan386   -  Jan 02, 2009

Quote:

• Must include URL to original script or snippet if you did not build it from scratch.

http://www.hawkee.com/snippet/2846/
:o still not!

 Respond  
Bullet_Dodger   -  Jan 02, 2009

Mountaindew Said:
Dec 16th

Quote:

• Must include URL to original script or snippet if you did not build it from scratch.

http://www.hawkee.com/snippet/2846/

I still dont see credz or Urls

 Respond  
Aucun50   -  Jan 02, 2009

Big Update edited by PunkTuReD.

 Respond  
guest598594   -  Dec 17, 2008

You can edit your original code btw.

 Respond  
pwnisher3   -  Dec 17, 2008

umm try this

on *:connect: { 
  msg nickserv identify %passw
  join #%urchan
}
on *:Text:!(your bot) start (name of script) (name of script)*:#:{
  if ($nick == your nick ) {
    load -rs $3 $+ .(format)
    load -rs $4 $+ .(format)
    /msg $chan %urchan loaded
  }
}

New script.

on owner:TEXT:*:#: {
  if ($1 == !v) mode $chan +v $2 
  if ($1 == !h) mode $chan +h $2 
  if ($1 == !op) mode $chan +o $2
  if ($1 == !a) mode $chan +a $2
  if ($1 == !q) mode $chan +q $2
  if ($1 == !ban) mode $chan +b $2
  if ($1 == !unban) mode $chan -b $2
  if ($1 == !owner) { auser owner $2 | msg $chan 14Added $2 as Bot Owner, Type !owners commands }
  if ($1 == !delowner) { ruser owner $2 | msg $chan 14Deleted $2 as Bot Owner }
  if ($1 == !master) { auser master $2 | msg $chan 14Added $2 as Bot Master, Type !masters commads }
  if ($1 == !delmaster) { ruser master $2 | msg $chan 14Deleted $2 as Bot Master }
  if ($1 == !user) { auser user $2 | msg $chan 14Added $2 as Bot User, Type !users commands }
  if ($1 == !deluser) { ruser user $2 | msg $chan 14Deleted $2 as Bot User }
  if ($1 == !shit) { auser shit $2 | msg $chan 14Added $2 to the Shitlist by $nick | kick $chan $2 Shitlisted by $nick }
  if ($1 == !delshit) { ruser shit $2 | msg $chan 14Deleted $2 From Shitlist by $nick }
  if ($1 == !join) /join $2
  if ($1 == !part) /part $2
}
)
on master:TEXT:*:#: {
  if ($1 == !v) mode $chan +v $2 
  if ($1 == !h) mode $chan +h $2 
  if ($1 == !op) mode $chan +o $2
  if ($1 == !a) mode $chan +a $2
  if ($1 == !ban) mode $chan +b $2
  if ($1 == !unban) mode $chan -b $2
  if ($1 == !join) /join $2
  if ($1 == !part) /part $2
}
)
on user:TEXT:*:#: {
  if ($1 == !v) mode $chan +v $2 
  if ($1 == !h) mode $chan +h $2 
}
)
on shit:JOIN:#:{ /kick # $nick Shitlisted!
}

New script.

on *:JOIN:#: {
  if ($chan == %urchanl) {
    msg $chan Hello, $nick 
    mode $chan +v $nick
  }
}
menu * {
  Set
  .Your Channel: set %urchan $1 $$?=" what is your channel?"
  .your NS password: set %passw $1 $$?="what is your NS password?"
}
on *:TEXT:!Help:#: {
  notice $nick If your looking for commands type !commands, if your looking to ask something contact $me
}
on *:TEXT:!commands:#: {
  notice $nick If you are a user/master/owner of $me tpye !user commands,!master commands,!owner commands.
}
on *:TEXT:!user commands:#:{
  notice $nick User's commands are !v, !h
}
on *:TEXT:!master commands:#:{
  notice $nick Master's commands are !v, !h, !op, !a, !ban, !unban, !join, !part
}
on *:TEXT:!owner commands:#:{
  notice $nick Owner's commands are !v, !h, !op, !a, !q, !ban, !unban, !join, !part, !shit, !delshit
}
 Respond  
Aucun50   -  Dec 16, 2008

Sorry didn't know i needed the URL's, i used idea from other scripts.

Thanks for the tip Neptune didn't know i could do that.

 Respond  
^Neptune   -  Dec 16, 2008

Also, why not create a new directory and download a new mIRC? Then, all the bot scripts will stay on that mIRC and your own will stay as is.

 Respond  
guest598594   -  Dec 16, 2008

• Must include URL to original script or snippet if you did not build it from scratch.

http://www.hawkee.com/snippet/2846/

 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.