# # ADRIFT Module # Exported 06-Jun-2008 # # Author: David Welbourn Version 4.00 Release 45 DEFINE Room "Room1" SHORTDESC = "Your bedroom" LONGDESC = "The attic of your mother's cottage serves as your small bedroom. Your bed and things are tucked under the south side of the sloping roof, and the ladder down is under the north side. [brag=%prize%] At least you can stand under the peak of the roof without banging your head. And a window in the east wall lets in some light." UP = "Room2" END Room DEFINE Room "Room2" SHORTDESC = "Cottage interior" LONGDESC = "[kitdesc=%prize%] The front door is east, and on the north wall, there's a ladder up to your room in the attic." WEST = "Room4" DOWN = "Room1" IN = "Room4" END Room DEFINE Room "Room3" SHORTDESC = "On the road" LONGDESC = "The road to the market is a long one. The market lies further east, and your home is back west." EAST = "Room4" END Room DEFINE Room "Room4" SHORTDESC = "Outside your home" LONGDESC = "You're outside the cottage you've lived in with your mother your entire life. There's a woodpile outside the door to the west and a small garden. The long road to the village market starts off to the east." ALTDESC IF TASK "Task0" IS Completed THENSHOW "" SHOW After Main END ALTDESC EAST = "Room2" WEST = "Room3" DOWN = "Room5" IF TASK "Task6" IS Completed OUT = "Room2" END Room DEFINE Room "Room5" SHORTDESC = "On the beanstalk" LONGDESC = "You're climbing a very tall beanstalk that goes up as high as you can see. It passes just past your window to the west, and the base of plant is in the garden below." ALTDESC IF PLAYER IS HOLDING "Object5" THENSHOW "[run2=%prize%]" SHOW After Main END ALTDESC UP = "Room4" DOWN = "Room6" END Room DEFINE Room "Room6" SHORTDESC = "Top of the beanstalk" LONGDESC = "Somehow, you're arrived at a heavily forested area in a far far away country. The top of the beanstalk pokes through a large hole in the ground here. More importantly, a tall castle with a huge door stands to the north." ALTDESC IF PLAYER IS HOLDING "Object5" THENSHOW "[run1=%prize%]" SHOW After Main END ALTDESC SOUTH = "Room7" IF OBJECT "Object12" IS "Open" UP = "Room5" OUT = "Room7" IF OBJECT "Object12" IS "Open" END Room DEFINE Room "Room7" SHORTDESC = "Inside the castle" LONGDESC = "Despite the hugeness of the castle, it looks cold and unfriendly to your eyes. There seems to be few furnishings or luxuries of any kind, excepting a huge stone chair and a black oven so large you could enter it without difficulty. The exit is to this cheerless place is to the south." ALTDESC IF OBJECT "Object8" IS "Off" THENSHOW "

