# # Restaurant script (English) # for Yakkey v1.0 # # $Id: restaurant.script,v 1.22 2001/06/08 07:37:45 jani Exp $ # $Revision: 1.22 $ # # by Jani Patokallio # Copyright 2000-2001 the University of Tokyo # script.title= Restaurant script.version= 1.0 script.init= Goto setup ## ## SUBROUTINES ## ## ## RESTAURANT SCRIPT ## setup.init= Set diet_meat YES; Set diet_fish YES; Set diet_eggs YES; Set diet_milk YES; Set drink water; Set price 2000; Set opt_intro NO; Goto macro type; macro.init= Set NOP \ Pause Sorry, not implemented yet

press any button to continue; Set LEFT SELECT ; Set RIGHT CANCEL ; Goto $1; # Select restaurant type.title=What kind of restaurant are you going to? type.action= Ramen noodle shop (Set restaurant ramen ; Goto meal_ramen_start) Other / unknown (Set restaurant generic ; Goto meal) # Select meal type meal.title=Select meal type: meal.action=\ Breakfast ($NOP)\ Lunch/Dinner (Goto meal_dinner)\ Coffee/Tea ($NOP)\ Drink only ($NOP)\ _BACK (Sub _ABORT) meal_dinner.title=Select dinner: meal_dinner.action=\ Set menu (Set meal teishoku;\ Goto config)\ Chef's choice (Set meal susume;\ Goto config) # Ramen menu meal_ramen_start.init= Set meal shoyu ; Set meal_desc "soy broth"; Set opt_gyoza NO ; Set opt_chahan NO ; Set drink water ; Goto meal_ramen ; meal_ramen.title=Select an item to change it: meal_ramen.action= Ramen: $meal [$meal_desc] (Goto meal_ramen_type) Drink: $drink (Goto drink) Fried rice? $opt_chahan (Toggle opt_chahan) Gyoza dumplings? $opt_gyoza (Toggle opt_gyoza) Ready! (Goto review) meal_ramen_type.title=Select your noodles: meal_ramen_type.action= Shio [salt] (Set meal shio; Set meal_desc salt broth; Goto $0) Shoyu [soy] (Set meal shoyu; Set meal_desc soy broth; Goto $0) Miso (Set meal miso; Set meal_desc -; Goto $0) Local special (Set meal special; Set meal_desc - ; Goto $0) Select from display (Set meal select; Set meal_desc - ; Goto $0) # Configuration main menu config.title=Select an item to change it! config.action= Drink: $drink (Goto drink) Price limit: $price (Goto price) Diet restrictions (Goto diet) Options (Goto options) Ready! (Goto review) _BACK (Goto meal) # Drink selection drink.title=Choose a drink drink.action=\ Water (Set drink water; Goto $0) Beer (Set drink beer; Goto $0) Saké (Set drink sake; Goto $0) Coffee (Set drink coffee; Goto $0) Other ($NOP) # Configure dietary restrictions diet.title=Which are OK? diet.action=\ Meat: $diet_meat (Toggle diet_meat)\ Fish: $diet_fish (Toggle diet_fish)\ Eggs: $diet_eggs (Toggle diet_eggs)\ Milk: $diet_milk (Toggle diet_milk)\ Return (Goto $0) # Configure price limits price.title=Current limit: $price price.action=\ Up to 1000 yen (Set price 1000)\ Up to 2000 yen (Set price 2000)\ Up to 5000 yen (Set price 5000)\ No limit (Set price unlimited)\ Return (Goto config) # Configure misc. options options.title=Program options options.action=\ Play intro: $opt_intro (Toggle opt_intro)\ Return (Goto config) # # # review.init=Pause Please confirm your order.

Meal - $meal

Budget - $price yen

Play intro? - $opt_intro

$LEFT to continue

$RIGHT to go back ; FALSE : Goto config ; Goto intro ; # # Introduction # # Ask user whether introduction should be shown; # if yes, play introduction sample and invoke yes/no subroutine, # if no, go straight to main menu intro.init= Pause Please enter the restaurant now.

Press $LEFT \ when the staff is ready to take your order. ; Goto order1 ; # # introduce; state meal type; diet restrictions; price restrictions # order1.init=\ Blank Introducing myself...; $opt_intro == NO : Goto order2; Play intro ask-ok; Pause -add $LEFT to proceed

$RIGHT to repeat; FALSE : Goto order1; Goto order2; order2.init= Blank Requesting meal...; $restaurant == ramen : Goto order2_ramen ; Sub check_diet; Sub check_budget; Pause -add $LEFT to proceed

$RIGHT to repeat; FALSE : Play meal_else; FALSE : Goto order2; Play meal_ok; Goto order3; order2_ramen.init= $opt_gyoza == YES : Play meal_ramen_gyoza; $opt_chahan == YES : Play meal_ramen_chahan; Play meal_ramen_$meal; Pause -add $LEFT to proceed

$RIGHT to repeat; FALSE : Goto order2_ramen; Goto order3; order3.init= $drink == water : Goto eating; Blank Ordering drink...; Play drink_start drink_$drink; Pause -add $LEFT to proceed

$RIGHT to repeat; FALSE : Goto order3; Goto eating; # # Recite any dietary restrictions # check_diet.init=\ Blank "Dietary restrictions..."; $diet_meat == YES && $diet_fish == YES && \ $diet_eggs == YES && $diet_milk == YES : Resume NO ;\ Play diet_restrict ;\ $diet_meat == NO : Play diet_meat ;\ $diet_fish == NO : Play diet_fish ;\ $diet_milk == NO : Play diet_milk ;\ $diet_eggs == NO : Play diet_eggs ;\ Play diet_restok ;\ Play ask-ok ;\ Pause -add $LEFT to proceed

$RIGHT to repeat; FALSE : Goto check_diet; Resume YES; # # Recite any budget restrictions # check_budget.init= $price == unlimited : Play meal_$meal; $price != unlimited : Play budget_price_charges budget_price_$price meal_$meal; Resume YES; # # Main menu # eating.title=Enjoy your meal!

Feel free to turn off the \ display if you don't need it right now. eating.action= Check, please (Goto check) Where's the toilet? (Sub toilet) Order more ($NOP) Complain ($NOP) toilet.init= Blank Ready to ask for bathroom ; Pause -add $LEFT if the waiter is here,

$RIGHT to call for a waiter; TRUE : Goto toilet2 ; Sub call_waiter ; Goto toilet ; toilet2.init= Blank Asking for bathroom... ; Play toilet_where; Resume; check.init= Blank Time to ask for the bill! ; Pause -add $LEFT if the waiter is here,

$RIGHT to call for a waiter; TRUE : Goto check2 ; Sub call_waiter; Goto check ; check2.init= Blank Asking for the check... ; Play check_please; Blank How does the bill look? ; Pause -add $LEFT if OK,
$RIGHT if there's a problem ; FALSE : Goto check_problem ; Blank Giving thanks... ; Play check_thanks ; Load index.script # Exit ## ## Subroutines ## # Call the waiter call_waiter.init= Blank Calling waiter... ; Play call_waiter ; Resume YES # # "-g test" to jump over the configuration stage... # test.init= Set diet_meat YES; Set diet_fish NO; Set diet_eggs NO; Set diet_milk NO; Set price 1000; Set opt_intro YES; Set restaurant generic; Set meal teishoku; Set drink water; Pause Press a button to start test; Goto macro order1;