home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum3.lzh
/
SAMPLES
/
AARD
/
verbs.adl
< prev
Wrap
Text File
|
1987-10-29
|
7KB
|
292 lines
{*** VERBS ***}
VERB
sign, play,
rname, shell, eat,
swim, feed, score, dig,
cut, plug, tie, untie,
wipe, shake, xyzzy, jamb,
abracadabra;
sign(PREACT) = Preact; play(PREACT) = Preact;
eat(PREACT) = Preact; cut(PREACT) = Preact;
feed(PREACT) = Preact; plug(PREACT) = Preact;
untie(PREACT) = Preact; wipe(PREACT) = Preact;
shake(PREACT) = Preact; jamb(PREACT) = Preact;
tie(PREACT) = Preact;
score(PREACT) = (Expect NO_OBJ NO_OBJ);
dig(PREACT) = (Expect NO_OBJ NO_OBJ);
swim(PREACT) = (Expect NO_OBJ NO_OBJ);
i = inventory;
plugh = xyzzy; clean = wipe;
shut = close; peruse = read;
chuck = throw; hurl = throw;
toss = throw; heave = throw;
discard = drop; excavate = dig;
grab = take; push = touch;
pet = touch; devour = eat;
consume = eat; wade = swim;
ford = swim; shazam = abracadabra;
hocus = abracadabra; abra = abracadabra;
end = quit; bye = quit;
leave = exit; climb = up;
{*** VERB ROUTINES ***}
plug(ACTION) =
(IF ($eq ($loc .ME) irm13) THEN
(IF ($eq ($loc cotton) .ME) THEN
($say "You stick the cotton into the rhino's ears.\n")
($move cotton .ALL)
($setp rhino earplg 1)
($exit 1)
)
)
($say "I don't quite understand what you mean.\n")
;
dig(ACTION) =
(IF ($ne ($loc shovel) .ME) THEN
($say "You don't have something to dig with.\n")
($exit 1)
)
(IF ($eq ($loc .ME) irm9) THEN
(IF ($not ($prop cotton tookbt)) THEN
($setp cotton tookbt 1)
($say "You find some cotton buried in the sand.\n")
($move cotton irm9)
($return 0)
)
($say "OK\n")
($return 0)
)
(IF ($eq ($loc .ME) prm17) THEN
(IF ($not ($prop pendant dugbt)) THEN
($setp pendant dugbt 1)
($say "You find an ancient pendant buried in the grave.\n")
($move pendant prm17)
($return 0)
)
($say "You dig some but you don't find anything.\n")
($return 0)
)
($say "The ground is too hard to dig into.\n")
;
cantdo =
($say "I don't believe I can do that.\n")
;
sign(ACTION) = cantdo;
play(ACTION) = cantdo;
arolg =
($say "It will probably cost you an arm or a leg to feed that.\n")
($exit 1)
;
feed(ACTION) =
(IF ($or ($eq ($loc .ME) irm8) ($eq ($loc .ME) irm9)) THEN
(IF ($eq ($dobj) crocodile) THEN
(arolg)
)
)
(IF ($and ($eq ($loc .ME) prm19) ($eq ($dobj) bear)) THEN
(IF ($not ($prop bear hitbr)) THEN
(arolg)
)
)
(IF ($and ($eq ($loc .ME) prm6) ($eq ($dobj) smilo)) THEN
(IF ($not ($prop smilo stond)) THEN
(arolg)
)
)
(IF ($or ($eq ($loc .ME) prm22) ($eq ($loc .ME) prm23)) THEN
(IF ($eq ($dobj) tyranosaur) THEN
(arolg)
)
)
($say "I don't quite understand what you mean.\n")
;
cut(ACTION) = cantdo;
throw(ACTION) =
(IF ($ne ($loc ($dobj)) .ME) THEN
($say "You don't have it.\n")
($exit 1)
)
($say "OK.\n")
(cdrop)
;
eat(ACTION) = ($say "I think I just lost my appetite.\n");
abracadabra(ACTION) =
(IF ($ne prehs ($loc ($loc .ME))) THEN
($say
"That phrase hasn't worked in at least ten thousand years.\n"
)
($return 0)
)
(IF ($ne ($loc .ME) prm17) THEN
($say "Nothing happens.\n")
($return 0)
)
(IF ($prop spear tooky) THEN
(IF ($not ($prop spear abrad)) THEN
($setp spear abrad 1)
($say "The rubble gets magically cleared away.\n")
($return 0)
)
)
($say "Nothing much happens.\n")
;
tie(ACTION) = ($say "It is impossible to tie a knot in that right now. \n");
untie(ACTION) = ($say "I don't quite understand what you mean.\n");
swim(ACTION) =
(IF ($eq ($loc .ME) irm8) THEN
(ei8)
($return 0)
)
(IF ($eq ($loc .ME) irm9) THEN
(ei8)
($move .ME irm8)
($return 0)
)
($say "I don't see enough water here to even wade in.\n")
;
wipe(ACTION) = ($say "I don't quite comprehend what you are saying.\n");
shake(ACTION) = ($say "That probably won't accomplish much.\n");
jamb(ACTION) = ($say "I don't quite comprehend what you mean.\n");
xyzzy(ACTION) =
($say
"You are transported to a room where you are faced by a wizard who points to
you and says, ''Them's fighting words!'' You immediately get attacked by
all sorts of denizens of the museum: there is a cobra chewing on your leg, "
"a troglodyte is bashing your brains out with a gold nugget, a crocodile is
removing large chunks of flesh from you, a rhinoceros is goring you with his
horn, a sabre-tooth cat is busy trying to disembowel you, you are being "
"trampled by a large mammoth, a vampire is sucking you dry, a Tyranosaurus
Rex is sinking his six inch long fangs into various parts of your anatomy,
a large bear is dismembering your body, a gargoyle is bouncing up and "
"down on your head, a burly troll is tearing you limb from limb, several
dire wolves are making mince meat out of your torso, and the wizard is about
to transport you to the corner of Westwood and Broxton. "
)
($say "Oh dear, you seem to have gotten yourself killed, as well.\n")
(skore)
(ratng)
(ratnx)
($spec QUIT)
;
score(ACTION) =
(skore)
(ratng)
;
quit( ACTION ) =
(skore)
(ratng)
(ratnx)
($spec QUIT)
;
scale =
($setp .ME weight 0)
(IF ($cont .ME) THEN
(scads ($cont .ME))
)
;
scads =
(IF %1 THEN
($setp .ME weight ($plus ($prop .ME weight)
($prop %1 weight)))
(scads ($link %1))
)
;
TakeAct = (ctake);
DropAct = (cdrop);
ctake =
(scale)
(IF ($prop ($dobj) NOTAKE) THEN
($say "That thing is too heavy to carry.\n")
($setg Skip TRUE)
($return 0)
)
(IF ($gt ($plus ($prop ($dobj) weight) ($prop .ME weight)) 20) THEN
($say
"You are carrying too much. You will have to at least drop something first.\n"
)
($setg Skip TRUE)
($return 0)
)
($setp .ME weight ($plus ($prop ($dobj) weight) ($prop .ME weight)))
(IF ($not ($prop ($dobj) rarea)) THEN
($return 0)
)
($setp .ME pscore ($plus ($prop .ME pscore) ($prop ($dobj) pfound)))
($setp ($dobj) pfound 0)
;
cdrop =
(IF ($eq ($loc .ME) prm21) THEN
($say "OK, it falls further down into the crack.\n")
($move ($dobj) prm22)
($setg Skip TRUE)
($return 0)
)
(IF ($not ($prop ($dobj) rarea)) THEN
($return 0)
ELSEIF ($and ($eq ($prop ($dobj) rarea) 2) ($eq ($loc .ME) mrm5)) THEN
(scord)
ELSEIF ($and ($eq ($prop ($dobj) rarea) 1) ($eq ($loc .ME) mrm3)) THEN
(scord)
)
;
scord =
($setp .ME pscore ($plus ($prop .ME pscore) ($prop ($dobj) pplace)))
($setp ($dobj) pplace 0)
;
rname(ACTION) =
(($sdesc ($loc .ME)))
($exit 1)
;
shell(ACTION) =
($spec EXEC "shell" 0)
;