\"Oh, no!\" cries the ogre's wife. \"I hear my husband coming home! Quick, hide inside the oven!\"" SHOW After Main END ALTDESC NORTH = "Room6" IN = "Room6" OUT = "Room8" END Room DEFINE Room "Room8" SHORTDESC = "Inside the oven" LONGDESC = "It's dark and scary inside the oven, and it smells of ashes and old meat. But at least there's plenty of room for you to sit in here, and as long as you stay quiet, perhaps the ogre won't find you here. The oven door is open a crack, letting you hear what's happening out there." IN = "Room7" END Room DEFINE Object "Object1" PREFIX = "your" NAME = "bed" ALIASES = "straw", "pallet" DESCRIPTION = "[bed=%prize%]" LOCATION = "Room1" TYPE = Static SITABLE = True LYABLE = True END Object DEFINE Object "Object2" PREFIX = "your" NAME = "things" ALIASES = "stuff", "clothes", "toys", "books", "letters", "letter", "wardrobe", "dishes" DESCRIPTION = "[stuff=%prize%]" LOCATION = "Room1" TYPE = Static END Object DEFINE Object "Object3" PREFIX = "a" NAME = "window" DESCRIPTION = "[wview=%growth%]" LOCATION = "Room1", "Room5" TYPE = Static OPENABLE = True END Object DEFINE Object "Object4" PREFIX = "an" NAME = "axe" DESCRIPTION = "It's the axe you use for chopping firewood. You normally keep it in the woodpile." LOCATION = Held by Player TYPE = Dynamic LISTOB = False END Object DEFINE Object "Object5" PREFIX = "a" NAME = "Prize%prize%" ALIASES = "treasure", "gold", "bag", "brown hen", "hen", "chicken", "bag of gold", "golden harp", "prize", "harp" DESCRIPTION = "[prizedesc=%prize%]" LOCATION = Held by Player TYPE = Dynamic END Object DEFINE Object "Object6" PREFIX = "a" NAME = "woodpile" ALIASES = "pile", "wood", "logs" DESCRIPTION = "A pile of logs is stacked up against the side of the cottage." LOCATION = "Room4" TYPE = Static END Object DEFINE Object "Object7" PREFIX = "a" NAME = "garden" DESCRIPTION = "A small vegetable garden. Normally, you might find cabbages, onions, or turnips growing in it." LOCATION = "Room4" TYPE = Static END Object DEFINE Object "Object8" PREFIX = "a" NAME = "stump" DESCRIPTION = "The stump of what must have been a giant beanstalk occupies the center of the garden. It must be at least eight feet wide!" LOCATION = "Room4" TYPE = Dynamic STATES = "On|Off" STARTSTATE = "On" END Object DEFINE Object "Object9" PREFIX = "a giant" NAME = "beanstalk" ALIASES = "stalk", "plant" DESCRIPTION = "A giant beanstalk has grown in your garden, up past your window, and right up into the sky! There's plenty of tendrils, so you shouldn't have any trouble climbing it." LOCATION = "Room3" TYPE = Dynamic END Object DEFINE Object "Object10" PREFIX = "a" NAME = "cow" ALIASES = "Milky" DESCRIPTION = "This is your faithful cow, Milky. Why was she with the stranger? Did you give her away?" LOCATION = Hidden TYPE = Dynamic LISTOB = False END Object DEFINE Object "Object11" PREFIX = "some" NAME = "magic beans" ALIASES = "beans" DESCRIPTION = "A handful of dry beans, all the same size and shape but in a variety of colours: red, white, brown, black, green, and even a pink one." LOCATION = Hidden TYPE = Dynamic END Object DEFINE Object "Object12" PREFIX = "a" NAME = "door" DESCRIPTION = "" LOCATION = "Room6" TYPE = Static OPENABLE = True KEY = "Object4" END Object DEFINE Task "Task1" COMMAND "open * window" WHERE = "Room1", "Room5" MESSAGE = "You opened the window." RESTRICTION State of Object "Object3" must be "Open" ELSESHOW "But the window is closed!" ACTION Change State of "Object3" to "Closed" REPEATABLE = True END Task DEFINE Task "Task2" COMMAND "open * door" WHERE = "Room6" MESSAGE = "You opened the door." RESTRICTION State of Object "Object12" must be "Open" ELSESHOW "But the door is locked!" ACTION Change State of "Object12" to "Closed" REPEATABLE = True END Task DEFINE Task "Task3" COMMAND "close * window" WHERE = "Room1", "Room5" MESSAGE = "You closed the window." RESTRICTION State of Object "Object3" must be "Closed" ELSESHOW "But the window is open!" ACTION Change State of "Object3" to "Open" REPEATABLE = True END Task DEFINE Task "Task4" COMMAND "close * door" WHERE = "Room6" MESSAGE = "You closed the door." RESTRICTION State of Object "Object12" must be "Closed" ELSESHOW "But the door isn't closed!" ACTION Change State of "Object12" to "Open" REPEATABLE = True END Task DEFINE Task "Task5" COMMAND "{go/climb} [d/down] {the} {beanstalk/stalk}" WHERE = "Room4" MESSAGE = "You climbed down from the beanstalk." SHOWROOM = "Room5" RESTRICTION Variable "Var1" must be equal to 2 ELSESHOW "You couldn't have gone in that direction, but you could've moved east, west and out." AND RESTRICTION Object "Object4" must not be held by Player ELSESHOW "\"You know you didn't take the axe up there, Jack,\" chides the voice gently." ACTION Move Player to Room "Room5" REPEATABLE = True END Task DEFINE Task "Task6" COMMAND "[chop/cut] {down} {the} [beanstalk/stalk/plant] {with {the} axe}" WHERE = "Room4" MESSAGE = "Quickly, you chopped down the beanstalk as fast as you could. Chop chop, and the beanstalk was cut in two and began to topple over. And then it fell! Your mother screamed!

