Constant Story "Taking the Wand from Whizard McBang^"; Constant Headline "An Orders Exercise^"; CONSTANT DIALECT_US; Include "Parser"; Object LibraryMessages with before [; Inv: if (Wand.play_held) "You are carrying the Whizard's Wand";]; Include "VerbLib"; Include ">Whiz.t"; ! replacement for Grammar.h Class NPC has animate ; [Initialise; Banner(); lookmode=2; location = StartRoom; print "^The idea of this little extracise is to get the wand from the Whizard.^" ;return 2;]; Object StartRoom "Start Room" with description "You are in a room with no doors or exits.", out_to "You are apparently trapped here with the Whizard.", cant_go "You are apparently trapped here with the Whizard.", has light; NPC -> Wizard "Whizard McBang" with name 'whiz' 'whizard' 'EMS' 'wizard' 'wiz' 'enchanter' 'sorcerer' 'magician' 'mcbang', description "You're looking at Whizard McBang of the Enchanters Guild.^ aka Whiz or Wiz. His formal title is EMS (Enchanter,Sorcerer,Magician)", describe [; "^The eminent Whizard McBang is here.";], before [; Pay,PayFor: if (wand.paid==true) "You've already paid Whiz."; Wand.paid=true; Wand.wiz_held=false; Wand.play_held=true; "McBang says: ~Here's the wand.~";], orders [; hello: "Hello to you too Booby!"; Leave: "Whizzy says: ~No way Jose!~"; Give: if (noun== Wand && wand.paid==false) "Not till you've paid me."; if (noun==Wand && Wand.paid) "Whizzy returns the wand to you since you've already paid for it."; Die: "Whizzy says: NO! You die instead."; default: "Whizzy looks at you like you're nuts.";], has male proper ; Object -> Wand "Wand", with name 'wand' 'rod' 'staff' 'scepter' 'sceptre', paid false, wiz_held true, play_held false, describe [; if (self.play_held || self in player) "^There is a wand here (held by you.)"; if (self.wiz_held) "^There is a wand here. (held by the Whizard)."; "^There is a wand here (on the ground).";], description [; if (self.wiz_held) "The wizard is holding his valuable Wand."; if (self.play_held) "You are holding the very valuable Whizzy Wand.";], before [; buy: if (self.paid) "You've already paid the Whiz."; self.paid=true; self.wiz_held=false; self.play_held=true; "Whizzy says: ~Here's the wand.~"; drop: if (self.play_held==false || self.wiz_held) "How can you drop the wand when you ain't got it?"; self.play_held=false; self.wiz_held=false; "You drop the wand on the ground."; take: if (~~(self.paid)) "Whizzy says: ~Not til you've paid me!"; if (self.play_held) "You've already got it."; if (self.paid && self.play_held==false && self.wiz_held==false) {self.play_held=true; "You pick up the wand from the ground.";}; if (self.paid && self.wiz_held) {self.play_held=true; self.wiz_held=false; "You take the wand back from Whiz.";}; give: if (self.wiz_held) "Hey Booby! The Whiz already has the wand."; self.wiz_held=true; self.play_held=false; "Whizzy says: ~Thanks for my wand back!~";], ; [LeaveSub; "I aint leaving for you or NO one else!";]; [HelloSub; "Hello to you too Booby!";]; [PaySub; "You can't pay that.";]; [PayForSub; if (noun==Wand) {wand.wiz_held=false; wand.play_held=true; "Whizzy says: ~Here's the wand.~";}; wand.paid=true; "You can't pay for that";]; [DieSub; "Die sub here.";]; verb 'die' * -> Die; verb 'hello' * -> Hello * noun -> Hello;