Jethro commented on a Page, iKnown>> Juice Bar  -  Jul 17, 2010

All you need is one text event. For !jb applejuice and !jb orangejuice, they have the exact, same message, the orange juice should have been "orange juice." Finally, you need a trigger control so that the client running the code doesn't get spammed or flooded.

This is my method, which saves quite a few bytes compared to BrandinA's:

on $*:text:/^!jb (sprite|pepsi|beer|drink|tea|lemonade|share|(apple|orange|promegrant)juice)\b/iS:#:{
  if !%f {
    inc -u4 %f
    goto $regml(1)
    :sprite
    msg # Sure sir; That'll be 3.50.
    describe # mixes the drink.
    halt
    :pepsi
    msg # Sure sir; That'll be 3.50.
    describe # mixes the drink.
    halt
    :beer
    msg # Sure sir; That'll be 4.50.
    describe # gets the beer out of the fridge.
    halt
    :applejuice
    msg # Sure sir; That'll be 2.50.
    describe # gets a bottle of Apple Juice.
    halt
    :orangejuice
    msg # Sure sir; That'll be 2.50.
    describe # gets a bottle of Orange Juice.
    :drink
    msg # Sure sir; your $2- shall be 1.00 per ingredient.
    describe # gets everything out and mixes everything.
    halt
    :pomegrantjuice
    msg # Sure sir; that comes to a total of 4.50.
    describe # gets everything mixed.
    halt
    :tea
    msg # With milk, thats 2.50; Without, its 2.00.
    describe # gets the tea ready!
    halt
    :lemonade
    msg # Thats 2.40.
    describe # gets the juice container with lemonade out.
    describe # pours the lemonade into a glass.
    halt
    :share
    describe # hands some of the $4- to $3.
    msg # Like it?
    halt
  }
}
 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.