Down came the Ogre with a terrible thud, hitting the east road, where he died instantly, breaking his neck, the beanstalk crashing after him. You breathed a sigh of relief." RESTRICTION Object "Object4" must be held by Player ELSESHOW "You couldn't have chopped anything without an axe." AND RESTRICTION Variable "Var1" must be not equal to 2 ELSESHOW "The beanstalk doesn't look like it's been chopped yet." AND RESTRICTION Variable "Var1" must be not equal to 0 ELSESHOW "What beanstalk?" ACTION Change Variable "Var1" to 2 ACTION Move Object "Object8" to Hidden ACTION Move Object "Object9" to Room "Room4" ACTION Move Character "Char3" to Room "Room6" ACTION Change Variable "Var3" by 1 END Task DEFINE Task "Task7" COMMAND "[get/take/pick {up}] {the} axe" WHERE = "Room4" MESSAGE = "You grab the axe from woodpile. Quick! The ogre is climbing down the beanstalk fast!" RESTRICTION Task "Task6" must be Completed ELSESHOW "Hold on. You haven't used the axe yet. Surely you must've took the axe in order to use it?" ACTION Move Object "Object4" to Room "Room4" ACTION Move Character "Char3" to Room "Room7" ACTION Change Variable "Var3" by 1 END Task DEFINE Task "Task8" COMMAND "{go/walk} [w/west]" WHERE = "Room3" MESSAGE = "Strangely, the road further east disappears in the grey and fog. You feel sure you never went to the village market, so you couldn't have gone that way." REPEATABLE = True END Task DEFINE Task "Task9" COMMAND "{go/climb} [d/down] {the} {beanstalk/stalk}" WHERE = "Room5" MESSAGE = "You climbed down and climbed down and climbed down and climbed down until you were just outside your window." SHOWROOM = "Room6" ACTION Move Player to Room "Room6" REPEATABLE = True END Task DEFINE Task "Task10" COMMAND "{go/climb} [u/up] {the} {beanstalk/stalk}" WHERE = "Room5" MESSAGE = "You climbed up the beanstalk a few feet." SHOWROOM = "Room4" ACTION Move Player to Room "Room4" ACTION Execute Task "Task23" REPEATABLE = True END Task DEFINE Task "Task11" COMMAND "{go/climb} [u/up] {the} {beanstalk/stalk}" WHERE = "Room6" MESSAGE = "You climbed up and climbed up and climbed up and climbed up ..." SHOWROOM = "Room5" RESTRICTION Character "Char2" must be not in same room as Player ELSESHOW "\"Do you suppose the giantess stands out in front of her own door all day?\" the sweet voice asks. \"How would you normally get someone to come to their door?\"" ACTION Move Player to Room "Room5" REPEATABLE = True END Task DEFINE Task "Task12" COMMAND "[take/get/pick {up}] {the} {brown/golden} [bag/gold/hen/chicken/harp] {of gold}" WHERE = "Room7" MESSAGE = "You take the Prize%prize%. [prizetake=%prize%]" RESTRICTION Object "Object5" must be held by Player ELSESHOW "You weren't holding the Prize%prize%." ACTION Move Object "Object5" to Room "Room7" ACTION Change Variable "Var3" by 1 REPEATABLE = True END Task DEFINE Task "Task13" COMMAND "[wait/z/listen]" WHERE = "Room8" MESSAGE = "You wait and listen. Soon enough, you hear the thump! thump! thump! of the giant ogre’s footsteps as he enters.

\"Fee-fi-fo-fum,
I smell the blood of an Englishman,
Be he alive, or be he dead,
I’ll have his bones to grind my bread.\"

And the woman said: \"Nonsense, my husband. [feedogre=%prize%]

