home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
GAMES
/
informosk.lha
/
verblib.h
< prev
Wrap
Text File
|
1993-11-27
|
24KB
|
917 lines
! ----------------------------------------------------------------------------
! VERBLIB: A library of standard verb routines which run the universe:
!
! Quit, Restart, Restore, Verify, Save, ScriptOn, ScriptOff,
! Inv, Take, Drop, Remove, PutOn, Insert, Transfer, Empty,
! Enter, Exit, Go, Look, Examine, Give,
! Unlock, Lock, SwitchOn, SwitchOff, Open, Close, Disrobe, Wear, Eat;
!
! and routines for verbs which by default only print a suitable reply:
!
! Rhet [rhetorical answer], Burn, Pray, Wake, WakeOther [person],
! Kiss, Think, Smell, Listen, Taste, Touch, TouchThing, Dig,
! Cut, Jump [jump on the spot], JumpOver, Tie, Drink,
! Fill, Sorry, Strong [swear word], Mild [swear word], Attack, Swim,
! Swing [something], Blow, Rub, Set, WaveHands [ie, just "wave"],
! Wave [something], Pull, Push, PushDir [push something in a direction],
! Turn, Squeeze, LookUnder [look underneath something], Search,
! ThrowAt, Answer, Buy, Ask, Sing, Climb, Wait, Sleep
!
! and the useful routine DescribeObj which describes an object with
! its possessions.
! ----------------------------------------------------------------------------
! The SACK_OBJECT, look-modes, defaults added
! ----------------------------------------------------------------------------
Default MAX_CARRIED 100;
Default MAX_SCORE 0;
Default NUMBER_TASKS 1;
Default OBJECT_SCORE 4;
Default ROOM_SCORE 5;
Default SACK_OBJECT 0;
[ ScoreSub;
if deadflag==0
{ print "You have so far scored ";
}
if deadflag > 0 { print "In that game you scored "; }
print_num score; print " out of a possible "; print_num MAX_SCORE;
print ", in ";
print_num turns; print " turns";
PrintRank();
];
Global task_done data NUMBER_TASKS;
[ Achieved num;
if task_done->num==0
{ put task_done byte num 1;
score=score+task_scores->num;
}
];
[ PANum m n;
print " ";
n=m;
if n<0 { n=0-m; n=n*10; }
if n<10 { print " "; jump panuml; }
if n<100 { print " "; jump panuml; }
if n<1000 { print " "; }
.panuml;
print_num m; print " ";
];
[ FullScoreSub i l;
ScoreSub();
if score==0 { rfalse; }
new_line;
if deadflag > 0 { print "The score was "; }
if deadflag ==0 { print "The score is "; }
print "made up as follows:^^";
l=NUMBER_TASKS-1;
for i 0 to l
{ if task_done->i==1 { PANum(task_scores->i); PrintTaskName(i); }
}
if things_score~=0 { PANum(things_score); print "finding sundry items^"; }
if places_score~=0 { PANum(places_score); print "visiting various places^"; }
new_line;
PANum(score); print "total (out of "; print_num MAX_SCORE; print ")^";
];
[ QuitSub i;
print "Are you sure you want to quit? ";
.QSL; read buffer parse;
i=parse-->1;
if i==#w$yes or #w$y { quit; }
if i==#w$no or #w$n { rtrue; }
print "Please answer yes or no.";
print_char '>'; print_char ' ';
jump QSL;
];
[ RestartSub i;
print "Are you sure you want to restart? ";
.RSL; read buffer parse;
i=parse-->1;
if i==#w$yes { restart; }
if i==#w$y { restart; }
if i==#w$no { rtrue; }
if i==#w$n { rtrue; }
print "Please answer yes or no.";
print_char '>'; print_char ' ';
jump RSL;
];
[ RestoreSub;
restore Rmaybe;
print_ret "Failed.";
.RMaybe; print "Ok.^";
];
[ SaveSub;
save Smaybe;
print_ret "Failed.";
.Smaybe; print "Ok.^";
];
[ VerifySub;
verify Vmaybe;
jump Vwrong;
.Vmaybe; print_ret "The game file has verified as intact.";
.Vwrong;
print_ret "The game file did not verify properly, and may be corrupted \
(unless you are running it on a primitive interpreter which does not properly implement \
the VERIFY code).";
];
[ ScriptOnSub i;
if transcript_mode==1 { print_ret "Transcripting is already on."; }
transcript_mode=1;
i=(0-->8)|1;
put 0 word 8 i;
print "Start of a transcript of^";
Banner();
];
[ ScriptOffSub i;
if transcript_mode==0 { print_ret "Transcripting is already off."; }
print "^End of transcript.^";
transcript_mode=0;
i=(0-->8)&$fffe;
put 0 word 8 i;
];
[ InvSub i;
i=child(player);
if i==0
{ print_ret "You are carrying nothing."; }
print "You are carrying:^";
Inventory(player);
PostAct();
];
[ Inventory obj n o2 i;
o2=1;
if n~=0
{ for i 1 to n { print " "; }
o2=DescribeObj(obj,0); new_line;
}
if o2==0 { rtrue; }
o2=child(obj);
while o2~=0
{ Inventory(o2,n+1); o2=sibling(o2);
}
];
[ TakeSub i;
i=RTakeSub(location);
if i~=0 { rtrue; }
if 1==PostAct() { rtrue; }
notheld_mode=onotheld_mode;
if notheld_mode==0 { print "Taken.^"; }
];
[ RTakeSub fromobj i j k;
if inp1==player
{ print_ret "As the bishop said to the actress."; }
if inp1 has animate
{ print "I don't suppose "; DefArt(inp1);
print_ret " would care for that.";
}
i=parent(inp1);
if i==player
{ print_ret "You already have that."; }
while i~=fromobj
{ if i hasnt container
{ if i hasnt supporter { print_ret "That isn't available."; } }
if i has container
{ if i hasnt open
{ print "Unfortunately the "; print_obj i; print_ret " isn't open."; }
}
i=parent(i);
if i==player { i=fromobj; }
}
if inp1 has scenery { print_ret "That's hardly portable."; }
if inp1 has static { print_ret "Fixed in place."; }
j=child(player); k=0; while j~=0 { if j hasnt worn { k=k+1; } j=sibling(j); }
if k>=MAX_CARRIED
{ if SACK_OBJECT~=0
{ if parent(SACK_OBJECT)~=player
{ print_ret "You're carrying too many things already."; }
k=child(player); j=0;
while k~=0
{ if k~=SACK_OBJECT { if k hasnt worn { if k hasnt light { j=k; } } }
k=sibling(k);
}
if j~=0
{ print "(putting "; DefArt(j); print " into ";
DefArt(SACK_OBJECT); print " to make room)^";
remove_obj j; insert_obj j SACK_OBJECT;
}
else { print_ret "You're carrying too many things already."; }
}
else { print_ret "You're carrying too many things already."; }
}
move inp1 to player;
if inp1 hasnt moved
{ give inp1 moved;
if inp1 has scored { score=score+OBJECT_SCORE;
things_score=things_score+OBJECT_SCORE; }
}
rfalse;
];
[ DropSub i;
i=parent(inp1);
if i==location
{ print_ret "Already on the floor."; }
if i~=player
{ print_ret "You haven't got that."; }
if inp1 has worn
{ print "(First taking it off)^"; give inp1 ~worn; }
move inp1 to parent(player);
if 1==PostAct() { rtrue; }
print "Dropped.^";
];
[ RemoveSub i;
i=parent(inp1);
if i has container
{ if i hasnt open { print_ret "Alas, it is closed."; }
}
if i~=inp2 { print_ret "But it isn't there now."; }
if inp2 has worn { print_ret "You'll need to take it off first."; }
i=RTakeSub(inp2);
if i~=0 { rtrue; }
action=#a$TakeSub;
if 1==PostAct() { rtrue; }
action=#a$RemoveSub;
if 1==PostAct() { rtrue; }
print "Removed.^";
];
[ PutOnSub k p;
if inp2==d_obj { action=#a$DropSub; Process(inp1,0); rfalse; }
if parent(inp1)~=player
{ print_ret "You need to be holding it before you can put it onto \
something else."; }
if inp2 hasnt supporter { print "Putting things on "; DefArt(inp2);
print_ret " would achieve nothing."; }
if parent(inp2)==player { print_ret "You lack the dexterity."; }
if inp1 has worn { print "(first taking it off)^"; give inp1 ~worn; }
k=0; p=child(inp2); while p~=0 { p=sibling(p); inc k; }
if k>=prop(inp2,capacity) { print "There is no more room on ";
DefArt(inp2); print_ret "."; }
move inp1 to inp2;
if 1==PostAct() { rtrue; }
if multiflag==1 { print_ret "Done."; }
print "You put the "; print_obj inp1; print " on ";
DefArt(inp2); print_ret ".";
];
[ InsertSub k p;
if inp2==d_obj { action=#a$DropSub; Process(inp1,0); rfalse; }
if parent(inp1)~=player
{ print_ret "You need to be holding it before you can put it into \
something else."; }
if inp2 hasnt container { print_ret "That can't contain things."; }
if inp2 hasnt open { print_ret "Alas, it is closed."; }
if inp2 has worn { print_ret "You'll need to take it off first."; }
if inp1 has worn { print "(first taking it off)^"; give inp1 ~worn; }
k=0; p=child(inp2); while p~=0 { p=sibling(p); inc k; }
if k>=prop(inp2,capacity) { print "There is no more room in ";
DefArt(inp2); print_ret "."; }
move inp1 to inp2;
if 1==PostAct() { rtrue; }
if multiflag==1 { print_ret "Done."; }
print "You put the "; print_obj inp1; print " into ";
DefArt(inp2); print_ret ".";
];
[ TransferSub i a;
a=#a$DropSub;
if inp2 has container { a=#a$InsertSub; }
else { if inp2 has supporter { a=#a$PutOnSub; } }
i=parent(inp1);
if i~=player
{ while i~=0
{ if i hasnt open { print_ret "That isn't in your possession."; }
i=parent(i);
if i==player { jump Segue; }
}
print_ret "First pick that up.";
}
.Segue; move inp1 to player;
Process(inp1,inp2,a); rfalse;
];
[ EmptySub;
inp2=d_obj; EmptyTSub();
];
[ EmptyTSub i j;
if inp1 hasnt container { CDefArt(inp1);
print_ret " can't contain things."; }
if inp1 hasnt open { CDefArt(inp1); print_ret " is closed."; }
if inp2~=d_obj
{ if inp2 hasnt container
{ CDefArt(inp2); print_ret " can't contain things."; }
if inp2 hasnt open { CDefArt(inp2); print_ret " is closed."; }
}
i=child(inp1);
if i==0 { DefArt(inp1); print_ret " is empty already."; }
while i~=0
{ j=sibling(i);
print_obj i; print ": ";
Process(i,inp2,#a$TransferSub);
i=j;
}
];
[ EnterSub i;
if inp1 has portal { GoSub(); rtrue; }
i=parent(player);
if i~=location
{ print "But you're already in the "; print_obj i; print_ret "."; }
if inp1 hasnt enterable { print_ret "A surreal idea."; }
i=parent(inp1);
if i==compass { GoSub(); rtrue; }
if i~=location { print_ret "You can only get into something on the floor."; }
move player to inp1;
print "You get into the "; print_obj inp1; print ".^";
Locale(inp1);
];
[ ExitSub;
if parent(player)==location
{ print_ret "But you're aren't in anything at the moment."; }
move player to location;
print "You are on your own two feet again.^"; LookSub(1);
PostAct();
];
[ VagueGoSub;
print_ret "You'll have to say which compass direction to go in.";
];
[ GoSub i j df movewith;
movewith=0;
i=parent(player);
if location~=thedark
{ if i~=location
{ j=prop(i,preroutine);
if j~=$ffff
{ if indirect(j)~=0
{ movewith=i; i=parent(i);
jump gotroom;
}
}
print "You'll have to get out of "; DefArt(i);
print_ret " first.";
}
}
.gotroom;
j=prop(i, prop(inp1, dirprop));
if j==0
{ i=prop(i,cantgo); print_paddr i; new_line; rfalse;
}
if j has portal
{ if j has concealed { print_ret "You can't go that way."; }
if j hasnt open
{ if inp1==u_obj
{ print "You are unable to climb "; Defart(j); print_ret "."; }
if inp1==d_obj
{ print "You are unable to descend "; Defart(j); print_ret "."; }
print "You can't, since "; Defart(j); print_ret " is in the way.";
}
j=prop(j,portalto);
if j==0 { print "You can't, since "; Defart(j);
print_ret " leads nowhere."; }
}
if movewith==0 { move player to j; }
if movewith~=0 { move movewith to j; }
df=OffersLight(j);
if df~=0 { location=j; lightflag=1; }
if df==0
{ if location==thedark
{ DarkToDark();
}
location=thedark; lightflag=0;
}
if 1==LPostAct() { rtrue; }
LookSub(1);
];
[ SayWhatsOn descon o p i k;
new_line;
print "On "; DefArt(descon);
k=0; p=child(descon); while p~=0 { p=sibling(p); inc k; }
if k==1 { print " is "; } else { print " are "; }
o=child(descon);
while o~=0
{ i=i+1;
DescribeObj(o,1);
if i==k-1 { print " and "; }
if i < k-1 { print ", "; }
o=sibling(o);
}
print ".^";
];
[ Locale descin o k j flag i;
o=child(descin); k=0;
while o~=0
{ if o hasnt concealed
{ if o hasnt scenery
{ give o workflag; inc k;
if o hasnt moved
{ j=prop(o,initpos);
if o has portal
{ if o hasnt open { j=prop(o,closedpos); }
}
if o has switchable
{ if o hasnt on { j=prop(o,closedpos); }
}
if j~=0
{ new_line;
print_paddr j; new_line; flag=1;
give o ~workflag; dec k;
if o has supporter
{ if child(o)~=0 { SayWhatsOn(o); }
}
}
}
}
else
{ if o has supporter
{ if child(o)~=0 { SayWhatsOn(o); }
}
}
}
o=sibling(o);
}
if k==0 { return; }
new_line;
if descin~=location { print "In "; DefArt(descin); print " you"; }
if descin==location { print "You"; }
print " can ";
if flag==1 { print "also "; }
print "see "; i=0;
o=child(descin);
while o~=0 {
if o has workflag
{ i=i+1;
DescribeObj(o,1);
if i==k-1 { print " and "; }
if i < k-1 { print ", "; }
}
o=sibling(o);
}
if descin~=location { print ".^"; }
if descin==location { print " here.^"; }
];
[ LMode1Sub;
lookmode=1; print_paddr #Story;
print_ret " is now in its normal ~brief~ printing mode, which gives long descriptions of \
places never before visited and short descriptions otherwise.";
];
[ LMode2Sub;
lookmode=2; print_paddr #Story;
print_ret " is now in its ~verbose~ mode, which always gives long descriptions of \
locations (even if you've been there before).";
];
[ LMode3Sub;
lookmode=3; print_paddr #Story;
print_ret " is now in its ~superbrief~ mode, which always gives short descriptions of \
locations (even if you haven't been there before).";
];
[ LookSub weary i descin;
descin=location;
if descin~=lastdesc { NewRoom(); }
new_line; print_obj location; i=parent(player);
if location~=thedark
{ if i~=location { print " (in the "; print_obj i; print ")"; descin=i; }
}
new_line;
if weary~=1 { jump YesLD; }
if lookmode==2 { jump YesLD; }
if lookmode==3 { jump NoLD; }
if location has visited
{ if weary==1 { jump NoLD; }
}
.YesLD;
i = prop(location,longdesc);
print_paddr i; new_line;
.NoLD;
if location hasnt visited
{ give location visited;
if location has scored
{ score=score+ROOM_SCORE;
places_score=places_score+ROOM_SCORE;
}
}
if descin~=location { Locale(location); }
Locale(descin);
LookRoutine();
action=#a$LookSub;
if 1==LPostAct() { rtrue; }
];
[ ExamineSub i;
if location==thedark
{ print_ret "Darkness, noun. An absence of light to see by."; }
if inp1==player { print_ret "As good-looking as ever."; }
if inp1 has autosearch { SearchSub(); rfalse; }
i=prop(inp1,longdesc);
if i==0
{ if inp1 has container { SearchSub(); rfalse; }
print "You see nothing special about "; Defart(inp1); print_ret ".";
}
print_paddr i; new_line;
if inp1 has switchable
{ print "It is currently switched ";
if inp1 has on { print "on.^"; }
if inp1 hasnt on { print "off.^"; }
}
if 1==PostAct() { rtrue; }
];
[ DescribeObj o listmode p p2 i k rval;
if listmode ~=2 { Indefart(o); }
if listmode ==2 { Defart(o); }
if o has light { print " (providing light)"; }
if o has worn { print " (being worn)"; }
if o has container
{ if listmode ~=2 { print " (which is "; }
if listmode ==2 { print ", which is "; }
if o hasnt open
{ print "closed";
if o has interior { jump Cdone; }
}
if o has open { print "open"; }
p=child(o);
if p==0
{ print " but empty";
jump Cdone;
}
if listmode==0 { rval=1; jump Cdone; }
print " and contains ";
k=0; p2=p; while p2~=0 { p2=sibling(p2); inc k; }
i=0; while p~=0 { inc i; DescribeObj(p,1);
if i==k-1 { print " and "; }
if i < k-1 { print ", "; }
p=sibling(p);
}
.Cdone;
if listmode ~=2 { print ")"; }
}
if o has supporter
{ p=child(o);
if p~=0
{ if listmode ~=2 { print " (on which "; }
if listmode ==2 { print ", on top of which "; }
if listmode==0 { rval=1; jump Sdone; }
k=0; p2=p;
while p2~=0
{ p2=sibling(p2); inc k; }
if k==1 { print "is "; } else { print "are "; }
i=0; while p~=0 { inc i; DescribeObj(p,1);
if i==k-1 { print " and "; }
if i < k-1 { print ", "; }
p=sibling(p);
}
.SDone;
if listmode ~=2 { print ")"; }
}
}
return rval;
];
[ GiveSub;
if Life(inp2,#a$GiveSub)~=0 { rfalse; }
print_obj inp2; print_ret " doesn't seem interested.^";
];
[ UnlockSub i;
if inp1 hasnt lockable { print_ret "I can't see how to unlock that."; }
if inp1 hasnt locked { print_ret "It is in fact unlocked now."; }
i=prop(inp1,with_key);
if i~=inp2 { print_ret "That doesn't seem to fit the lock."; }
give inp1 ~locked;
if 1==PostAct() { rtrue; }
print "You unlock the "; print_obj(inp1); print ".^";
];
[ LockSub i;
if inp1 hasnt lockable { print_ret "I can't see how to lock that."; }
if inp1 has locked { print_ret "It is in fact locked now."; }
if inp1 has open { print_ret "First you'll have to close it."; }
i=prop(inp1,with_key);
if i~=inp2 { print_ret "That doesn't seem to fit the lock."; }
give inp1 locked;
if 1==PostAct() { rtrue; }
print "You lock the "; print_obj(inp1); print ".^";
];
[ SwitchonSub;
if inp1 hasnt switchable
{ print_ret "That's not something you can switch."; }
if inp1 has on { print_ret "It's already on."; }
give inp1 on;
if 1==PostAct() { rtrue; }
print "You switch the "; print_obj(inp1); print " on.^";
];
[ SwitchoffSub;
if inp1 hasnt switchable
{ print_ret "That's not something you can switch."; }
if inp1 hasnt on { print_ret "It's already off."; }
give inp1 ~on;
if 1==PostAct() { rtrue; }
print "You switch the "; print_obj(inp1); print " off.^";
];
[ OpenSub;
if inp1 hasnt openable { print_ret "That's not something you can open."; }
if inp1 has locked { print_ret "It seems to be locked."; }
if inp1 has open { print_ret "It's already open."; }
give inp1 open;
if 1==PostAct() { rtrue; }
print "You open the "; print_obj(inp1); print ".^";
];
[ CloseSub;
if inp1 hasnt openable { print_ret "That's not something you can close."; }
if inp1 hasnt open { print_ret "It's already closed."; }
give inp1 ~open;
if 1==PostAct() { rtrue; }
print "You close the "; print_obj(inp1); print ".^";
];
[ DisrobeSub;
if inp1 hasnt worn { print_ret "You're not wearing that."; }
give inp1 ~worn;
if 1==PostAct() { rtrue; }
print "You take off the "; print_obj(inp1); print ".^";
];
[ WearSub i;
if inp1 hasnt clothing { print_ret "You can't wear that!"; }
i=parent(inp1);
if i~=player { print_ret "You're not holding that!"; }
give inp1 worn;
if 1==PostAct() { rtrue; }
print "You put on the "; print_obj(inp1); print ".^";
];
[ EatSub;
if inp1 hasnt edible { print_ret "No, it's plainly inedible."; }
remove inp1;
if 1==PostAct() { rtrue; }
print "You eat the "; print_obj inp1; print_ret ". Not bad.";
];
[ RhetSub;
print_ret "That was a rhetorical question.";
];
[ BurnSub;
print_ret "In this game, arson is (usually) forbidden.";
];
[ PraySub;
print_ret "Spooky! For a moment there, a deep voice seemed
to say ~you're on your own~.";
];
[ WakeSub;
print_ret "The dreadful truth is, this is not a dream.";
];
[ WakeOtherSub;
print_ret "That seems unnecessary.";
];
[ KissSub;
if Life(inp1,#a$KissSub)~=0 { rfalse; }
print_ret "Keep your mind on the game.";
];
[ ThinkSub;
print_ret "What a good idea.";
];
[ SmellSub;
print_ret "You smell nothing unexpected.";
];
[ ListenSub;
print_ret "You hear nothing unexpected.";
];
[ TasteSub;
print_ret "You taste nothing unexpected.";
];
[ TouchSub;
print_ret "You feel nothing unexpected.";
];
[ TouchThingSub;
if inp1 has animate { print_ret "Keep your hands to yourself!"; }
print_ret "You feel nothing unexpected.";
];
[ DigSub;
print_ret "The ground is unsuitable for digging here.";
];
[ CutSub;
print_ret "In this game, cutting things up is never helpful.";
];
[ JumpSub;
print_ret "You jump on the spot, fruitlessly.";
];
[ JumpOverSub;
print_ret "In this game, it is never useful to jump over things.";
];
[ TieSub;
print_ret "In this game, it is never useful to tie things.";
];
[ DrinkSub;
print_ret "There's nothing suitable to drink here.";
];
[ FillSub;
print_ret "But there's no water here to carry.";
];
[ SorrySub;
print_ret "Oh, don't apologise.";
];
[ StrongSub;
print_ret "Disgraceful! Once upon a time adventurers had moral standards.";
];
[ MildSub;
print_ret "Quite.";
];
[ AttackSub;
if inp1 has animate
{ if Life(inp1,#a$AttackSub)~=0 { rfalse; } }
print_ret "Violence isn't the answer, you know.";
];
[ SwimSub;
print_ret "There's not enough water to swim in.";
];
[ SwingSub;
print_ret "There's nothing sensible to swing here.";
];
[ BlowSub;
print_ret "You can't usefully blow that.";
];
[ RubSub;
print_ret "You achieve nothing by this.";
];
[ SetSub;
print_ret "No, you can't set that.";
];
[ WaveHandsSub;
print_ret "You wave, feeling foolish.";
];
[ WaveSub i;
i=parent(inp1);
if i~=player { print_ret "But you aren't holding it."; }
print "You look ridiculous waving the "; print_obj inp1;
print_ret ".";
];
[ PullSub;
if inp1 has static { print_ret "It is fixed in place."; }
if inp1 has scenery { print_ret "You are unable to."; }
print_ret "Nothing obvious happens.";
];
[ PushSub;
if inp1 has static { print_ret "It is fixed in place."; }
if inp1 has scenery { print_ret "You are unable to."; }
print_ret "Nothing obvious happens.";
];
[ AllowPushDir i;
i=parent(inp2);
if i~=compass { print_ret "That's not a direction."; }
if inp2==u_obj or d_obj { print_ret "Not that way you can't."; }
PostAct();
i=inp1; inp1=inp2; Process(inp1, inp2, #a$GoSub);
remove_obj i; insert_obj i location;
];
[ PushDirSub;
print_ret "Is that the best you can think of?";
];
[ TurnSub;
if inp1 has static { print_ret "It is fixed in place."; }
if inp1 has scenery { print_ret "You are unable to."; }
print_ret "Nothing obvious happens.";
];
[ SqueezeSub;
if inp1 has animate { print_ret "Keep your hands to yourself."; }
print_ret "You achieve nothing by this.";
];
[ LookUnderSub;
print_ret "You find nothing of interest.";
];
[ SearchSub;
if inp1 hasnt container
{ print_ret "You find nothing of interest."; }
if inp1 has interior
{ if inp1 hasnt open
{ print_ret "You can't see inside, since it is closed."; }
}
if 1==PostAct() { rtrue; }
print "You peer at ";
DescribeObj(inp1,2); print_ret ".";
];
[ ThrowAtSub;
if inp2 hasnt animate { print_ret "Futile."; }
if Life(inp2,#a$ThrowAtSub)~=0 { rfalse; }
print_ret "You lack the nerve when it comes to the crucial moment.";
];
[ AnswerSub;
if Life(inp2,#a$AnswerSub)~=0 { rfalse; }
print_ret "No reply.";
];
[ BuySub;
print_ret "Nothing is on sale.";
];
[ AskSub;
if Life(inp1,#a$AskSub)~=0 { rfalse; }
print_ret "No reply.";
];
[ SingSub;
if random(2)==1 { print "Your yodelling "; }
else { print "Your singing "; }
print_ret "is atrocious, if you say so yourself.";
];
[ ClimbSub;
print_ret "I don't think much is to be achieved by that.";
];
[ WaitSub;
if 1==LPostAct() { rtrue; }
print_ret "Time passes.";
];
[ SleepSub;
print_ret "You must have slept yourself out. \
You certainly aren't drowsy now.";
];