(load "defaults.gns") (object Outside_Cave nil (location) ((name . "Outside Cave") (ldesc . "You are standing outside out a nasty looking cave which \ is to your north. ") (north . Cave) (baddir . "The only exit is to the north. ") (light)) ()) (object smallRock Outside_Cave (getable-object) ((name . "small rock") (nouns "rock") (adjectives "small") (ldesc . "It's a rather ordinary looking rock that weighs several \ kilos. ")) ((before (actptr indptr actionname) (cond ((= 'do-get actionname) (if (and (= (parent self) (findobject 'pedestal)) (!= (parent (findobject 'goldSkull)) (findobject 'pedestal))) (begin (print "As you lift the small rock from its \ resting place, the center of the pedestal \ rises up. To your great surprise, a volley of \ poisoned arrows springs through the air from \ a hidden recess and into your body.\b\pYou \ have died!\b\b") (terminate)) t)) (t t))) )) (object Cave nil (location) ((name . "Cave") (ldesc . "The cave is brightly lit by the sunlight pouring through \ its entrance to the south, revealing an even more grusome-\ looking cave than you imagined. ") (south . Outside_Cave) (baddir . "The only exit is out of the cave to the south. ") (light)) ()) (object pedestal Cave (on-container) ((name . "pedestal") (nouns "pedestal") (capacity . 10)) ()) (object goldSkull pedestal (getable-object) ((name . "gold skull") (nouns "skull") (adjectives "gold") (ldesc . "The gold skull gleams wickedly in the light. ")) ((before (actptr indptr actionname) (cond ((= 'do-get actionname) (if (and (= (parent self) (findobject 'pedestal)) (!= (parent (findobject 'smallRock)) (findobject 'pedestal))) (begin (print "As you greedily lift the gold skull \ from its resting place, the center of the \ pedestal rises up. To your great suprise, a \ volley of poisoned arrows springs through the \ air from a hidden recess and into your body.\ \b\pYou have died!\b\b") (terminate)) t)) (t t))) )) ; define the player actor ; (object player-actor Outside_Cave (actor) ((name . "player")) nil) (set *player* (findobject 'player-actor)) ; spawn a daemon that takes care of prompting the player for commands ; (spawn *player* player-daemon) (function Initialize () (print "Goldskull\nAn Interactive Diversion\n\ Ported by Jeff Standish from a TADS demo by Mike Roberts.\b\b") (method (location-of *player*) descfull) )