Then he said: \"Wife, bring me [newprize=%prize%] The next thing you hear is the ogre snoring." RESTRICTION Object "Object5" must be in room "Room7" ELSESHOW "It might make sense to wait if you're hiding from the giant, but not now." ACTION Move Object "Object5" to Hidden ACTION Move Character "Char3" to Room "Room4" ACTION Move Character "Char2" to Room "Room6" ACTION Change State of "Object8" to "Off" ACTION Change Variable "Var3" by 1 REPEATABLE = True END Task DEFINE Task "Task14" COMMAND "knock {on {the} door}" WHERE = "Room6" MESSAGE = "You knock on the door. Moments later, you hear heavy footsteps approaching. The door opens and you're face-to-face with a giantess. \"Yes, child? What do you want?\" the woman asks.

Your stomach grumbles. \"Good morning, ma'am,\" you say politely. \"Could you be so kind as to give me some breakfast?\"

[feedme=%prize%]" RESTRICTION Character "Char2" must be in same room as Player ELSESHOW "This might not be the best time." ACTION Move Character "Char2" to Hidden ACTION Move Character "Char3" to Hidden ACTION Change State of "Object12" to "Locked" ACTION Change Variable "Var3" by 1 REPEATABLE = True END Task DEFINE Task "Task15" COMMAND "[n/north/in/enter {the} {castle}]" WHERE = "Room7" MESSAGE = "You went into the castle, where the giantess serves you some breakfast." SHOWROOM = "Room6" RESTRICTION Character "Char3" must be in same room as Character "Char1" ELSESHOW "\"I'm sorry, Jack,\" says the voice, \"but if you tried to enter the castle at any random moment hoping to find both the ogre asleep and a treasure available for the taking, you would almost certainly fail or even die. You cannot leave your entrance to such blind luck. You must discover a way to enter when the ogre is away.\"" ACTION Move Player to Room "Room6" REPEATABLE = True END Task DEFINE Task "Task16" COMMAND "[take/get/pick {up}] {the} [cow/Milky]" WHERE = "Room4" MESSAGE = "Later, outside the cottage, your mother and Milky are waiting for you. You take Milky by her lead. \"Make sure you get a good price for her, Jack,\" your mother says.

* * *
\"Jack! Jack! Are you going to sleep the entire day away?\" You wake to see your mother shaking you awake. \"Get downstairs right away. I need you to take our old cow to market.\"

\"Oh, mother, no! Not Milky!\"

\"It can't be helped. The crops were bad this year, and we'll have to eat those ourselves. We've got nothing better to sell but old Milky, if we want to buy the things we need. Oil. Salt. And you'll be needing new boots soon. It's sad to lose her, but it's got to be done. I'll see you downstairs.\"
" SHOWROOM = "Room1" RESTRICTION Object "Object10" must be held by Player ELSESHOW "You didn't have that." ACTION Move Object "Object10" to Room "Room4" ACTION Move Player to Room "Room1" ACTION Change Variable "Var3" by 1 END Task DEFINE Task "Task17" COMMAND "[take/get/pick {up}] {the} %object%" WHERE = All Rooms MESSAGE = "You weren't holding %theobject%." REPEATABLE = True END Task DEFINE Task "Task18" COMMAND "drop *" WHERE = All Rooms MESSAGE = "You know you weren't carrying that." REPEATABLE = True END Task DEFINE Task "Task19" COMMAND "kiss {my} [mom/mother]" WHERE = "Room2", "Room4" MESSAGE = "You gave your mother a quick kiss on her cheek." RESTRICTION Character "Char1" must be in same room as Player ELSESHOW "She's not here." REPEATABLE = True END Task DEFINE Task "Task20" COMMAND "[search/look under] {the/my} %object%" WHERE = All Rooms MESSAGE = "Nothing you're currently carrying was found hidden in there." REPEATABLE = True END Task DEFINE Task "Task21" COMMAND "[give/show] {magic} beans {to [mom/mother]}" WHERE = "Room4" MESSAGE = "\"I sold Milky, Mother. And I got a really good price for her too,\" you say.

\"Already? How ever did you get to the market and back so quick? Oh, never mind. How much did you get, my darling Jack? Five rounds? Ten? Oh, it couldn't be twenty, could it?\"

