Global pathing = false; [ DeathMessage ; print "Game Over"; ]; class Item; class Room with cant_go [ dir count tpath count2; tpath = pathing; pathing = true; objectloop (dir in compass) if (self.(dir.door_dir)()) ++ count; if (count == 0) "You can't go in any direction! "; print "You can't go in that direction, but you can move "; objectloop (dir in compass) { if (self.(dir.door_dir)()) { if (dir == in_obj) print "in"; else if (dir == out_obj) print "out"; else print (address) dir.&name-->1; count2 ++; if (count - count2 > 1) print ", "; else if (count - count2 == 1) print " and "; } } "."; ]; class Character with curwalk 0, startwalk [ prop; self.curwalk = self.prop; StartDaemon(self); ], number -1, ! State of current walk, if any daemon [ ; if (self.curwalk) { self.number ++; self.curwalk(); } else { StopDaemon(self); } ], first_turn [ ; if (self.curwalk) StartDaemon(self); ], showmove false, entertext "walks in", exittext "walks away", moveto [ destroom oldroom dir tmp; oldroom = RoomOf(self); !print "(moving ", (the) self, " from ", (the) oldroom, " to ", (the) destroom, ".)"; if (self in location && self.showmove) { pathing = true; if (destroom) objectloop (tmp in compass) { if ((oldroom.(tmp.door_dir))() == destroom) { dir = tmp; } } if (self.exittext) print (string) self.exittext; else print (The) self, " "; ShowDir (dir, 0); pathing = false; } if (destroom) { move self to destroom; if (destroom == location && self.showmove) { pathing = true; if (oldroom) objectloop (tmp in compass) { if ((destroom.(tmp.door_dir))() == oldroom) { dir = tmp; } } !print (The) self, " ", (string) self.entertext; if (self.entertext) print (string) self.entertext; else print (The) self, " "; ShowDir (dir, 1); pathing = false; } } else { remove self; } ]; [ RoomOf obj; while (obj && ~~obj ofclass Room) obj = parent(obj); return obj; ]; ! if Towards is true, show messages like "from the north", ! otherwise, show messages like "to the north" [ ShowDir dir towards; switch (dir) { u_obj: if (towards) print " from above"; else print " upwards"; !print (string) towards ? " upwards" : " from above"; d_obj: if (towards) print " from below"; else print " downwards"; !print (string) (towards ? " downwards" : " from below"); in_obj: if (towards) print " from inside"; else print " inwards"; !print (string) (towards ? " inwards" : " from inside"); out_obj: if (towards) print " from outside"; else print " outwards"; !print (string) (towards ? " outwards" : " from outside"); nothing: default: if (towards) print " from "; else print " to "; print (the) dir; !print (string) (towards ? " from " : " to "), (the) dir; } print ".^"; ]; [ ShowRoomDesc x y; y = parent(player); PlayerTo(x); PlayerTo(y, 1); ]; Attribute npcworn; Attribute readable; class Event with time_out [ ; self.start(); ], time_left -1, number -1, daemon [ ; self.time_left --; if (self.time_left <= 0) self.finish(); ], state 1, ! 1 = WAIT, 2 = RUN, 3 = AWAIT, 4 = FINISHED, 5 = PAUSED on_start [ ; ], on_finish [ ; ], start [ ; if (self.state == 1 or 3 or 4) {self.state = 2; StartDaemon(self); self.on_start();}], pause [ ; if (self.state == 2) {self.state = 5; StopDaemon(self); }], resume [ ; if (self.state == 5) {self.state = 2; StartDaemon(self); }], stop [ ; if (self.state == 2) {self.state = 3; StopDaemon(self); }], finish [ ; StopDaemon(self); self.state = 4; self.on_finish(); ], ; ![ Showbold x; style bold; print (String) x; ]; ![ Showital x; style italic; print (String) x; ]; ![ Shownorm x; style roman; print (String) x; ]; Global current_style = 0; [ s_bold str; style bold; current_style = current_style | 1; print (string) str; ]; [ s_ital str; style underline; current_style = current_style | 2; print (string) str; ]; [ s_unbold str; current_style = current_style & ~1; restyle(); print (string) str; ]; [ s_unital str; current_style = current_style & ~2; restyle(); print (string) str; ]; [ restyle ; style roman; if (current_style & 1) style bold; if (current_style & 2) style underline; ]; [ randomfrom x y; return x + random(y-x); ]; [ ReadSub ; if (noun has readable) { if (noun provides readtext) noun.readtext(); else "There's nothing written on it."; } else <>; ]; [ MoveAllHeld dest; while (child(player)) { give child(player) ~worn; move child(player) to dest; } ]; [ IsAlone actor x ; objectloop (x in RoomOf(actor)) { if ( (x ofclass Character || x == playerobj) && x ~= actor) rfalse; } rtrue; ]; Object suppressor class Event Room Character with readtext "suppressor read[BUG]"; [ Suppress ; MoveAllHeld (); s_bold(); s_ital(); s_unbold(); s_unital(); IsAlone(); randomfrom(); DeathMessage(); Suppress(); print npcworn; ];