Constant Story "(You're) TOAST!"; Constant Headline "^An Interactive Glulxy Interactivity Kind Of Thingy^ (c) Copyright 2000 by Gunther Schmidl ^"; Include "Parser"; Include "VerbLib"; Include "GlkWrap"; Object ToasterRoom "Toaster Room" with description "This is not what you expected. The kitchen has been transformed into something right out of some sci-fi movie or the other. A gigantic toaster stands two meters high. Further installations have been made to the north, in what was once the bathroom; the storage room is to the southwest.", n_to LeverRoom, sw_to StoreRoom, has light; Object -> Toaster "Toast-O-Matic ThreeThousand" with name 'toaster' 'toast-o-matic' 'three' 'thousand' 'threethousand', description "A friendly voice says: ~This toaster can only be used by two or more persons. Please insert bread into the bread slots on top of the toaster. Use Person #2 if you are not tall enough.~", before [; Climb, Enter: "That's not a good idea."; LetGo: if (toast notin self) "There is no toast inside the toaster."; if (player notin chair) "You can't reach up there!"; Receive: if (toast in self) "~Error. Please proceed to step two.~"; if (noun ~= toast) "~Error. This can't be put in the toaster.~"; if (player notin chair) "You can't reach up there!"; ], has static container open ~openable; Object -> button "button" with name 'button', description [; FormatText( "A button marked %EPUSH%/." ); rtrue; ], before [; Pull: "HA ha."; Push: if (toast notin toaster) "~Please put toast in the toaster first.~"; if (lever hasnt on) "~Please ask Person #2 to hold down the lever.~"; deadflag = 2; "Success! The toast pops out of the machine, and directly into your waiting hands!^^OUCH!^^You seem to have burned a finger. Damn."; ], has static scenery; Object LeverRoom "Lever Room" with description "This, the former bathroom, has been cleared out entirely. A gigantic lever is on the wall, with a dial next to it. A window looks outside.", s_to ToasterRoom, has light; Object -> window "window" with name 'window', description [; if (dial has general) "It's dark outside."; "The sun is shining."; ], has static scenery ~openable; Object -> dial "dial" with name 'dial', description [; print "It's a dial, currently set to "; if (self has general) FormatText( "%EDARK%/.^" ); else FormatText( "%ELIGHT%/.^" ); rtrue; ], before [; Turn: print "You turn the dial to "; if (self has general) { give self ~general; FormatText( "%ELIGHT%/, and the sun rises again outside.^" ); } else { give self general; FormatText( "%EDARK%/, and the sun goes down outside.^" ); } rtrue; ], has static scenery ~general; Object -> lever "lever" with name 'gigantic' 'lever', before [; Push: <>; Pull: <>; LetGo: if (noun == weight) StartTimer(self, 1); Receive: if (noun ~= weight) "You can't put that on the lever!"; if (noun in self) "The weight is already on the lever!"; SwitchOn: if (toast notin toaster) "~Please put toast in the toaster first.~"; if (self has on) { FormatText( "The lever is already in the %EON%/ position!^" ); rtrue; } give self on; StartTimer(self, 1); FormatText( "You push the lever into the %EON%/ position.^^~Please press the button on the toaster.~^" ); rtrue; SwitchOff: if (self hasnt on) { FormatText( "The lever is already in the %EOFF%/ position!^" ); rtrue; } give self ~on; StopTimer(self); FormatText( "You push the lever into the %EOFF%/ position.^" ); rtrue; ], time_left 0, time_out [; if (weight notin self) { give self ~on; FormatText( "You hear the lever %Epop%/ into the %EOFF%/ position.^" ); rtrue; } ], has static scenery supporter open switchable ~on; Object StoreRoom "Store Room" with description "This is your generic store room. If you've already forgotten how you came here, the way back is northeast.", ne_to ToasterRoom, has light; Object -> toast "toast" with name 'toast' 'bread', article "some", description "Two slices of untoasted bread. Yes, I know it should say ~bread.~ It's the way we call it in German. But you can call it bread if you want. Maybe you just did; I could find out but I don't wanna. That'd be even more work than changing the name from ~bread~ to ~toast~ on demand. Also, this description is getting way too long, so I'm stopping NOW."; Object -> chair "chair" with name 'chair', description "Kind of your standard chair.", has supporter enterable; Object -> weight "weight" with name 'weight', description "A small weight on a string. Use ~PUT ON~ to put it on something, not ~TIE TO,~ because I'm lazy."; [ Initialise; location = ToasterRoom; FormatText( "^^^^Someone has clearly lost it.^^When you had the new %EToast-O-Matic%/ ThreeThousand installed (you were out of the house), you clearly didn't expect this. You're alone at home; how the %Ehell%/ are you supposed to make yourself some toast?^^^" ); ]; Include "Grammar"; end;