\"Even better! I got some magic beans!\" you say, displaying them proudly.

\"WHAT!?\" your mother shrieks. \"We need money, Jack! We need money so we won't starve! Do you think money just comes down out of the sky?\"

\"But they're magic--\"

\"MAGIC? You've been tricked into giving away our only cow for-- for--\" She seems at a loss for words. Then: \"Give me those!\" and she grabs the beans out of your hand and throws them into the garden.

She turns away from you. \"You foolish, foolish boy. Be off with you. Go to bed. There'll be no supper tonight. I have none to give you.\" And then she starts crying, and says no more." RESTRICTION Object "Object11" must not be held by Player ELSESHOW "How can you give what you've already got?" AND RESTRICTION Object "Object11" must be in room "Room4" ELSESHOW "You don't see any beans here." ACTION Move Object "Object11" to carried by Player ACTION Move Object "Object10" to Room "Room3" ACTION Move Character "Char3" to Room "Room3" ACTION Change Variable "Var3" by 1 END Task DEFINE Task "Task22" COMMAND "[give/trade/sell] [cow/Milky] {to {the} [stranger/man]} {for {the} {magic} beans}" WHERE = "Room3" MESSAGE = "\"Well, Mother said to get a good price for Milky, and magic beans sound like a good price to me. Why, we've never ever owned anything magical before. I can hardly wait to show them to her! Won't she be surprised?\"

\"I dare say she will be very surprised. So... we have a deal?\" asked the stranger.

\"Oh, yes!\" you say, handing over Milky. She moos, reproachfully.

\"And here are your magic beans, good sir,\" he says, giving them to you. \"May they bring you wealth, health, and happiness.\" He then tips his hat to you in parting, and leads Milky away." ACTION Move Object "Object10" to carried by Player ACTION Move Object "Object11" to carried by Character "Char3" ACTION Change Variable "Var3" by 1 END Task DEFINE Task "Task23" COMMAND "#two years earlier" WHERE = "Room4" MESSAGE = "

As you reverse-climb off the beanstalk, the world fades and reforms. It looks like it's two years earlier. Mother and I have changed. And what am I carrying now?" RESTRICTION Object "Object5" must not be held by Player ELSESHOW "

\"You must return the Prize%prize% to where you found it, Jack.,\" the voice whispers." AND RESTRICTION Variable "Var2" must be greater than or equal to 1 AND RESTRICTION Variable "Var3" must be less than 13 ELSESHOW "

Somewhere, a rooster crows.

\"You've done very well, Jack,\" says the mysterious voice, \"but now it's the break of day. You should get some rest,\" the voice says hintingly." ACTION Move Object "Object5" to carried by Player ACTION Move Character "Char3" to Room "Room7" ACTION Move Character "Char2" to Hidden ACTION Change State of "Object12" to "Open" ACTION Change State of "Object8" to "On" ACTION Change Variable "Var2" by -1 ACTION Change Variable "Var3" by 1 REPEATABLE = True END Task DEFINE Task "Task24" COMMAND "[sleep/lie on bed/get in bed/enter bed]" WHERE = "Room1" MESSAGE = "The next morning, you wake up hungry. You don't know what you'll do for food now. Perhaps some kind villager will give you your breakfast. And you look up... and that's when you see it. Outside the window is a giant beanstalk!

* * *

Ashamed of your foolishness, you followed your mother's orders and went to bed." RESTRICTION Object "Object5" must be in room Hidden ELSESHOW "This is no time to sleep!" AND RESTRICTION Variable "Var2" must be equal to 1 ELSESHOW "This is no time to sleep!" ACTION Move Object "Object9" to Hidden ACTION Move Object "Object11" to Room "Room4" ACTION Change Variable "Var1" to 0 ACTION Change Variable "Var3" by 1 END Task DEFINE Task "Task25" COMMAND "[sleep/lie on bed/get in bed/enter bed]" WHERE = "Room1" MESSAGE = "You go to sleep and dream... and everything goes foggy...

