Home » Archimedes archive » Acorn User » AU 1998-08.adf » Freeware » PD/IntFiction/DavidRPG2/!DavidRPG2/Docs/Example3
PD/IntFiction/DavidRPG2/!DavidRPG2/Docs/Example3
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1998-08.adf » Freeware |
Filename: | PD/IntFiction/DavidRPG2/!DavidRPG2/Docs/Example3 |
Read OK: | ✔ |
File size: | 1EBC bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
| Example Game | David Spence, 1998. name = Town adventure = Another Example author = Daivd Spence, 1998 version = 0.01 (26 Mar 1998) | Player/Plot player { name: "Daniel Jork" text: "" "You are in the small village of Waterbridge." "You have been given �100 but you must spend it all today." "Your mission is to spend the money then go home." } variable money = 100 variable how_much = 0 room home start { name: "Your House" text: "You are in you house." "To the south is you front door." enter: { if (money="0") { print("Well done you have completed the game.\n") } } south: goto(street_1) } room street_1 { name: "The main street" text: "You are outside house." "To the north is you front door." "The street continues to the east. "To the west and north are houses." north: goto(home) east: goto(street_2) } room street_2 { name: "The main street" text: "You are in the main shopping precinct." "There is a newsagents to the north" "and a post office to the south." "The street continues to the east and to the west." north: goto(shop_1) south: goto(shop_2) east: goto(street_3) west: goto(street_1) } room street_3 { name: "The main street" text: "You are in the main shopping precinct." "There is a pub to the south, a police station to" "the north and a book shop to the east." "The street continues to the west." north: goto(shop_5) west: goto(street_2) south: goto(shop_3) east: goto(shop_4) } | ****************** Newsagents ******************** room shop_1 { name: "The Newsagents" text: "You are standing in a small newsagents, there are:" "Papers, magazines, sweets and wooly hats here." "There is an old lady serving at the counter." people: newsagent south: goto(street_2) } person newsagent { name: "The newsagent" text: "She is an old lady who has been working in this shop" "all her life." see: print("The lady says: 'What would you like?'.\n") unsee: print("The lady says: 'Thank You, Goodbye'.\n") talk: { "paper newspaper":{ if(ob_got="newspaper") { print("Sorry, we are sold out.\n") } if(ob_got<>"newspaper") { print("That would be �1.\n") change(money,-1) print("You have: �") print(money) print(" left.") give(player,newspaper) } } "hat wooly":{ if(ob_got="hat") { print("Sorry, we are sold out.\n") } if(ob_got<>"hat") { print("That would be �19.\n") change(money,-19) print("You have: �") print(money) print(" left.") give(player,hat) } } "sweets sweet bar chocolate":{ if(ob_got="chocolate") { print("Sorry, we are sold out.\n") } if(ob_got<>"chocolate") { print("That would be �1.\n") change(money,-1) print("You have: �") print(money) print(" left.") give(player,chocolate) } } "magazine Acorn User mag":{ if(ob_got="magazine") { print("Sorry, we are sold out.\n") } if(ob_got<>"magazine") { print("That would be �4.\n") change(money,-4) print("You have: �") print(money) print(" left.") give(player,magazine) } } } } object newspaper { name: "newspaper" text: "Its Todays Daily Telegraph." move: yes } object hat { name: "hat" text: "It's a bright Purple Wooly hat." move: yes } object chocolate { name: "chocolate" text: "It's a Bar of Dairy Milk Chocolate." move: yes } object magazine { name: "magazine" text: "It's this months Acorn User." move: yes } | ************************ Post Office ********************** room shop_2 { name: "The Post Office" text: "You are standing in a small post office, there are:" "Stamps, Enverlopes, Hat stands and Calanders here." "There is an old lady serving at the counter." people: post_office_person north: goto(street_2) } person post_office_person { name: "The Post office Clerk" text: "He is big man who does not like people making problems." see: print("The man says: 'Yes, What would you like?'.\n") talk: { "Calander":{ if(ob_got="calander") { print("Sorry, we are sold out.\n") } if(ob_got<>"calender") { print("That would be �5.\n") change(money,-5) print("You have: �") print(money) print(" left.") give(player,calender) } } "hat stand hatstand":{ if(ob_got="hatstand") { print("Sorry, we are sold out.\n") } if(ob_got<>"hatstand") { print("That would be �25.\n") change(money,-25) print("You have: �") print(money) print(" left.") give(player,hatstand) } } "enverlope enverlopes":{ if(ob_got="enverlopes") { print("Sorry, we are sold out.\n") } if(ob_got<>"enverlopes") { print("That would be �3.\n") change(money,-3) print("You have: �") print(money) print(" left.") give(player,enverlopes) } } "Stamp stamps":{ if(ob_got="stamps") { print("Sorry, we are sold out.\n") } if(ob_got<>"stamps") { print("That would be �4.\n") change(money,-4) print("You have: �") print(money) print(" left.") give(player,stamps) } } } } object calender { name: "calender" text: "Its 1987s calender, you think you've been riped off." move: yes } object hatstand { name: "hatstand" text: "It's a bright yellow hatstand." move: yes } object stamps { name: "stamps" text: "They are 20 20p stamps." move: yes } object enverlopes { name: "enverlopes" text: "You have 200 small white enverlopes." move: yes } | ********************* Pub *************** room shop_3 { name: "The Pub" text: "You are standing in a pub, which is about the size" "of your bathroom, there is only Ammerican Beer!" people: bar_maid north: goto(street_3) leave: { if(how_much>"6") { print("You are a bit jolly and as the pub is opposite the nick,\n") print("your arrested and you fail your mission.\n") end() } } } person bar_maid { name: "The bar maid" text: "She is very tall and about 90 years old." see: print("The lady says: 'What will it be then, Dan?'.\n") talk: { "beer pint":{ print("That would be �1.\n") print("You have a very satisfying pint of beer.\n") change(money,-1) print("You have: �") print(money) print(" left.\n") change(how_much,1) } } } | ************************ Book Shop ********************** room shop_4 { name: "The Book shop" text: "You are standing in a small book shop, there is" "only two books: 'How to destroy PCs' and" "'1001 ways to impress your boss'." "There is an old man serving at the counter." people: book_shop_keeper west: goto(street_2) } person book_shop_keeper { name: "The Book seller" text: "He is fail old man who you everyone keeps away from." see: print("The man says: 'Yes, What would you like?'.\n") talk: { "How to destroy PCs PC":{ if(ob_got="PC book") { print("Sorry, we are sold out.\n") } if(ob_got<>"PC book") { print("That would be �13.\n") change(money,-13) print("You have: �") print(money) print(" left.") give(player,pc_book) } } "1001 ways to impress your boss":{ if(ob_got="1001 book") { print("Sorry, we are sold out.\n") } if(ob_got<>"1001 book") { print("That would be �25.\n") change(money,-25) print("You have: �") print(money) print(" left.") give(player,1001_book) } } } } object pc_book { name: "PC book" text: "Its a book on how to hit PCs with sledgehammers!" move: yes } object 1001_book { name: "1001 book" text: "'1001 ways to impress your boss'" "Huh, it only has 20 pages, full of references to other books!" move: yes } | ********************* police station ************** room shop_5 { name: "Police Station" text: "You are standing in a small country poilce station." "No one is in." south: goto(street_3) }
00000000 7c 20 45 78 61 6d 70 6c 65 20 47 61 6d 65 0a 7c || Example Game.|| 00000010 20 44 61 76 69 64 20 53 70 65 6e 63 65 2c 20 31 | David Spence, 1| 00000020 39 39 38 2e 0a 0a 6e 61 6d 65 20 3d 20 54 6f 77 |998...name = Tow| 00000030 6e 0a 61 64 76 65 6e 74 75 72 65 20 3d 20 41 6e |n.adventure = An| 00000040 6f 74 68 65 72 20 45 78 61 6d 70 6c 65 0a 61 75 |other Example.au| 00000050 74 68 6f 72 20 3d 20 44 61 69 76 64 20 53 70 65 |thor = Daivd Spe| 00000060 6e 63 65 2c 20 31 39 39 38 0a 76 65 72 73 69 6f |nce, 1998.versio| 00000070 6e 20 3d 20 30 2e 30 31 20 28 32 36 20 4d 61 72 |n = 0.01 (26 Mar| 00000080 20 31 39 39 38 29 0a 0a 7c 20 50 6c 61 79 65 72 | 1998)..| Player| 00000090 2f 50 6c 6f 74 0a 0a 70 6c 61 79 65 72 20 7b 0a |/Plot..player {.| 000000a0 6e 61 6d 65 3a 20 22 44 61 6e 69 65 6c 20 4a 6f |name: "Daniel Jo| 000000b0 72 6b 22 0a 74 65 78 74 3a 20 22 22 0a 20 20 20 |rk".text: "". | 000000c0 20 20 20 22 59 6f 75 20 61 72 65 20 69 6e 20 74 | "You are in t| 000000d0 68 65 20 73 6d 61 6c 6c 20 76 69 6c 6c 61 67 65 |he small village| 000000e0 20 6f 66 20 57 61 74 65 72 62 72 69 64 67 65 2e | of Waterbridge.| 000000f0 22 0a 20 20 20 20 20 20 22 59 6f 75 20 68 61 76 |". "You hav| 00000100 65 20 62 65 65 6e 20 67 69 76 65 6e 20 a3 31 30 |e been given .10| 00000110 30 20 62 75 74 20 79 6f 75 20 6d 75 73 74 20 73 |0 but you must s| 00000120 70 65 6e 64 20 69 74 20 61 6c 6c 20 74 6f 64 61 |pend it all toda| 00000130 79 2e 22 0a 20 20 20 20 20 20 22 59 6f 75 72 20 |y.". "Your | 00000140 6d 69 73 73 69 6f 6e 20 69 73 20 74 6f 20 73 70 |mission is to sp| 00000150 65 6e 64 20 74 68 65 20 6d 6f 6e 65 79 20 74 68 |end the money th| 00000160 65 6e 20 67 6f 20 68 6f 6d 65 2e 22 0a 7d 0a 0a |en go home.".}..| 00000170 76 61 72 69 61 62 6c 65 20 6d 6f 6e 65 79 20 20 |variable money | 00000180 3d 20 20 20 20 20 31 30 30 0a 0a 76 61 72 69 61 |= 100..varia| 00000190 62 6c 65 20 68 6f 77 5f 6d 75 63 68 20 3d 20 30 |ble how_much = 0| 000001a0 0a 0a 72 6f 6f 6d 20 68 6f 6d 65 20 73 74 61 72 |..room home star| 000001b0 74 20 7b 0a 6e 61 6d 65 3a 20 22 59 6f 75 72 20 |t {.name: "Your | 000001c0 48 6f 75 73 65 22 0a 74 65 78 74 3a 20 22 59 6f |House".text: "Yo| 000001d0 75 20 61 72 65 20 69 6e 20 79 6f 75 20 68 6f 75 |u are in you hou| 000001e0 73 65 2e 22 0a 20 20 20 20 20 20 22 54 6f 20 74 |se.". "To t| 000001f0 68 65 20 73 6f 75 74 68 20 69 73 20 79 6f 75 20 |he south is you | 00000200 66 72 6f 6e 74 20 64 6f 6f 72 2e 22 0a 65 6e 74 |front door.".ent| 00000210 65 72 3a 20 7b 0a 69 66 20 28 6d 6f 6e 65 79 3d |er: {.if (money=| 00000220 22 30 22 29 20 7b 0a 70 72 69 6e 74 28 22 57 65 |"0") {.print("We| 00000230 6c 6c 20 64 6f 6e 65 20 79 6f 75 20 68 61 76 65 |ll done you have| 00000240 20 63 6f 6d 70 6c 65 74 65 64 20 74 68 65 20 67 | completed the g| 00000250 61 6d 65 2e 5c 6e 22 29 0a 7d 0a 7d 0a 73 6f 75 |ame.\n").}.}.sou| 00000260 74 68 3a 20 67 6f 74 6f 28 73 74 72 65 65 74 5f |th: goto(street_| 00000270 31 29 0a 7d 0a 0a 72 6f 6f 6d 20 73 74 72 65 65 |1).}..room stree| 00000280 74 5f 31 20 7b 0a 6e 61 6d 65 3a 20 22 54 68 65 |t_1 {.name: "The| 00000290 20 6d 61 69 6e 20 73 74 72 65 65 74 22 0a 74 65 | main street".te| 000002a0 78 74 3a 20 22 59 6f 75 20 61 72 65 20 6f 75 74 |xt: "You are out| 000002b0 73 69 64 65 20 68 6f 75 73 65 2e 22 0a 20 20 20 |side house.". | 000002c0 20 20 20 22 54 6f 20 74 68 65 20 6e 6f 72 74 68 | "To the north| 000002d0 20 69 73 20 79 6f 75 20 66 72 6f 6e 74 20 64 6f | is you front do| 000002e0 6f 72 2e 22 0a 20 20 20 20 20 20 22 54 68 65 20 |or.". "The | 000002f0 73 74 72 65 65 74 20 63 6f 6e 74 69 6e 75 65 73 |street continues| 00000300 20 74 6f 20 74 68 65 20 65 61 73 74 2e 0a 20 20 | to the east.. | 00000310 20 20 20 20 22 54 6f 20 74 68 65 20 77 65 73 74 | "To the west| 00000320 20 61 6e 64 20 6e 6f 72 74 68 20 61 72 65 20 68 | and north are h| 00000330 6f 75 73 65 73 2e 22 20 0a 6e 6f 72 74 68 3a 20 |ouses." .north: | 00000340 67 6f 74 6f 28 68 6f 6d 65 29 0a 65 61 73 74 3a |goto(home).east:| 00000350 20 20 67 6f 74 6f 28 73 74 72 65 65 74 5f 32 29 | goto(street_2)| 00000360 0a 7d 0a 0a 72 6f 6f 6d 20 73 74 72 65 65 74 5f |.}..room street_| 00000370 32 20 7b 0a 6e 61 6d 65 3a 20 22 54 68 65 20 6d |2 {.name: "The m| 00000380 61 69 6e 20 73 74 72 65 65 74 22 0a 74 65 78 74 |ain street".text| 00000390 3a 20 22 59 6f 75 20 61 72 65 20 69 6e 20 74 68 |: "You are in th| 000003a0 65 20 6d 61 69 6e 20 73 68 6f 70 70 69 6e 67 20 |e main shopping | 000003b0 70 72 65 63 69 6e 63 74 2e 22 0a 20 20 20 20 20 |precinct.". | 000003c0 20 22 54 68 65 72 65 20 69 73 20 61 20 6e 65 77 | "There is a new| 000003d0 73 61 67 65 6e 74 73 20 74 6f 20 74 68 65 20 6e |sagents to the n| 000003e0 6f 72 74 68 22 0a 20 20 20 20 20 20 22 61 6e 64 |orth". "and| 000003f0 20 61 20 70 6f 73 74 20 6f 66 66 69 63 65 20 74 | a post office t| 00000400 6f 20 74 68 65 20 73 6f 75 74 68 2e 22 0a 20 20 |o the south.". | 00000410 20 20 20 20 22 54 68 65 20 73 74 72 65 65 74 20 | "The street | 00000420 63 6f 6e 74 69 6e 75 65 73 20 74 6f 20 74 68 65 |continues to the| 00000430 20 65 61 73 74 20 61 6e 64 20 74 6f 20 74 68 65 | east and to the| 00000440 20 77 65 73 74 2e 22 0a 6e 6f 72 74 68 3a 20 67 | west.".north: g| 00000450 6f 74 6f 28 73 68 6f 70 5f 31 29 0a 73 6f 75 74 |oto(shop_1).sout| 00000460 68 3a 20 67 6f 74 6f 28 73 68 6f 70 5f 32 29 0a |h: goto(shop_2).| 00000470 65 61 73 74 3a 20 20 67 6f 74 6f 28 73 74 72 65 |east: goto(stre| 00000480 65 74 5f 33 29 0a 77 65 73 74 3a 20 20 67 6f 74 |et_3).west: got| 00000490 6f 28 73 74 72 65 65 74 5f 31 29 0a 7d 0a 0a 72 |o(street_1).}..r| 000004a0 6f 6f 6d 20 73 74 72 65 65 74 5f 33 20 7b 0a 6e |oom street_3 {.n| 000004b0 61 6d 65 3a 20 22 54 68 65 20 6d 61 69 6e 20 73 |ame: "The main s| 000004c0 74 72 65 65 74 22 0a 74 65 78 74 3a 20 22 59 6f |treet".text: "Yo| 000004d0 75 20 61 72 65 20 69 6e 20 74 68 65 20 6d 61 69 |u are in the mai| 000004e0 6e 20 73 68 6f 70 70 69 6e 67 20 70 72 65 63 69 |n shopping preci| 000004f0 6e 63 74 2e 22 0a 20 20 20 20 20 20 22 54 68 65 |nct.". "The| 00000500 72 65 20 69 73 20 61 20 70 75 62 20 74 6f 20 74 |re is a pub to t| 00000510 68 65 20 73 6f 75 74 68 2c 20 61 20 70 6f 6c 69 |he south, a poli| 00000520 63 65 20 73 74 61 74 69 6f 6e 20 74 6f 22 0a 20 |ce station to". | 00000530 20 20 20 20 20 22 74 68 65 20 6e 6f 72 74 68 20 | "the north | 00000540 61 6e 64 20 61 20 62 6f 6f 6b 20 73 68 6f 70 20 |and a book shop | 00000550 74 6f 20 74 68 65 20 65 61 73 74 2e 22 0a 20 20 |to the east.". | 00000560 20 20 20 20 22 54 68 65 20 73 74 72 65 65 74 20 | "The street | 00000570 63 6f 6e 74 69 6e 75 65 73 20 74 6f 20 74 68 65 |continues to the| 00000580 20 77 65 73 74 2e 22 0a 6e 6f 72 74 68 3a 20 67 | west.".north: g| 00000590 6f 74 6f 28 73 68 6f 70 5f 35 29 0a 77 65 73 74 |oto(shop_5).west| 000005a0 3a 20 20 67 6f 74 6f 28 73 74 72 65 65 74 5f 32 |: goto(street_2| 000005b0 29 0a 73 6f 75 74 68 3a 20 67 6f 74 6f 28 73 68 |).south: goto(sh| 000005c0 6f 70 5f 33 29 0a 65 61 73 74 3a 20 20 67 6f 74 |op_3).east: got| 000005d0 6f 28 73 68 6f 70 5f 34 29 0a 7d 0a 20 20 20 0a |o(shop_4).}. .| 000005e0 7c 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a || **************| 000005f0 2a 2a 2a 2a 20 4e 65 77 73 61 67 65 6e 74 73 20 |**** Newsagents | 00000600 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000610 2a 2a 2a 2a 0a 20 20 20 20 20 20 20 20 20 20 20 |****. | 00000620 20 20 20 20 0a 72 6f 6f 6d 20 73 68 6f 70 5f 31 | .room shop_1| 00000630 20 7b 0a 6e 61 6d 65 3a 20 22 54 68 65 20 4e 65 | {.name: "The Ne| 00000640 77 73 61 67 65 6e 74 73 22 0a 74 65 78 74 3a 20 |wsagents".text: | 00000650 22 59 6f 75 20 61 72 65 20 73 74 61 6e 64 69 6e |"You are standin| 00000660 67 20 69 6e 20 61 20 73 6d 61 6c 6c 20 6e 65 77 |g in a small new| 00000670 73 61 67 65 6e 74 73 2c 20 74 68 65 72 65 20 61 |sagents, there a| 00000680 72 65 3a 22 0a 20 20 20 20 20 20 22 50 61 70 65 |re:". "Pape| 00000690 72 73 2c 20 6d 61 67 61 7a 69 6e 65 73 2c 20 73 |rs, magazines, s| 000006a0 77 65 65 74 73 20 61 6e 64 20 77 6f 6f 6c 79 20 |weets and wooly | 000006b0 68 61 74 73 20 68 65 72 65 2e 22 0a 20 20 20 20 |hats here.". | 000006c0 20 20 22 54 68 65 72 65 20 69 73 20 61 6e 20 6f | "There is an o| 000006d0 6c 64 20 6c 61 64 79 20 73 65 72 76 69 6e 67 20 |ld lady serving | 000006e0 61 74 20 74 68 65 20 63 6f 75 6e 74 65 72 2e 22 |at the counter."| 000006f0 0a 70 65 6f 70 6c 65 3a 20 6e 65 77 73 61 67 65 |.people: newsage| 00000700 6e 74 0a 73 6f 75 74 68 3a 20 20 67 6f 74 6f 28 |nt.south: goto(| 00000710 73 74 72 65 65 74 5f 32 29 0a 7d 0a 0a 70 65 72 |street_2).}..per| 00000720 73 6f 6e 20 6e 65 77 73 61 67 65 6e 74 20 7b 0a |son newsagent {.| 00000730 6e 61 6d 65 3a 20 22 54 68 65 20 6e 65 77 73 61 |name: "The newsa| 00000740 67 65 6e 74 22 0a 74 65 78 74 3a 20 22 53 68 65 |gent".text: "She| 00000750 20 69 73 20 61 6e 20 6f 6c 64 20 6c 61 64 79 20 | is an old lady | 00000760 77 68 6f 20 68 61 73 20 62 65 65 6e 20 77 6f 72 |who has been wor| 00000770 6b 69 6e 67 20 69 6e 20 74 68 69 73 20 73 68 6f |king in this sho| 00000780 70 22 0a 20 20 20 20 20 20 22 61 6c 6c 20 68 65 |p". "all he| 00000790 72 20 6c 69 66 65 2e 22 0a 73 65 65 3a 20 20 20 |r life.".see: | 000007a0 70 72 69 6e 74 28 22 54 68 65 20 6c 61 64 79 20 |print("The lady | 000007b0 73 61 79 73 3a 20 27 57 68 61 74 20 77 6f 75 6c |says: 'What woul| 000007c0 64 20 79 6f 75 20 6c 69 6b 65 3f 27 2e 5c 6e 22 |d you like?'.\n"| 000007d0 29 0a 75 6e 73 65 65 3a 20 70 72 69 6e 74 28 22 |).unsee: print("| 000007e0 54 68 65 20 6c 61 64 79 20 73 61 79 73 3a 20 27 |The lady says: '| 000007f0 54 68 61 6e 6b 20 59 6f 75 2c 20 47 6f 6f 64 62 |Thank You, Goodb| 00000800 79 65 27 2e 5c 6e 22 29 20 0a 74 61 6c 6b 3a 20 |ye'.\n") .talk: | 00000810 7b 0a 20 22 70 61 70 65 72 20 6e 65 77 73 70 61 |{. "paper newspa| 00000820 70 65 72 22 3a 7b 0a 20 20 20 69 66 28 6f 62 5f |per":{. if(ob_| 00000830 67 6f 74 3d 22 6e 65 77 73 70 61 70 65 72 22 29 |got="newspaper")| 00000840 20 7b 0a 20 20 20 20 70 72 69 6e 74 28 22 53 6f | {. print("So| 00000850 72 72 79 2c 20 77 65 20 61 72 65 20 73 6f 6c 64 |rry, we are sold| 00000860 20 6f 75 74 2e 5c 6e 22 29 0a 20 20 20 7d 0a 20 | out.\n"). }. | 00000870 20 20 69 66 28 6f 62 5f 67 6f 74 3c 3e 22 6e 65 | if(ob_got<>"ne| 00000880 77 73 70 61 70 65 72 22 29 20 7b 0a 20 20 20 20 |wspaper") {. | 00000890 20 70 72 69 6e 74 28 22 54 68 61 74 20 77 6f 75 | print("That wou| 000008a0 6c 64 20 62 65 20 a3 31 2e 5c 6e 22 29 0a 20 20 |ld be .1.\n"). | 000008b0 20 20 20 63 68 61 6e 67 65 28 6d 6f 6e 65 79 2c | change(money,| 000008c0 2d 31 29 0a 20 20 20 20 20 70 72 69 6e 74 28 22 |-1). print("| 000008d0 59 6f 75 20 68 61 76 65 3a 20 a3 22 29 0a 20 20 |You have: ."). | 000008e0 20 20 20 70 72 69 6e 74 28 6d 6f 6e 65 79 29 0a | print(money).| 000008f0 20 20 20 20 20 70 72 69 6e 74 28 22 20 6c 65 66 | print(" lef| 00000900 74 2e 22 29 0a 20 20 20 20 20 67 69 76 65 28 70 |t."). give(p| 00000910 6c 61 79 65 72 2c 6e 65 77 73 70 61 70 65 72 29 |layer,newspaper)| 00000920 0a 20 20 20 7d 0a 20 7d 0a 20 22 68 61 74 20 77 |. }. }. "hat w| 00000930 6f 6f 6c 79 22 3a 7b 0a 20 20 20 69 66 28 6f 62 |ooly":{. if(ob| 00000940 5f 67 6f 74 3d 22 68 61 74 22 29 20 7b 0a 20 20 |_got="hat") {. | 00000950 20 20 70 72 69 6e 74 28 22 53 6f 72 72 79 2c 20 | print("Sorry, | 00000960 77 65 20 61 72 65 20 73 6f 6c 64 20 6f 75 74 2e |we are sold out.| 00000970 5c 6e 22 29 0a 20 20 20 7d 0a 20 20 20 69 66 28 |\n"). }. if(| 00000980 6f 62 5f 67 6f 74 3c 3e 22 68 61 74 22 29 20 7b |ob_got<>"hat") {| 00000990 0a 20 20 20 20 20 70 72 69 6e 74 28 22 54 68 61 |. print("Tha| 000009a0 74 20 77 6f 75 6c 64 20 62 65 20 a3 31 39 2e 5c |t would be .19.\| 000009b0 6e 22 29 0a 20 20 20 20 20 63 68 61 6e 67 65 28 |n"). change(| 000009c0 6d 6f 6e 65 79 2c 2d 31 39 29 0a 20 20 20 20 20 |money,-19). | 000009d0 70 72 69 6e 74 28 22 59 6f 75 20 68 61 76 65 3a |print("You have:| 000009e0 20 a3 22 29 0a 20 20 20 20 20 70 72 69 6e 74 28 | ."). print(| 000009f0 6d 6f 6e 65 79 29 0a 20 20 20 20 20 70 72 69 6e |money). prin| 00000a00 74 28 22 20 6c 65 66 74 2e 22 29 0a 20 20 20 20 |t(" left."). | 00000a10 20 67 69 76 65 28 70 6c 61 79 65 72 2c 68 61 74 | give(player,hat| 00000a20 29 0a 20 20 20 7d 0a 20 7d 0a 20 22 73 77 65 65 |). }. }. "swee| 00000a30 74 73 20 73 77 65 65 74 20 62 61 72 20 63 68 6f |ts sweet bar cho| 00000a40 63 6f 6c 61 74 65 22 3a 7b 0a 20 20 20 69 66 28 |colate":{. if(| 00000a50 6f 62 5f 67 6f 74 3d 22 63 68 6f 63 6f 6c 61 74 |ob_got="chocolat| 00000a60 65 22 29 20 7b 0a 20 20 20 20 70 72 69 6e 74 28 |e") {. print(| 00000a70 22 53 6f 72 72 79 2c 20 77 65 20 61 72 65 20 73 |"Sorry, we are s| 00000a80 6f 6c 64 20 6f 75 74 2e 5c 6e 22 29 0a 20 20 20 |old out.\n"). | 00000a90 7d 0a 20 20 20 69 66 28 6f 62 5f 67 6f 74 3c 3e |}. if(ob_got<>| 00000aa0 22 63 68 6f 63 6f 6c 61 74 65 22 29 20 7b 0a 20 |"chocolate") {. | 00000ab0 20 20 20 20 70 72 69 6e 74 28 22 54 68 61 74 20 | print("That | 00000ac0 77 6f 75 6c 64 20 62 65 20 a3 31 2e 5c 6e 22 29 |would be .1.\n")| 00000ad0 0a 20 20 20 20 20 63 68 61 6e 67 65 28 6d 6f 6e |. change(mon| 00000ae0 65 79 2c 2d 31 29 0a 20 20 20 20 20 70 72 69 6e |ey,-1). prin| 00000af0 74 28 22 59 6f 75 20 68 61 76 65 3a 20 a3 22 29 |t("You have: .")| 00000b00 0a 20 20 20 20 20 70 72 69 6e 74 28 6d 6f 6e 65 |. print(mone| 00000b10 79 29 0a 20 20 20 20 20 70 72 69 6e 74 28 22 20 |y). print(" | 00000b20 6c 65 66 74 2e 22 29 0a 20 20 20 20 20 67 69 76 |left."). giv| 00000b30 65 28 70 6c 61 79 65 72 2c 63 68 6f 63 6f 6c 61 |e(player,chocola| 00000b40 74 65 29 0a 20 20 20 7d 0a 20 7d 0a 20 22 6d 61 |te). }. }. "ma| 00000b50 67 61 7a 69 6e 65 20 41 63 6f 72 6e 20 55 73 65 |gazine Acorn Use| 00000b60 72 20 6d 61 67 22 3a 7b 0a 20 20 20 69 66 28 6f |r mag":{. if(o| 00000b70 62 5f 67 6f 74 3d 22 6d 61 67 61 7a 69 6e 65 22 |b_got="magazine"| 00000b80 29 20 7b 0a 20 20 20 20 70 72 69 6e 74 28 22 53 |) {. print("S| 00000b90 6f 72 72 79 2c 20 77 65 20 61 72 65 20 73 6f 6c |orry, we are sol| 00000ba0 64 20 6f 75 74 2e 5c 6e 22 29 0a 20 20 20 7d 0a |d out.\n"). }.| 00000bb0 20 20 20 69 66 28 6f 62 5f 67 6f 74 3c 3e 22 6d | if(ob_got<>"m| 00000bc0 61 67 61 7a 69 6e 65 22 29 20 7b 0a 20 20 20 20 |agazine") {. | 00000bd0 20 70 72 69 6e 74 28 22 54 68 61 74 20 77 6f 75 | print("That wou| 00000be0 6c 64 20 62 65 20 a3 34 2e 5c 6e 22 29 0a 20 20 |ld be .4.\n"). | 00000bf0 20 20 20 63 68 61 6e 67 65 28 6d 6f 6e 65 79 2c | change(money,| 00000c00 2d 34 29 0a 20 20 20 20 20 70 72 69 6e 74 28 22 |-4). print("| 00000c10 59 6f 75 20 68 61 76 65 3a 20 a3 22 29 0a 20 20 |You have: ."). | 00000c20 20 20 20 70 72 69 6e 74 28 6d 6f 6e 65 79 29 0a | print(money).| 00000c30 20 20 20 20 20 70 72 69 6e 74 28 22 20 6c 65 66 | print(" lef| 00000c40 74 2e 22 29 0a 20 20 20 20 20 67 69 76 65 28 70 |t."). give(p| 00000c50 6c 61 79 65 72 2c 6d 61 67 61 7a 69 6e 65 29 0a |layer,magazine).| 00000c60 20 20 20 7d 0a 20 7d 0a 7d 0a 7d 0a 0a 6f 62 6a | }. }.}.}..obj| 00000c70 65 63 74 20 6e 65 77 73 70 61 70 65 72 20 7b 0a |ect newspaper {.| 00000c80 6e 61 6d 65 3a 20 22 6e 65 77 73 70 61 70 65 72 |name: "newspaper| 00000c90 22 0a 74 65 78 74 3a 20 22 49 74 73 20 54 6f 64 |".text: "Its Tod| 00000ca0 61 79 73 20 44 61 69 6c 79 20 54 65 6c 65 67 72 |ays Daily Telegr| 00000cb0 61 70 68 2e 22 0a 6d 6f 76 65 3a 20 79 65 73 0a |aph.".move: yes.| 00000cc0 7d 0a 0a 6f 62 6a 65 63 74 20 68 61 74 20 7b 0a |}..object hat {.| 00000cd0 6e 61 6d 65 3a 20 22 68 61 74 22 0a 74 65 78 74 |name: "hat".text| 00000ce0 3a 20 22 49 74 27 73 20 61 20 62 72 69 67 68 74 |: "It's a bright| 00000cf0 20 50 75 72 70 6c 65 20 57 6f 6f 6c 79 20 68 61 | Purple Wooly ha| 00000d00 74 2e 22 0a 6d 6f 76 65 3a 20 79 65 73 0a 7d 0a |t.".move: yes.}.| 00000d10 0a 6f 62 6a 65 63 74 20 63 68 6f 63 6f 6c 61 74 |.object chocolat| 00000d20 65 20 7b 0a 6e 61 6d 65 3a 20 22 63 68 6f 63 6f |e {.name: "choco| 00000d30 6c 61 74 65 22 0a 74 65 78 74 3a 20 22 49 74 27 |late".text: "It'| 00000d40 73 20 61 20 42 61 72 20 6f 66 20 44 61 69 72 79 |s a Bar of Dairy| 00000d50 20 4d 69 6c 6b 20 43 68 6f 63 6f 6c 61 74 65 2e | Milk Chocolate.| 00000d60 22 0a 6d 6f 76 65 3a 20 79 65 73 0a 7d 0a 0a 6f |".move: yes.}..o| 00000d70 62 6a 65 63 74 20 6d 61 67 61 7a 69 6e 65 20 7b |bject magazine {| 00000d80 0a 6e 61 6d 65 3a 20 22 6d 61 67 61 7a 69 6e 65 |.name: "magazine| 00000d90 22 0a 74 65 78 74 3a 20 22 49 74 27 73 20 74 68 |".text: "It's th| 00000da0 69 73 20 6d 6f 6e 74 68 73 20 41 63 6f 72 6e 20 |is months Acorn | 00000db0 55 73 65 72 2e 22 0a 6d 6f 76 65 3a 20 79 65 73 |User.".move: yes| 00000dc0 0a 7d 0a 0a 7c 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |.}..| **********| 00000dd0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 50 |************** P| 00000de0 6f 73 74 20 4f 66 66 69 63 65 20 2a 2a 2a 2a 2a |ost Office *****| 00000df0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000e00 2a 0a 0a 72 6f 6f 6d 20 73 68 6f 70 5f 32 20 7b |*..room shop_2 {| 00000e10 0a 6e 61 6d 65 3a 20 22 54 68 65 20 50 6f 73 74 |.name: "The Post| 00000e20 20 4f 66 66 69 63 65 22 0a 74 65 78 74 3a 20 22 | Office".text: "| 00000e30 59 6f 75 20 61 72 65 20 73 74 61 6e 64 69 6e 67 |You are standing| 00000e40 20 69 6e 20 61 20 73 6d 61 6c 6c 20 70 6f 73 74 | in a small post| 00000e50 20 6f 66 66 69 63 65 2c 20 74 68 65 72 65 20 61 | office, there a| 00000e60 72 65 3a 22 0a 20 20 20 20 20 20 22 53 74 61 6d |re:". "Stam| 00000e70 70 73 2c 20 45 6e 76 65 72 6c 6f 70 65 73 2c 20 |ps, Enverlopes, | 00000e80 48 61 74 20 73 74 61 6e 64 73 20 61 6e 64 20 43 |Hat stands and C| 00000e90 61 6c 61 6e 64 65 72 73 20 68 65 72 65 2e 22 0a |alanders here.".| 00000ea0 20 20 20 20 20 20 22 54 68 65 72 65 20 69 73 20 | "There is | 00000eb0 61 6e 20 6f 6c 64 20 6c 61 64 79 20 73 65 72 76 |an old lady serv| 00000ec0 69 6e 67 20 61 74 20 74 68 65 20 63 6f 75 6e 74 |ing at the count| 00000ed0 65 72 2e 22 0a 70 65 6f 70 6c 65 3a 20 70 6f 73 |er.".people: pos| 00000ee0 74 5f 6f 66 66 69 63 65 5f 70 65 72 73 6f 6e 0a |t_office_person.| 00000ef0 6e 6f 72 74 68 3a 20 20 67 6f 74 6f 28 73 74 72 |north: goto(str| 00000f00 65 65 74 5f 32 29 0a 7d 0a 0a 70 65 72 73 6f 6e |eet_2).}..person| 00000f10 20 70 6f 73 74 5f 6f 66 66 69 63 65 5f 70 65 72 | post_office_per| 00000f20 73 6f 6e 20 7b 0a 6e 61 6d 65 3a 20 22 54 68 65 |son {.name: "The| 00000f30 20 50 6f 73 74 20 6f 66 66 69 63 65 20 43 6c 65 | Post office Cle| 00000f40 72 6b 22 0a 74 65 78 74 3a 20 22 48 65 20 69 73 |rk".text: "He is| 00000f50 20 62 69 67 20 6d 61 6e 20 77 68 6f 20 64 6f 65 | big man who doe| 00000f60 73 20 6e 6f 74 20 6c 69 6b 65 20 70 65 6f 70 6c |s not like peopl| 00000f70 65 20 6d 61 6b 69 6e 67 20 70 72 6f 62 6c 65 6d |e making problem| 00000f80 73 2e 22 0a 73 65 65 3a 20 20 20 70 72 69 6e 74 |s.".see: print| 00000f90 28 22 54 68 65 20 6d 61 6e 20 73 61 79 73 3a 20 |("The man says: | 00000fa0 27 59 65 73 2c 20 57 68 61 74 20 77 6f 75 6c 64 |'Yes, What would| 00000fb0 20 79 6f 75 20 6c 69 6b 65 3f 27 2e 5c 6e 22 29 | you like?'.\n")| 00000fc0 0a 74 61 6c 6b 3a 20 7b 0a 20 22 43 61 6c 61 6e |.talk: {. "Calan| 00000fd0 64 65 72 22 3a 7b 0a 20 20 20 69 66 28 6f 62 5f |der":{. if(ob_| 00000fe0 67 6f 74 3d 22 63 61 6c 61 6e 64 65 72 22 29 20 |got="calander") | 00000ff0 7b 0a 20 20 20 20 70 72 69 6e 74 28 22 53 6f 72 |{. print("Sor| 00001000 72 79 2c 20 77 65 20 61 72 65 20 73 6f 6c 64 20 |ry, we are sold | 00001010 6f 75 74 2e 5c 6e 22 29 0a 20 20 20 7d 0a 20 20 |out.\n"). }. | 00001020 20 69 66 28 6f 62 5f 67 6f 74 3c 3e 22 63 61 6c | if(ob_got<>"cal| 00001030 65 6e 64 65 72 22 29 20 7b 0a 20 20 20 20 20 70 |ender") {. p| 00001040 72 69 6e 74 28 22 54 68 61 74 20 77 6f 75 6c 64 |rint("That would| 00001050 20 62 65 20 a3 35 2e 5c 6e 22 29 0a 20 20 20 20 | be .5.\n"). | 00001060 20 63 68 61 6e 67 65 28 6d 6f 6e 65 79 2c 2d 35 | change(money,-5| 00001070 29 0a 20 20 20 20 20 70 72 69 6e 74 28 22 59 6f |). print("Yo| 00001080 75 20 68 61 76 65 3a 20 a3 22 29 0a 20 20 20 20 |u have: ."). | 00001090 20 70 72 69 6e 74 28 6d 6f 6e 65 79 29 0a 20 20 | print(money). | 000010a0 20 20 20 70 72 69 6e 74 28 22 20 6c 65 66 74 2e | print(" left.| 000010b0 22 29 0a 20 20 20 20 20 67 69 76 65 28 70 6c 61 |"). give(pla| 000010c0 79 65 72 2c 63 61 6c 65 6e 64 65 72 29 0a 20 20 |yer,calender). | 000010d0 20 7d 0a 20 7d 0a 20 22 68 61 74 20 73 74 61 6e | }. }. "hat stan| 000010e0 64 20 68 61 74 73 74 61 6e 64 22 3a 7b 0a 20 20 |d hatstand":{. | 000010f0 20 69 66 28 6f 62 5f 67 6f 74 3d 22 68 61 74 73 | if(ob_got="hats| 00001100 74 61 6e 64 22 29 20 7b 0a 20 20 20 20 70 72 69 |tand") {. pri| 00001110 6e 74 28 22 53 6f 72 72 79 2c 20 77 65 20 61 72 |nt("Sorry, we ar| 00001120 65 20 73 6f 6c 64 20 6f 75 74 2e 5c 6e 22 29 0a |e sold out.\n").| 00001130 20 20 20 7d 0a 20 20 20 69 66 28 6f 62 5f 67 6f | }. if(ob_go| 00001140 74 3c 3e 22 68 61 74 73 74 61 6e 64 22 29 20 7b |t<>"hatstand") {| 00001150 0a 20 20 20 20 20 70 72 69 6e 74 28 22 54 68 61 |. print("Tha| 00001160 74 20 77 6f 75 6c 64 20 62 65 20 a3 32 35 2e 5c |t would be .25.\| 00001170 6e 22 29 0a 20 20 20 20 20 63 68 61 6e 67 65 28 |n"). change(| 00001180 6d 6f 6e 65 79 2c 2d 32 35 29 0a 20 20 20 20 20 |money,-25). | 00001190 70 72 69 6e 74 28 22 59 6f 75 20 68 61 76 65 3a |print("You have:| 000011a0 20 a3 22 29 0a 20 20 20 20 20 70 72 69 6e 74 28 | ."). print(| 000011b0 6d 6f 6e 65 79 29 0a 20 20 20 20 20 70 72 69 6e |money). prin| 000011c0 74 28 22 20 6c 65 66 74 2e 22 29 0a 20 20 20 20 |t(" left."). | 000011d0 20 67 69 76 65 28 70 6c 61 79 65 72 2c 68 61 74 | give(player,hat| 000011e0 73 74 61 6e 64 29 0a 20 20 20 7d 0a 20 7d 0a 20 |stand). }. }. | 000011f0 22 65 6e 76 65 72 6c 6f 70 65 20 65 6e 76 65 72 |"enverlope enver| 00001200 6c 6f 70 65 73 22 3a 7b 0a 20 20 20 69 66 28 6f |lopes":{. if(o| 00001210 62 5f 67 6f 74 3d 22 65 6e 76 65 72 6c 6f 70 65 |b_got="enverlope| 00001220 73 22 29 20 7b 0a 20 20 20 20 70 72 69 6e 74 28 |s") {. print(| 00001230 22 53 6f 72 72 79 2c 20 77 65 20 61 72 65 20 73 |"Sorry, we are s| 00001240 6f 6c 64 20 6f 75 74 2e 5c 6e 22 29 0a 20 20 20 |old out.\n"). | 00001250 7d 0a 20 20 20 69 66 28 6f 62 5f 67 6f 74 3c 3e |}. if(ob_got<>| 00001260 22 65 6e 76 65 72 6c 6f 70 65 73 22 29 20 7b 0a |"enverlopes") {.| 00001270 20 20 20 20 20 70 72 69 6e 74 28 22 54 68 61 74 | print("That| 00001280 20 77 6f 75 6c 64 20 62 65 20 a3 33 2e 5c 6e 22 | would be .3.\n"| 00001290 29 0a 20 20 20 20 20 63 68 61 6e 67 65 28 6d 6f |). change(mo| 000012a0 6e 65 79 2c 2d 33 29 0a 20 20 20 20 20 70 72 69 |ney,-3). pri| 000012b0 6e 74 28 22 59 6f 75 20 68 61 76 65 3a 20 a3 22 |nt("You have: ."| 000012c0 29 0a 20 20 20 20 20 70 72 69 6e 74 28 6d 6f 6e |). print(mon| 000012d0 65 79 29 0a 20 20 20 20 20 70 72 69 6e 74 28 22 |ey). print("| 000012e0 20 6c 65 66 74 2e 22 29 0a 20 20 20 20 20 67 69 | left."). gi| 000012f0 76 65 28 70 6c 61 79 65 72 2c 65 6e 76 65 72 6c |ve(player,enverl| 00001300 6f 70 65 73 29 0a 20 20 20 7d 0a 20 7d 0a 20 22 |opes). }. }. "| 00001310 53 74 61 6d 70 20 73 74 61 6d 70 73 22 3a 7b 0a |Stamp stamps":{.| 00001320 20 20 20 69 66 28 6f 62 5f 67 6f 74 3d 22 73 74 | if(ob_got="st| 00001330 61 6d 70 73 22 29 20 7b 0a 20 20 20 20 70 72 69 |amps") {. pri| 00001340 6e 74 28 22 53 6f 72 72 79 2c 20 77 65 20 61 72 |nt("Sorry, we ar| 00001350 65 20 73 6f 6c 64 20 6f 75 74 2e 5c 6e 22 29 0a |e sold out.\n").| 00001360 20 20 20 7d 0a 20 20 20 69 66 28 6f 62 5f 67 6f | }. if(ob_go| 00001370 74 3c 3e 22 73 74 61 6d 70 73 22 29 20 7b 0a 20 |t<>"stamps") {. | 00001380 20 20 20 20 70 72 69 6e 74 28 22 54 68 61 74 20 | print("That | 00001390 77 6f 75 6c 64 20 62 65 20 a3 34 2e 5c 6e 22 29 |would be .4.\n")| 000013a0 0a 20 20 20 20 20 63 68 61 6e 67 65 28 6d 6f 6e |. change(mon| 000013b0 65 79 2c 2d 34 29 0a 20 20 20 20 20 70 72 69 6e |ey,-4). prin| 000013c0 74 28 22 59 6f 75 20 68 61 76 65 3a 20 a3 22 29 |t("You have: .")| 000013d0 0a 20 20 20 20 20 70 72 69 6e 74 28 6d 6f 6e 65 |. print(mone| 000013e0 79 29 0a 20 20 20 20 20 70 72 69 6e 74 28 22 20 |y). print(" | 000013f0 6c 65 66 74 2e 22 29 0a 20 20 20 20 20 67 69 76 |left."). giv| 00001400 65 28 70 6c 61 79 65 72 2c 73 74 61 6d 70 73 29 |e(player,stamps)| 00001410 0a 20 20 20 7d 0a 20 7d 0a 7d 0a 7d 0a 0a 6f 62 |. }. }.}.}..ob| 00001420 6a 65 63 74 20 63 61 6c 65 6e 64 65 72 20 7b 0a |ject calender {.| 00001430 6e 61 6d 65 3a 20 22 63 61 6c 65 6e 64 65 72 22 |name: "calender"| 00001440 0a 74 65 78 74 3a 20 22 49 74 73 20 31 39 38 37 |.text: "Its 1987| 00001450 73 20 63 61 6c 65 6e 64 65 72 2c 20 79 6f 75 20 |s calender, you | 00001460 74 68 69 6e 6b 20 79 6f 75 27 76 65 20 62 65 65 |think you've bee| 00001470 6e 20 72 69 70 65 64 20 6f 66 66 2e 22 0a 6d 6f |n riped off.".mo| 00001480 76 65 3a 20 79 65 73 0a 7d 0a 0a 6f 62 6a 65 63 |ve: yes.}..objec| 00001490 74 20 68 61 74 73 74 61 6e 64 20 7b 0a 6e 61 6d |t hatstand {.nam| 000014a0 65 3a 20 22 68 61 74 73 74 61 6e 64 22 0a 74 65 |e: "hatstand".te| 000014b0 78 74 3a 20 22 49 74 27 73 20 61 20 62 72 69 67 |xt: "It's a brig| 000014c0 68 74 20 79 65 6c 6c 6f 77 20 68 61 74 73 74 61 |ht yellow hatsta| 000014d0 6e 64 2e 22 0a 6d 6f 76 65 3a 20 79 65 73 0a 7d |nd.".move: yes.}| 000014e0 0a 0a 6f 62 6a 65 63 74 20 73 74 61 6d 70 73 20 |..object stamps | 000014f0 7b 0a 6e 61 6d 65 3a 20 22 73 74 61 6d 70 73 22 |{.name: "stamps"| 00001500 0a 74 65 78 74 3a 20 22 54 68 65 79 20 61 72 65 |.text: "They are| 00001510 20 32 30 20 32 30 70 20 73 74 61 6d 70 73 2e 22 | 20 20p stamps."| 00001520 0a 6d 6f 76 65 3a 20 79 65 73 0a 7d 0a 0a 6f 62 |.move: yes.}..ob| 00001530 6a 65 63 74 20 65 6e 76 65 72 6c 6f 70 65 73 20 |ject enverlopes | 00001540 7b 0a 6e 61 6d 65 3a 20 22 65 6e 76 65 72 6c 6f |{.name: "enverlo| 00001550 70 65 73 22 0a 74 65 78 74 3a 20 22 59 6f 75 20 |pes".text: "You | 00001560 68 61 76 65 20 32 30 30 20 73 6d 61 6c 6c 20 77 |have 200 small w| 00001570 68 69 74 65 20 65 6e 76 65 72 6c 6f 70 65 73 2e |hite enverlopes.| 00001580 22 0a 6d 6f 76 65 3a 20 79 65 73 0a 7d 0a 0a 7c |".move: yes.}..|| 00001590 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a | ***************| 000015a0 2a 2a 2a 2a 2a 2a 20 50 75 62 20 2a 2a 2a 2a 2a |****** Pub *****| 000015b0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a 0a 72 6f 6f 6d |**********..room| 000015c0 20 73 68 6f 70 5f 33 20 7b 0a 6e 61 6d 65 3a 20 | shop_3 {.name: | 000015d0 22 54 68 65 20 50 75 62 22 0a 74 65 78 74 3a 20 |"The Pub".text: | 000015e0 22 59 6f 75 20 61 72 65 20 73 74 61 6e 64 69 6e |"You are standin| 000015f0 67 20 69 6e 20 61 20 70 75 62 2c 20 77 68 69 63 |g in a pub, whic| 00001600 68 20 69 73 20 61 62 6f 75 74 20 74 68 65 20 73 |h is about the s| 00001610 69 7a 65 22 0a 20 20 20 20 20 20 22 6f 66 20 79 |ize". "of y| 00001620 6f 75 72 20 62 61 74 68 72 6f 6f 6d 2c 20 74 68 |our bathroom, th| 00001630 65 72 65 20 69 73 20 6f 6e 6c 79 20 41 6d 6d 65 |ere is only Amme| 00001640 72 69 63 61 6e 20 42 65 65 72 21 22 0a 70 65 6f |rican Beer!".peo| 00001650 70 6c 65 3a 20 62 61 72 5f 6d 61 69 64 0a 6e 6f |ple: bar_maid.no| 00001660 72 74 68 3a 20 20 67 6f 74 6f 28 73 74 72 65 65 |rth: goto(stree| 00001670 74 5f 33 29 0a 6c 65 61 76 65 3a 20 20 7b 0a 69 |t_3).leave: {.i| 00001680 66 28 68 6f 77 5f 6d 75 63 68 3e 22 36 22 29 20 |f(how_much>"6") | 00001690 7b 0a 70 72 69 6e 74 28 22 59 6f 75 20 61 72 65 |{.print("You are| 000016a0 20 61 20 62 69 74 20 6a 6f 6c 6c 79 20 61 6e 64 | a bit jolly and| 000016b0 20 61 73 20 74 68 65 20 70 75 62 20 69 73 20 6f | as the pub is o| 000016c0 70 70 6f 73 69 74 65 20 74 68 65 20 6e 69 63 6b |pposite the nick| 000016d0 2c 5c 6e 22 29 0a 70 72 69 6e 74 28 22 79 6f 75 |,\n").print("you| 000016e0 72 20 61 72 72 65 73 74 65 64 20 61 6e 64 20 79 |r arrested and y| 000016f0 6f 75 20 66 61 69 6c 20 79 6f 75 72 20 6d 69 73 |ou fail your mis| 00001700 73 69 6f 6e 2e 5c 6e 22 29 0a 65 6e 64 28 29 0a |sion.\n").end().| 00001710 7d 0a 7d 0a 7d 0a 0a 70 65 72 73 6f 6e 20 62 61 |}.}.}..person ba| 00001720 72 5f 6d 61 69 64 20 7b 0a 6e 61 6d 65 3a 20 22 |r_maid {.name: "| 00001730 54 68 65 20 62 61 72 20 6d 61 69 64 22 0a 74 65 |The bar maid".te| 00001740 78 74 3a 20 22 53 68 65 20 69 73 20 76 65 72 79 |xt: "She is very| 00001750 20 74 61 6c 6c 20 61 6e 64 20 61 62 6f 75 74 20 | tall and about | 00001760 39 30 20 79 65 61 72 73 20 6f 6c 64 2e 22 0a 73 |90 years old.".s| 00001770 65 65 3a 20 20 20 70 72 69 6e 74 28 22 54 68 65 |ee: print("The| 00001780 20 6c 61 64 79 20 73 61 79 73 3a 20 27 57 68 61 | lady says: 'Wha| 00001790 74 20 77 69 6c 6c 20 69 74 20 62 65 20 74 68 65 |t will it be the| 000017a0 6e 2c 20 44 61 6e 3f 27 2e 5c 6e 22 29 0a 74 61 |n, Dan?'.\n").ta| 000017b0 6c 6b 3a 20 7b 0a 20 22 62 65 65 72 20 70 69 6e |lk: {. "beer pin| 000017c0 74 22 3a 7b 0a 20 20 20 20 20 70 72 69 6e 74 28 |t":{. print(| 000017d0 22 54 68 61 74 20 77 6f 75 6c 64 20 62 65 20 a3 |"That would be .| 000017e0 31 2e 5c 6e 22 29 0a 20 20 20 20 20 70 72 69 6e |1.\n"). prin| 000017f0 74 28 22 59 6f 75 20 68 61 76 65 20 61 20 76 65 |t("You have a ve| 00001800 72 79 20 73 61 74 69 73 66 79 69 6e 67 20 70 69 |ry satisfying pi| 00001810 6e 74 20 6f 66 20 62 65 65 72 2e 5c 6e 22 29 0a |nt of beer.\n").| 00001820 20 20 20 20 20 63 68 61 6e 67 65 28 6d 6f 6e 65 | change(mone| 00001830 79 2c 2d 31 29 0a 20 20 20 20 20 70 72 69 6e 74 |y,-1). print| 00001840 28 22 59 6f 75 20 68 61 76 65 3a 20 a3 22 29 0a |("You have: .").| 00001850 20 20 20 20 20 70 72 69 6e 74 28 6d 6f 6e 65 79 | print(money| 00001860 29 0a 20 20 20 20 20 70 72 69 6e 74 28 22 20 6c |). print(" l| 00001870 65 66 74 2e 5c 6e 22 29 0a 20 20 20 20 20 63 68 |eft.\n"). ch| 00001880 61 6e 67 65 28 68 6f 77 5f 6d 75 63 68 2c 31 29 |ange(how_much,1)| 00001890 0a 20 7d 0a 7d 0a 7d 0a 0a 7c 20 2a 2a 2a 2a 2a |. }.}.}..| *****| 000018a0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000018b0 2a 2a 2a 20 42 6f 6f 6b 20 53 68 6f 70 20 2a 2a |*** Book Shop **| 000018c0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000018d0 2a 2a 2a 2a 0a 0a 72 6f 6f 6d 20 73 68 6f 70 5f |****..room shop_| 000018e0 34 20 7b 0a 6e 61 6d 65 3a 20 22 54 68 65 20 42 |4 {.name: "The B| 000018f0 6f 6f 6b 20 73 68 6f 70 22 0a 74 65 78 74 3a 20 |ook shop".text: | 00001900 22 59 6f 75 20 61 72 65 20 73 74 61 6e 64 69 6e |"You are standin| 00001910 67 20 69 6e 20 61 20 73 6d 61 6c 6c 20 62 6f 6f |g in a small boo| 00001920 6b 20 73 68 6f 70 2c 20 74 68 65 72 65 20 69 73 |k shop, there is| 00001930 22 0a 20 20 20 20 20 20 22 6f 6e 6c 79 20 74 77 |". "only tw| 00001940 6f 20 62 6f 6f 6b 73 3a 20 27 48 6f 77 20 74 6f |o books: 'How to| 00001950 20 64 65 73 74 72 6f 79 20 50 43 73 27 20 61 6e | destroy PCs' an| 00001960 64 22 0a 20 20 20 20 20 20 22 27 31 30 30 31 20 |d". "'1001 | 00001970 77 61 79 73 20 74 6f 20 69 6d 70 72 65 73 73 20 |ways to impress | 00001980 79 6f 75 72 20 62 6f 73 73 27 2e 22 0a 20 20 20 |your boss'.". | 00001990 20 20 20 22 54 68 65 72 65 20 69 73 20 61 6e 20 | "There is an | 000019a0 6f 6c 64 20 6d 61 6e 20 73 65 72 76 69 6e 67 20 |old man serving | 000019b0 61 74 20 74 68 65 20 63 6f 75 6e 74 65 72 2e 22 |at the counter."| 000019c0 0a 70 65 6f 70 6c 65 3a 20 62 6f 6f 6b 5f 73 68 |.people: book_sh| 000019d0 6f 70 5f 6b 65 65 70 65 72 0a 77 65 73 74 3a 20 |op_keeper.west: | 000019e0 20 67 6f 74 6f 28 73 74 72 65 65 74 5f 32 29 0a | goto(street_2).| 000019f0 7d 0a 0a 70 65 72 73 6f 6e 20 62 6f 6f 6b 5f 73 |}..person book_s| 00001a00 68 6f 70 5f 6b 65 65 70 65 72 20 7b 0a 6e 61 6d |hop_keeper {.nam| 00001a10 65 3a 20 22 54 68 65 20 42 6f 6f 6b 20 73 65 6c |e: "The Book sel| 00001a20 6c 65 72 22 0a 74 65 78 74 3a 20 22 48 65 20 69 |ler".text: "He i| 00001a30 73 20 66 61 69 6c 20 6f 6c 64 20 6d 61 6e 20 77 |s fail old man w| 00001a40 68 6f 20 79 6f 75 20 65 76 65 72 79 6f 6e 65 20 |ho you everyone | 00001a50 6b 65 65 70 73 20 61 77 61 79 20 66 72 6f 6d 2e |keeps away from.| 00001a60 22 0a 73 65 65 3a 20 20 20 70 72 69 6e 74 28 22 |".see: print("| 00001a70 54 68 65 20 6d 61 6e 20 73 61 79 73 3a 20 27 59 |The man says: 'Y| 00001a80 65 73 2c 20 57 68 61 74 20 77 6f 75 6c 64 20 79 |es, What would y| 00001a90 6f 75 20 6c 69 6b 65 3f 27 2e 5c 6e 22 29 0a 74 |ou like?'.\n").t| 00001aa0 61 6c 6b 3a 20 7b 0a 20 22 48 6f 77 20 74 6f 20 |alk: {. "How to | 00001ab0 64 65 73 74 72 6f 79 20 50 43 73 20 50 43 22 3a |destroy PCs PC":| 00001ac0 7b 0a 20 20 20 69 66 28 6f 62 5f 67 6f 74 3d 22 |{. if(ob_got="| 00001ad0 50 43 20 62 6f 6f 6b 22 29 20 7b 0a 20 20 20 20 |PC book") {. | 00001ae0 70 72 69 6e 74 28 22 53 6f 72 72 79 2c 20 77 65 |print("Sorry, we| 00001af0 20 61 72 65 20 73 6f 6c 64 20 6f 75 74 2e 5c 6e | are sold out.\n| 00001b00 22 29 0a 20 20 20 7d 0a 20 20 20 69 66 28 6f 62 |"). }. if(ob| 00001b10 5f 67 6f 74 3c 3e 22 50 43 20 62 6f 6f 6b 22 29 |_got<>"PC book")| 00001b20 20 7b 0a 20 20 20 20 20 70 72 69 6e 74 28 22 54 | {. print("T| 00001b30 68 61 74 20 77 6f 75 6c 64 20 62 65 20 a3 31 33 |hat would be .13| 00001b40 2e 5c 6e 22 29 0a 20 20 20 20 20 63 68 61 6e 67 |.\n"). chang| 00001b50 65 28 6d 6f 6e 65 79 2c 2d 31 33 29 0a 20 20 20 |e(money,-13). | 00001b60 20 20 70 72 69 6e 74 28 22 59 6f 75 20 68 61 76 | print("You hav| 00001b70 65 3a 20 a3 22 29 0a 20 20 20 20 20 70 72 69 6e |e: ."). prin| 00001b80 74 28 6d 6f 6e 65 79 29 0a 20 20 20 20 20 70 72 |t(money). pr| 00001b90 69 6e 74 28 22 20 6c 65 66 74 2e 22 29 0a 20 20 |int(" left."). | 00001ba0 20 20 20 67 69 76 65 28 70 6c 61 79 65 72 2c 70 | give(player,p| 00001bb0 63 5f 62 6f 6f 6b 29 0a 20 20 20 7d 0a 20 7d 0a |c_book). }. }.| 00001bc0 20 22 31 30 30 31 20 77 61 79 73 20 74 6f 20 69 | "1001 ways to i| 00001bd0 6d 70 72 65 73 73 20 79 6f 75 72 20 62 6f 73 73 |mpress your boss| 00001be0 22 3a 7b 0a 20 20 20 69 66 28 6f 62 5f 67 6f 74 |":{. if(ob_got| 00001bf0 3d 22 31 30 30 31 20 62 6f 6f 6b 22 29 20 7b 0a |="1001 book") {.| 00001c00 20 20 20 20 70 72 69 6e 74 28 22 53 6f 72 72 79 | print("Sorry| 00001c10 2c 20 77 65 20 61 72 65 20 73 6f 6c 64 20 6f 75 |, we are sold ou| 00001c20 74 2e 5c 6e 22 29 0a 20 20 20 7d 0a 20 20 20 69 |t.\n"). }. i| 00001c30 66 28 6f 62 5f 67 6f 74 3c 3e 22 31 30 30 31 20 |f(ob_got<>"1001 | 00001c40 62 6f 6f 6b 22 29 20 7b 0a 20 20 20 20 20 70 72 |book") {. pr| 00001c50 69 6e 74 28 22 54 68 61 74 20 77 6f 75 6c 64 20 |int("That would | 00001c60 62 65 20 a3 32 35 2e 5c 6e 22 29 0a 20 20 20 20 |be .25.\n"). | 00001c70 20 63 68 61 6e 67 65 28 6d 6f 6e 65 79 2c 2d 32 | change(money,-2| 00001c80 35 29 0a 20 20 20 20 20 70 72 69 6e 74 28 22 59 |5). print("Y| 00001c90 6f 75 20 68 61 76 65 3a 20 a3 22 29 0a 20 20 20 |ou have: ."). | 00001ca0 20 20 70 72 69 6e 74 28 6d 6f 6e 65 79 29 0a 20 | print(money). | 00001cb0 20 20 20 20 70 72 69 6e 74 28 22 20 6c 65 66 74 | print(" left| 00001cc0 2e 22 29 0a 20 20 20 20 20 67 69 76 65 28 70 6c |."). give(pl| 00001cd0 61 79 65 72 2c 31 30 30 31 5f 62 6f 6f 6b 29 0a |ayer,1001_book).| 00001ce0 20 20 20 7d 0a 20 7d 0a 7d 0a 7d 0a 0a 6f 62 6a | }. }.}.}..obj| 00001cf0 65 63 74 20 70 63 5f 62 6f 6f 6b 20 7b 0a 6e 61 |ect pc_book {.na| 00001d00 6d 65 3a 20 22 50 43 20 62 6f 6f 6b 22 0a 74 65 |me: "PC book".te| 00001d10 78 74 3a 20 22 49 74 73 20 61 20 62 6f 6f 6b 20 |xt: "Its a book | 00001d20 6f 6e 20 68 6f 77 20 74 6f 20 68 69 74 20 50 43 |on how to hit PC| 00001d30 73 20 77 69 74 68 20 73 6c 65 64 67 65 68 61 6d |s with sledgeham| 00001d40 6d 65 72 73 21 22 0a 6d 6f 76 65 3a 20 79 65 73 |mers!".move: yes| 00001d50 0a 7d 0a 0a 6f 62 6a 65 63 74 20 31 30 30 31 5f |.}..object 1001_| 00001d60 62 6f 6f 6b 20 7b 0a 6e 61 6d 65 3a 20 22 31 30 |book {.name: "10| 00001d70 30 31 20 62 6f 6f 6b 22 0a 74 65 78 74 3a 20 22 |01 book".text: "| 00001d80 27 31 30 30 31 20 77 61 79 73 20 74 6f 20 69 6d |'1001 ways to im| 00001d90 70 72 65 73 73 20 79 6f 75 72 20 62 6f 73 73 27 |press your boss'| 00001da0 22 0a 20 20 20 20 20 20 22 48 75 68 2c 20 69 74 |". "Huh, it| 00001db0 20 6f 6e 6c 79 20 68 61 73 20 32 30 20 70 61 67 | only has 20 pag| 00001dc0 65 73 2c 20 66 75 6c 6c 20 6f 66 20 72 65 66 65 |es, full of refe| 00001dd0 72 65 6e 63 65 73 20 74 6f 20 6f 74 68 65 72 20 |rences to other | 00001de0 62 6f 6f 6b 73 21 22 0a 6d 6f 76 65 3a 20 79 65 |books!".move: ye| 00001df0 73 0a 7d 0a 0a 0a 0a 7c 20 2a 2a 2a 2a 2a 2a 2a |s.}....| *******| 00001e00 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 70 |************** p| 00001e10 6f 6c 69 63 65 20 73 74 61 74 69 6f 6e 20 2a 2a |olice station **| 00001e20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a 0a 72 6f |************..ro| 00001e30 6f 6d 20 73 68 6f 70 5f 35 20 7b 0a 6e 61 6d 65 |om shop_5 {.name| 00001e40 3a 20 22 50 6f 6c 69 63 65 20 53 74 61 74 69 6f |: "Police Statio| 00001e50 6e 22 0a 74 65 78 74 3a 20 22 59 6f 75 20 61 72 |n".text: "You ar| 00001e60 65 20 73 74 61 6e 64 69 6e 67 20 69 6e 20 61 20 |e standing in a | 00001e70 73 6d 61 6c 6c 20 63 6f 75 6e 74 72 79 20 70 6f |small country po| 00001e80 69 6c 63 65 20 73 74 61 74 69 6f 6e 2e 22 0a 20 |ilce station.". | 00001e90 20 20 20 20 20 22 4e 6f 20 6f 6e 65 20 69 73 20 | "No one is | 00001ea0 69 6e 2e 22 0a 73 6f 75 74 68 3a 20 67 6f 74 6f |in.".south: goto| 00001eb0 28 73 74 72 65 65 74 5f 33 29 0a 7d |(street_3).}| 00001ebc