Chocolate Pie's mIRC Cafe Snippet!

By chocolate_pie on Sep 26, 2007

This is my first script yay. I got the format from http://www.hawkee.com/snippet/3142/ because I was a bit confused about the beginning of the script. Anyway, all you have to do is click the "Send Snippet to Clipboard" button below, then paste in into the remotes section of your script editor. All you need to do is type !menu and you will see all of the different foods your bot has to offer. Have fun and happy eating! I also added a script that kicks on command, your bot must be an operator to kick people. Command is !trix and it kicks you with a silly message, "Silly rabbit, Trix are for kids!"

ON *:text:*:#:{
  if ($1 == !Pizza) { msg $chan $me hands $nick a plain 8,4pizza. }
  if ($1 == !Pepperoni) { msg $chan $me hands $nick a 4,7pepperoni pizza. }
  if ($1 == !Sausage) { msg $chan $me hands $nick an 7,9Italian sausage pizza. }
  if ($1 == !Hotdog) { msg $chan $me hands $nick a yummy 5,7hot dog. }
  if ($1- == !Nachos) { msg $chan $me hands $nick a plate full of 8,7nachos. }
  if ($1 == !Taco) { msg $chan $me hands $nick a delicious 9,4taco. }
  if ($1 == !Burrito) { msg $chan $me hands $nick a steaming hot 12,7burrito. }
  if ($1 == !Pasta) { msg $chan $me hands $nick a bowl of 8,4spaghetti. }
  if ($1 == !Frenchfries) { msg $chan $me hands $nick a plate of 8,2french fries. }
  if ($1- == !Burger) { msg $chan $me hands $nick a big, juicy 4,11hamburger. }
  if ($1 == !Pancakes) { msg $chan $me hands $nick a big plate of 3,8pancakes. }
  if ($1 == !Waffles) { msg $chan $me hands $nick a plate full of 6,14waffles. }
  if ($1 == !Cake) { msg $chan $me hands $nick a big, yummy, 15,4cake! }
  if ($1 == !Cupcake) { msg $chan $me hands $nick a little 5,4cupcake. }
  if ($1 == !Chocolatecake) { msg $chan $me hands $nick a big, yummy, 15,4cake1,0, coated with 14,5CHOCOLATE! }
  if ($1- == !Poptart) { msg $chan $me hands $nick a boring, old 0,4Pop Tart. }
  if ($1 == !Icecream) { msg $chan $me hands $nick a big bowl of 0,1ice cream! }
  if ($1 == !csyrup) { msg $chan $me hands $nick a bottle of 14,5chocolate syrup. }
  if ($1 == !msyrup) { msg $chan $me hands $nick a bottle of 5,1maple syrup. }
  if ($1 == !ketchup) { msg $chan $me hands $nick a bottle of 4,14ketchup. }
  if ($1 == !mustard) { msg $chan $me hands $nick a bottle of 15,7mustard. }
  if ($1 == !salt) { msg $chan $me hands $nick a shaker full of 14,0salt. }
  if ($1 == !pepper) { msg $chan $me hands $nick a shaker full of 1,14pepper. }
  if ($1 == !menu) { msg $chan $me hands $nick the menu- 0,3ToastBot's Menu!-4,12 !Pizza !Pepperoni !Sausage !Hotdog !Nachos !Taco !Burrito !Pasta !Frenchfries !Burger !Pancakes !Waffles !Cake !Cupcake !Chocolatecake !Poptart. 0,3Toppings-11,5 !csyrup !msyrup !ketchup !mustard !salt !pepper }
  if ($1 == !trix) { .kick $chan $nick Silly rabbit, Trix are for kids! }
}

Comments

Sign in to comment.
Ghost-writer   -  Nov 14, 2009

But your pie was so good :<. Bringing back dead codes around the world i am :>! & lol @ hawkee!

 Respond  
chocolate_pie   -  Oct 06, 2007

heh... yeah I guess a made a few mistakes. But I told you I\'m only just starting scripting. I\'ll change that now...

 Respond  
guest598594   -  Oct 01, 2007

wait, nvm

 Respond  
guest598594   -  Oct 01, 2007

is there a diff between $v1 and $1?

 Respond  
Akishoot   -  Sep 29, 2007
  if ($1 == !trix) { msg .kick $chan $nick Silly rabbit, Trix are for kids! }
}

Should be:

  if ($1 == !trix) { .kick $chan $nick Silly rabbit, Trix are for kids! }
}

Although I do think RubixCube already pointed this out...

 Respond  
Akishoot   -  Sep 29, 2007

You\'re welcome. =)

 Respond  
RubixCube   -  Sep 29, 2007

Ah I see, thank you Akishoot.

 Respond  
Akishoot   -  Sep 29, 2007

@ RubixCube - You can use [.code] and [./code] to bring up boxes to put sections of script in. (Remove the .\'s.]

Example:

menu nicklist {
  Wave:.msg $active waves at $$1 $+ .
}
 Respond  
RubixCube   -  Sep 29, 2007

In the \'if you are a bit misunderstood\' I meant if you misunderstand by the way.

 Respond  
RubixCube   -  Sep 29, 2007

I have no idea what you are trying to accomplish in the !trix part of the snippet. If you are trying to kick the user, remove the msg command. If you are trying to msg the user remove the .kick command and parameters.

I give you credit for this being your first script, but I have to be the critic that I am when saying this: the script is not that efficient. I wouldn\'t take that a bad way, just a way to improve the snippet and your future scripts. Here are my suggestions:

  • As a simple coding tip, if you have an if event w/ one line, remove the brackets.
  • Perhaps make this an ini/txt file and have the ability to add or remove menu items. Here is a sample of what I am talking about if you are a bit misunderstood:

on :TEXT:!serve:#:{
if ($1) {
; checks if the item is specified
if ($2) {
; checks if the recipient is specified
if ($read(menu.txt,$v1)) msg $chan $nick serves $2 $v1
; reads the text file for the item
}
}
}

on :TEXT:!additem:#:{
if ($1) {
; checks if the item is specified
if (!$read(menu.txt,$v1)) {
; checks if the item isn\'t in the menu already
if ($2) {
; checks if the price is specified
write menu.txt $1 $2
; writes the item and price into the text file
}
}
}
}

( the same applies for the !delitem event if included )

  • Add accounts while we are on the topic of prices. This can be stored in an ini file. /help /writeini and $readini.

I hope my mini-tutorial has helped. And if anyone can tell me a command that doesn\'t ruin the format of the events, that would really be great.

 Respond  
chocolate_pie   -  Sep 29, 2007

No, I\'m not.
Anyway, I added a !trix thing if you type it you get kicked and it says \"Silly rabbit, Trix are for kids!\" heheh

 Respond  
guest598594   -  Sep 26, 2007

i believe ur missin a } at the end

 Respond  
chocolate_pie   -  Sep 26, 2007

If you have anything to suggest I put on the menu, I will happilly edit to whatever you want, as long as it\'s not too stupid.

 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.