\"Congratulations, Jack! I knew you could do it!\" says the sweet voice. You turn and finally see its owner, a beautiful woman in a shimmering sapphire gown. \"Yes, I am your fairy godmother, Jack. I know how unhappy you and your mother are being poor, but as you can see, you can change things for the better. I couldn't just tell you directly, nor give you riches from nowhere. There are rules about these things. That's the way magic is.\"

\"I'm not sure I understand everything, though. Why did --\", you say.

\"Sorry, Jack, but it's time for you to wake up now. Just remember what you did and you'll do fine! And we'll meet again. I promise.\"

* * *
\"Jack! Jack! Are you going to sleep the entire day away?\" You wake to see your mother shaking you awake. \"Get downstairs right away. I need you to take our old cow to market.\"


" RESTRICTION Object "Object10" must be in room "Room4" ELSESHOW "This is no time to sleep!" ACTION Change Variable "Var3" by 1 ACTION End Game with status Win END Task DEFINE Event "Event1" NAME = "greeting the stranger" START After Task "Task23" LENGTH Between 1 and 1 WHERE = "Room3" FINISHTEXT = "

\"Hello, young man,\" says the stranger. \"That's a fine looking cow you have there. I wish I had a cow like that. I don't suppose you'd be willing to sell her?\"

\"Why, I am just taking her to market to do that very thing. Sell her, I mean.\"

\"Oh, you needn't go all that way. Sell her to me.\"

\"Perhaps I will. How many rounds will you pay me?\" you ask.

\"Oh, not money, young man. No, no, no. I can offer you something much much better than that. I can offer you magic, boy. What would you say about some magic beans? Beans that were enchanted when the Earth was young! Look at them, my lad!\" he says, holding them in front of your eyes. \"Are they not fine? Have you ever seen any beans so wondrous? Are they not worth the price of a cow? Sell your cow to me. Sell her! And these fabulous beans shall be yours!\"" END Event DEFINE Character "Char1" NAME = "Mother" PREFIX = "" ALIASES = "mom" LOCATION = "Room4" DESCRIPTION = "[mom=%prize%]" GENDER = Female TEXTHERE = "Your mother is here." END Character DEFINE Character "Char2" NAME = "Giantess" PREFIX = "" ALIASES = "woman" LOCATION = Hidden DESCRIPTION = "She's the tallest woman you've ever seen! Possibly the ugliest too, although Rudella Krockspit could give her some competition there. You wonder if she'd give you anything to eat." GENDER = Female TEXTHERE = "A giantess is standing in the doorway." END Character DEFINE Character "Char3" NAME = "Manfred%growth%" PREFIX = "the" ALIASES = "man", "stranger", "giant", "ogre", "dead", "body" LOCATION = "Room3" DESCRIPTION = "[mandesc=%growth%]" GENDER = Male TEXTHERE = "[maninit=%growth%]" END Character DEFINE Variable "Var1" NAME = "growth" TYPE = Integer VALUE = 1 END Variable DEFINE Variable "Var2" NAME = "prize" TYPE = Integer VALUE = 3 END Variable DEFINE Variable "Var3" NAME = "state" TYPE = Integer VALUE = 0 END Variable DEFINE Introduction MESSAGE = "by David Welbourn for The Comp With No Name
Version 1.0 (Competition release, 31-May-2008)
E-mail comments to davidwelbourn@hotmail.com.
Thanks to Cowboy for running this comp, to inky for giving me the idea, and to Taleslinger for testing and comments.

* * *
You're dreaming. Everything seems fuzzy, cloudy, distorted. You're carrying the axe from the woodpile and a golden harp you've never seen before. Why are you carrying these things? It all seems so unreal.

\"But it could be real, Jack,\" says a sweet voice. \"A glorious future awaits you, if only you can figure out the steps you took to get here...\"

" STARTROOM = "Room4" SHOWFIRST = True END Introduction DEFINE Winning MESSAGE = "*** You have won ***

Thank you for playing \"Beanstalk the and Jack\".
" END Winning DEFINE Player NAME = "Jack" GENDER = Male DESCRIPTION = "You're Jack Gelpf, a [me=%prize%]" INITIALPOSITION = Standing MAXBULK = 10 Normal Objects MAXWEIGHT = 10 Normal Objects END Player