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! }
}
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:
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 )
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.