Constant Story "Demo^"; Constant Headline "Platypus Demo w/ V6Lib^"; Include "abbrevs"; Include "blorb"; Constant ZPIC_PIXEL PICTURE_Pixel; Constant NOZSND; Constant V6PLAT; Include "V6Defs"; Include "First"; Include "Middle"; Include "V6"; ! Optional components: Include "footnote"; ! Include "scenery"; ! Include "nameable"; !Pics ZPic BeakerPic class ZPic, with picnum PICTURE_Beaker; ZPic BroomPic with picnum PICTURE_Broom; ! MAIN CODE GOES HERE Rooms Laboratory "Laboratory" has light, with name 'laboratory' 'lab', description "This room is remarkable for its non-descriptness. There is a single exit to the south.", dirs sdir Closet, startup [; move player to self; ]; Object -> workbench "workbench" has supporter hider static, with name 'workbench' 'bench' 'table', description "A sturdy table.", inside_description [; if (actor has under) "It's dusty down here."; ], allow_entry [; rtrue; ], respond [; LookOn: if (IndirectlyContains(self, actor) == under) "You'll have to get out from under the workbench first."; ], meddle [; if (noun == 0 || IndirectlyContains(self, actor) ~= under) rfalse; if (IndirectlyContains(self, noun) == upon || (second && IndirectlyContains(self, second) == upon)) "You'll have to get out from under the workbench first."; ]; Object -> -> beaker "beaker" has container transparent open upon, private picture BeakerPic, with name 'beaker' 'bottle', adjective 'glass', description [;!"A glass bottle with a wide mouth.", ActiveZWindow.DrawPicWrap2(self.picture); print "A glass bottle with a wide mouth.^"; ], points 5, respond_late_indirect [; Insert: if (noun == broom) Achieved(silly); ]; Object silly "finding a silly bug" with points 10; Footnotes broomnote "Like a broom, in other words."; Rooms Closet "Broom Closet" has light, with name 'closet', adjective 'broom', description "This is just a small, plain closet.", dirs [ d; if (d == ndir or outdir) return Laboratory; ], points 2; Object -> broom "broom" private picture BroomPic with short_name [; give self activedaemon; ], parse_name [ wd c fl; while ((wd = NextWord()) ~= 0) { if (wd == 'broom') { c++; fl = 1; } else if (wd == 'alien' && fl) { c++; give self general; } else break; } return c; ], description [; ActiveZWindow.DrawPicWrap2(self.picture); print "It's broom-like.",(note) broomnote, "^"; ], meddle_early [; if (self has general) { Transmogrify(broom, broom_alien); give self ~activedaemon; give broom_alien activedaemon; print "(Lucky guess.)^"; } ], daemon [; if (TestScope(self) == 0) { Transmogrify(broom, broom_alien); give self ~activedaemon; give broom_alien activedaemon; } ]; Actors broom_alien "broom alien" private picture AlienBroomPic, has neuter, with name 'broom' 'alien', description [; !"Weird.", ActiveZWindow.DrawPicWrap2(self.picture); print "Weird.^"; ], allow_take [; rtrue; ], daemon [; if (self has general) { give self ~general; return; } give self general; if (self in workbench) self.perform(##Exit); if (self.location == player.location) return; if (FindPath(self.location, player.location, self)) self.perform(##Go, self.&path_moves-->0); ], messages [; ExitFromUpon: "^#A# hops off #o#."; ExitFromUnder: if (lm_o has transparent || IndirectlyContains(lm_o, player) == under) "^#A# skitters out from under #o#."; "^#A# appears from under #o#."; Go: if (lm_n == 5002) "^#A# hops into the room."; ]; Actors scientist "scientist" has activedaemon female, with location Laboratory, name 'scientist' 'woman', description "She looks like an ordinary scientist.", daemon [; if (random(2) == 1) { switch(random(2)) { 1: if (self in Laboratory) self.perform(##Go, sdir); else self.perform(##Go, ndir); 2: if (beaker in self) { if (self in Laboratory) self.perform(##PutOn, beaker, workbench); } else if (TestScope(scientist, beaker)) { if (IndirectlyContains(workbench, beaker) ~= under) { if (beaker in player) { MoveTo(beaker, scientist); "~What are you doing with that?~ the scientist exclaims, taking the beaker away."; } else self.perform(##Take, beaker); } else if (TestScope(scientist)) "The scientist looks around, scratching her head."; } } rtrue; } if (TestScope(self) == 0) rfalse; switch(random(5)) { 1: "^The scientist says, ~Hmmm.~"; 3: "^The scientist says, ~Aha!~"; } ]; Object -> coat "white coat" has clothing worn, with name 'coat', adjective 'white' 'lab', description "Very official."; [ Initialise; V6Init(TestStyle2); SetDefaultObjectPositions(); ]; ZPicAnim AlienBroomPic has ZPAErase, has ZPABlock, with name "Alien Broom Image"; ZPic -> AB01 with picnum PICTURE_AlienBroom1; ZPic -> AB02 with picnum PICTURE_Broom; ZPic -> AB03 with picnum PICTURE_AlienBroom1; ZPic -> AB04 with picnum PICTURE_AlienBroom2; ZPic -> AB05 with picnum PICTURE_AlienBroom1; ZPic -> AB06 with picnum PICTURE_AlienBroom2; ZPic -> AB07 with picnum PICTURE_Broom; ZPic -> AB08 with picnum PICTURE_AlienBroom1; ZPic -> AB09 with picnum PICTURE_Broom; ZPic -> AB10 with picnum PICTURE_AlienBroom1; ZPicAnim anicomp has ZPALoop, with name "Animated Compass"; ZPic -> Frame01 with picnum PICTURE_Frame01; ZPic -> Frame02 with picnum PICTURE_Frame02; ZPic -> Frame03 with picnum PICTURE_Frame03; ZPic -> Frame04 with picnum PICTURE_Frame04; ZPic -> Frame05 with picnum PICTURE_Frame05; ZPic -> Frame06 with picnum PICTURE_Frame06; ZPic -> Frame07 with picnum PICTURE_Frame07; ZPic -> Frame08 with picnum PICTURE_Frame08; ZPic -> Frame09 with picnum PICTURE_Frame09; ZPic -> Frame10 with picnum PICTURE_Frame10; ZPic -> Frame11 with picnum PICTURE_Frame11; ZPic -> Frame12 with picnum PICTURE_Frame12; ZPic -> Frame13 with picnum PICTURE_Frame13; ZPic -> Frame14 with picnum PICTURE_Frame14; ZPic -> Frame15 with picnum PICTURE_Frame15; ZPic -> Frame16 with picnum PICTURE_Frame16; ZPic -> Frame17 with picnum PICTURE_Frame17; ZPic -> Frame18 with picnum PICTURE_Frame18; ZPic -> Frame19 with picnum PICTURE_Frame19; ZPic -> Frame20 with picnum PICTURE_Frame20; ZPic -> Frame21 with picnum PICTURE_Frame21; ZPic -> Frame22 with picnum PICTURE_Frame22; ZPic -> Frame23 with picnum PICTURE_Frame23; ZPic -> Frame24 with picnum PICTURE_Frame24; ZPic -> Frame25 with picnum PICTURE_Frame25; ZPic -> Frame26 with picnum PICTURE_Frame26; ZPic -> Frame27 with picnum PICTURE_Frame27; ZPic -> Frame28 with picnum PICTURE_Frame28; ZPic -> Frame29 with picnum PICTURE_Frame29; ZPic -> Frame30 with picnum PICTURE_Frame30; ZPic -> Frame31 with picnum PICTURE_Frame31; ZPic -> Frame32 with picnum PICTURE_Frame32; ZPic -> Frame33 with picnum PICTURE_Frame33; ZPic -> Frame34 with picnum PICTURE_Frame34; ZPic -> Frame35 with picnum PICTURE_Frame35; ZPic -> Frame36 with picnum PICTURE_Frame36; ZPic -> Frame37 with picnum PICTURE_Frame37; ZPic -> Frame38 with picnum PICTURE_Frame38; ZPic -> Frame39 with picnum PICTURE_Frame39; ZPic -> Frame40 with picnum PICTURE_Frame40; Array Frames table PICTURE_Frame01 PICTURE_Frame02 PICTURE_Frame03 PICTURE_Frame04 PICTURE_Frame05 PICTURE_Frame06 PICTURE_Frame07 PICTURE_Frame08 PICTURE_Frame09 PICTURE_Frame10 PICTURE_Frame11 PICTURE_Frame12 PICTURE_Frame13 PICTURE_Frame14 PICTURE_Frame15 PICTURE_Frame16 PICTURE_Frame17 PICTURE_Frame18 PICTURE_Frame19 PICTURE_Frame20 PICTURE_Frame21 PICTURE_Frame22 PICTURE_Frame23 PICTURE_Frame24 PICTURE_Frame25 PICTURE_Frame26 PICTURE_Frame27 PICTURE_Frame28 PICTURE_Frame29 PICTURE_Frame30 PICTURE_Frame31 PICTURE_Frame32 PICTURE_Frame33 PICTURE_Frame34 PICTURE_Frame35 PICTURE_Frame36 PICTURE_Frame37 PICTURE_Frame38 PICTURE_Frame39 PICTURE_Frame40; Include "Last"; Include "Infix"; ! NEW GRAMMAR GOES HERE ZWinStyle TestStyle2 with Init[ height bm mainyl mainxl mainys mainxs x y; bm = ZScreen.BufferOn(); mainyl = MainWin.GetYLoc(); mainxl = MainWin.GetXLoc(); mainys = MainWin.GetHeight(); mainxs = MainWin.GetWidth(); x = mainxl + mainxs; y = mainyl + mainys; height = anicomp.GetHeight(); MainWin.SetLoc(MainWin.GetYLoc(),1); StatusWin.SetLoc(StatusWin.GetYLoc(),1); MainWin.SetSize(MainWin.GetHeight(),ZScreen.GetWidth()); StatusWin.SetSize(StatusWin.GetHeight(), ZScreen.GetWidth() ); @split_window height; StatusWin.Erase(); StatusWin.DrawPic(anicomp,1, ((StatusWin.GetXSize()/2) - (anicomp.GetWidth()/2))); ZScreen.SetBuffer(bm); @picture_table Frames; ], Update [ charh charw width posa posb oldwin bm; !! Default statusline routine !! based on inform library DrawStatusLine oldwin = ActiveZWindow; StatusWin.Activate(); charh = StatusWin.GetCharHeight(); charw = StatusWin.GetCharWidth(); width = (StatusWin.GetXSize() / charw); posa = (width - 26) * charw; posb = (width - 13) * charw; bm = ZScreen.BufferOn(); StatusWin.Erase(); anicomp.Update(StatusWin); StatusWin.SetCursor((1+(charh/8)),charw); #ifdef V6PLAT; print (name) player.location; #ifnot; print (name) location; #endif; if ((01->1)&2 == 0) { if (width > 76) { StatusWin.SetCursor((1+(charh/8)),posa); print (string) SCORE__TX, sline1; StatusWin.SetCursor((1+(charh/8)),posb); print (string) MOVES__TX, sline2; } if (width > 63 && width <= 76) { StatusWin.SetCursor((1+(charh/8)),posb); print sline1, "/", sline2; } } else { StatusWin.SetCursor((1+(charh/8)),posa); print (string) TIME__TX; LanguageTimeOfDay(sline1, sline2); } ZScreen.SetBuffer(bm); oldwin.Activate(); ];