! The primitive accessibility rule [ CSITDR; if (location == thedark) { RulebookSucceeds(); rtrue; } rfalse; ]; [ PA_R mask at; ! print "Actor is ", (the) actor, "^"; if (act_requester) rfalse; ! if (actor ~= player) print "Running PAR for actor = ", (the) actor, "^"; at = FindAction(); if (at == 0) rfalse; mask = ActionData-->(at+1); ! print "inp1 = ", inp1, "; inp2 = ", inp2, "^"; ! print "Mask is ", mask, "^"; if ((mask & $$00100) && (actor == player) && (ProcessRulebook(VISIBLE_RB)) && ((rulechange_stack-->rulechange_sp == RS_SUCCEEDS))) { BeginActivity(TOODARK_ACT); if (ForActivity(TOODARK_ACT)==false) L__M(##Miscellany, 17); EndActivity(TOODARK_ACT); I7_action_deciding_rule = CSITDR; RulebookFails(); rtrue; } if ((mask & $$00001) && noun && (inp1 ~= 1)) { if (noun in compass) { RulebookFails(); I7_action_deciding_rule = PA_R; if (actor~=player) rtrue; "You must name something more substantial.^"; } if (ObjectIsUntouchable(noun, (actor~=player), FALSE, actor)) { ! if (actor ~= player) print "Fails on noun^"; RulebookFails(); I7_action_deciding_rule = PA_R; rtrue; } } if ((mask & $$00010) && second && (inp2 ~= 1)) { if (second in compass) { RulebookFails(); I7_action_deciding_rule = PA_R; if (actor~=player) rtrue; "You must name something more substantial.^"; } if (ObjectIsUntouchable(second, (actor~=player), FALSE, actor)) { ! if (actor ~= player) print "Fails on second^"; RulebookFails(); I7_action_deciding_rule = PA_R; rtrue; } } rfalse; ]; [ GL__M a b c; if ((actor ~= player) || (untouchable_silence)) rtrue; return L__M(a,b,c); ]; [ HisHerTheir o; if (o has pluralname) { print "their"; return; } if (o has female) { print "her"; return; } print "his"; ]; ! Waiting [ WaitSub_R1; if (actor ~= player) print_ret (The) actor, " waits.^"; return L__M(##Wait,1,noun); ]; ! The inventory [ InvSub_O1; if (actor ~= player) rfalse; if (inventory_style==0) inventory_style = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT; rfalse; ]; [ InvSub_O2; if (actor ~= player) rfalse; if (child(player)==0) return L__M(##Inv,1); rfalse; ]; [ InvSub_O3; if (actor ~= player) rfalse; L__M(##Inv,2); if (inventory_style & NEWLINE_BIT ~= 0) print ":^"; else print " "; WriteListFrom(child(player), inventory_style, 1); if (inventory_style & ENGLISH_BIT ~= 0) print ".^"; rfalse; ]; [ InvSub_O4 x; if (actor ~= player) rfalse; #IFNDEF MANUAL_PRONOUNS; objectloop(x in player) PronounNotice(x); #ENDIF; x = 0; ! To prevent a "not used" error rfalse; ]; [ InvSub_R1; if (actor ~= player) print_ret (The) actor, " looks through ", (HisHerTheir) actor, " possessions.^"; rfalse; ]; ! Object movements Global ac_common_ancestor; Global take_after_recipient; [ TakeSub_C1; if (onotheld_mode==1 && noun in actor) { RulebookSucceeds(); rtrue; } rfalse; ]; [ TakeSub_C2; if (noun == actor) return GL__M(##Take,2); rfalse; ]; [ TakeSub_C3; if (noun has animate) return GL__M(##Take,3,noun); rfalse; ]; [ TakeSub_C4 i; ! if (noun provides component_parent) ! return GL__M(##Take,7,noun.component_parent); ac_common_ancestor = OIU_CommonAncestor(actor, noun); if (ac_common_ancestor == 0) { i = ObjectScopedBySomething(noun); if (i ~= 0) ac_common_ancestor = CommonAncestor(actor, i); } rfalse; ]; [ OIUB_AP i; if (noun ~= ac_common_ancestor) { i = OIU_Parent(noun); while (i~=ac_common_ancestor && i) { if (i has animate) return GL__M(##Take,6,i); i = OIU_Parent(i); } } rfalse; ]; ![ TakeSub_C5; ! if (ac_common_ancestor == 0) return GL__M(##Take,8,noun); rfalse; ]; [ TakeSub_C6; if (ac_common_ancestor == noun) return GL__M(##Take,4,noun); rfalse; ]; [ TakeSub_C7; if (noun in actor) return GL__M(##Take,5,noun); rfalse; ]; [ TakeSub_C8 i k; i=parent(noun); take_after_recipient = 0; if (i && (i ~= ac_common_ancestor) && (i has container || i has supporter)) { take_after_recipient=i; k=action; action=##LetGo; if (RunRoutines(i,before)~=0) { action=k; rtrue; } action=k; } rfalse; ]; [ TakeSub_C9; if (noun has scenery) return GL__M(##Take,10,noun); rfalse; ]; [ TakeSub_C10; if (noun has static) return GL__M(##Take,11,noun); rfalse; ]; [ TakeSub_C11 j k; if (SACK_OBJECT == nothing || SACK_OBJECT notin actor) rfalse; k=0; objectloop (j in actor) if (j hasnt worn) k++; if (k >= ValueOrRun(actor,capacity)) { j=0; objectloop (k in actor) if (k~=SACK_OBJECT && k hasnt worn && k hasnt light) j=k; if (j~=0) { GL__M(##Take,13,j); keep_silent = 1; ; keep_silent = 0; if (j notin SACK_OBJECT) rtrue; rfalse; } } rfalse; ]; [ TakeSub_C12 j k; k=0; objectloop (j in actor) if (j hasnt worn) k++; if (k >= ValueOrRun(actor,capacity)) return GL__M(##Take,12); rfalse; ]; [ TakeSub_O1 rest i; ! if ((noun provides component_parent) && (rest = (noun.component_parent))) { ! noun.component_parent = nothing; ! if (rest provides add_to_scope) { ! for (i=0: i<(rest.#add_to_scope)/2: i++) { ! if ((rest.&add_to_scope)-->i == noun) ! (rest.&add_to_scope)-->i = nothing; ! } ! } ! } ! move noun to actor; I7_Move(noun, actor); rfalse; ]; [ TakeSub_O2 k; if (take_after_recipient) { k=action; action=##LetGo; if (RunRoutines(take_after_recipient,after)~=0) { action=k; rtrue; } action=k; } rfalse; ]; [ TakeSub_R1; if (actor == player) { notheld_mode=onotheld_mode; if (notheld_mode==1) { RulebookSucceeds(); rtrue; } } rfalse; ]; [ TakeSub_R2; if (player == actor) return GL__M(##Take, 1); print (The) actor, " picks up ", (the) noun, ".^^"; ]; [ RemoveSub_C1 i; i=parent(noun); if (i has container && i hasnt open) return GL__M(##Remove,1,noun); rfalse; ]; [ RemoveSub_C2 i; i=parent(noun); if (i~=second) return GL__M(##Remove,2,noun); rfalse; ]; [ RemoveSub_C3 i; i=parent(noun); if (i has animate) return GL__M(##Take,6,i); rfalse; ]; [ RemoveSub_O2; action=##Take; if (AfterRoutines()==1) { action=##Remove; rtrue; } action=##Remove; rfalse; ]; [ RemoveSub_R1; if (player == actor) return GL__M(##Remove,3,noun); print (The) actor, " removes ", (the) noun, " from ", (the) second, ".^^"; ]; [ DropSub_C1; if (noun == actor) return GL__M(##PutOn, 4); rfalse; ]; [ DropSub_C2; if (noun in parent(actor)) return GL__M(##Drop,1,noun); rfalse; ]; [ DropSub_C3; if (noun notin actor) return GL__M(##Drop,2,noun); rfalse; ]; [ DropSub_C4 k; if (noun has worn) { GL__M(##Drop,3,noun); say__p=0; k = keep_silent; keep_silent = 1; ; keep_silent = k; if (noun has worn && noun in actor) rtrue; } rfalse; ]; [ DropSub_C5 p; p = parent(actor); if (p ofclass K1_room) rfalse; if (children(p) < ValueOrRun(p,capacity)) rfalse; if (actor ~= player) rtrue; print "There is no more room "; if (p has supporter) print "on "; else print "in "; print (the) p, ".^^"; rtrue; ]; [ DropSub_O1; I7_Move(noun, parent(actor)); give noun ~worn; rfalse; ]; [ DropSub_R1; if (player == actor) return GL__M(##Drop,4,noun); print (The) actor, " puts down ", (the) noun, ".^^"; ]; [ PutOnSub_C1; if (second == d_obj || actor in second) return GVS_Convert(##Drop, noun, 0);; rfalse; ]; [ PutOnSub_C2; if (parent(noun)~=actor) return GL__M(##PutOn,1,noun); rfalse; ]; [ PutOnSub_C3; if (OIU_Core(noun) == OIU_Core(second)) return GL__M(##PutOn,2,noun); ac_common_ancestor = OIU_CommonAncestor(noun, second); if (ac_common_ancestor == noun) return GL__M(##PutOn,2,noun); rfalse; ]; [ PutOnSub_C4; if (second ~= ac_common_ancestor) { action=##Receive; receive_action=##PutOn; if (RunRoutines(second,before)~=0) { action=##PutOn; return; } action=##PutOn; } rfalse; ]; [ PutOnSub_C5; if (second hasnt supporter) return GL__M(##PutOn,3,second); rfalse; ]; [ PutOnSub_C6; if (ac_common_ancestor == actor) return GL__M(##PutOn,4); rfalse; ]; [ PutOnSub_C7 k; if (noun has worn) { GL__M(##PutOn,5,noun); say__p=0; k = keep_silent; keep_silent = 1; ; keep_silent = k; if (noun has worn) rtrue; } rfalse; ]; [ PutOnSub_C8; if (children(second)>=ValueOrRun(second,capacity)) return GL__M(##PutOn,6,second); rfalse; ]; [ PutOnSub_O1; move noun to second; give noun ~worn; rfalse; ]; [ PutOnSub_O2; if (second ~= ac_common_ancestor) { action=##Receive; if (RunRoutines(second,after)~=0) { action=##PutOn; return; } action=##PutOn; } rfalse; ]; [ PutOnSub_R1; if (player == actor) { if (multiflag==1) return GL__M(##PutOn,7); return GL__M(##PutOn,8,noun); } else { print (The) actor, " puts ", (the) noun, " on ", (the) second, ".^^"; rtrue; } ]; [ InsertSub_C1; if (second==d_obj || actor in second) return GVS_Convert(##Drop, noun, 0);; rfalse; ]; [ InsertSub_C2; if (parent(noun)~=actor) return GL__M(##Insert,1,noun); rfalse; ]; [ InsertSub_C3; if (OIU_Core(noun) == OIU_Core(second)) return GL__M(##Insert, 5, noun); ac_common_ancestor = OIU_CommonAncestor(noun, second); if (ac_common_ancestor == noun) return GL__M(##Insert, 5, noun); rfalse; ]; [ InsertSub_C4; if (second ~= ac_common_ancestor) { action=##Receive; receive_action = ##Insert; if (RunRoutines(second,before)~=0) { action=##Insert; rtrue; } action=##Insert; } rfalse; ]; [ InsertSub_C5; if (second ~= ac_common_ancestor) { if (second has container && second hasnt open) return GL__M(##Insert,3,second); } rfalse; ]; [ InsertSub_C6; if (second hasnt container) return GL__M(##Insert,2,second); rfalse; ]; [ InsertSub_C7 k; if (noun has worn) { GL__M(##Insert,6,noun); say__p=0; k = keep_silent; keep_silent = 1; ; keep_silent = k; if (noun has worn) rtrue; } rfalse; ]; [ InsertSub_C8; if (children(second) >= ValueOrRun(second,capacity)) return GL__M(##Insert,7,second); rfalse; ]; [ InsertSub_O1; move noun to second; give noun ~worn; rfalse; ]; [ InsertSub_O2; if (second ~= ac_common_ancestor) { action=##Receive; if (RunRoutines(second,after)~=0) { action=##Insert; rtrue; } action=##Insert; } rfalse; ]; [ InsertSub_R1; if (actor == player) { if (multiflag==1) return GL__M(##Insert,8,noun); GL__M(##Insert,9,noun); } else { print (The) actor, " puts ", (the) noun, " into ", (the) second, ".^^"; } rtrue; ]; ! Actions involving movement of the player [ EnterSub_C1; if (noun has door) return GVS_Convert(##Go, noun, 0);; rfalse; ]; [ EnterSub_C2; if (noun in compass) return GVS_Convert(##Go, noun, 0);; rfalse; ]; [ EnterSub_C3; if (actor in noun) return GL__M(##Enter,1,noun); rfalse; ]; [ EnterSub_C4; if (noun hasnt enterable) return GL__M(##Enter,2,noun); rfalse; ]; [ EnterSub_C5; if (noun has container && noun hasnt open) return GL__M(##Enter,3,noun); rfalse; ]; [ EnterSub_C6; ac_common_ancestor = OIU_CommonAncestor(actor, noun); rfalse; ]; [ EnterSub_C7; if (ac_common_ancestor == actor) return GL__M(##Enter,4,noun); rfalse; ]; [ EnterSub_C8 i j k; if (parent(actor) ~= parent(noun)) { while (actor notin ac_common_ancestor) { j = parent(actor); k = keep_silent; if (OIU_parent(j) ~= ac_common_ancestor || noun ~= ac_common_ancestor) { GL__M(##Enter,6,j); keep_silent = 1; } ; keep_silent = k; if (actor in j) return; } if (actor in noun) return; if (noun notin ac_common_ancestor) { if ((noun provides component_parent) && (noun.component_parent)) { j = OIU_Parent(noun); if (j) j = OIU_Parent(j); } else j = OIU_parent(noun); while (j && (OIU_parent(j) ~= ac_common_ancestor)) j = OIU_parent(j); if (j) { GL__M(##Enter,7,j); k = keep_silent; keep_silent = 1; ; keep_silent = k; if (actor notin j) return; return GVS_Convert(##Enter, noun, 0);; } } } rfalse; ]; [ EnterSub_O1; move actor to noun; rfalse; ]; [ EnterSub_R1; if (actor ~= player) { print (The) actor, " gets "; if (noun has container) print "into "; else print "onto "; print (the) noun, ".^^"; } GL__M(##Enter,5,noun); rfalse; ]; [ EnterSub_R2; if (actor == player) Locale(noun); rfalse; ]; [ ExitSub_C1; if (actor in Room_Of(actor)) { if ((parent(actor)).out_to ~= 0) return GVS_Convert(##Go, out_obj, 0);; } rfalse; ]; [ ExitSub_C2; if (actor in Room_Of(actor)) return GL__M(##Exit,1); rfalse; ]; [ ExitSub_C3 p; p=parent(actor); if (p has container && p hasnt open) return GL__M(##Exit,2,p); rfalse; ]; [ ExitSub_O1; noun = parent(actor); move actor to OIU_Parent(noun); rfalse; ]; [ ExitSub_R1; if (actor ~= player) print (The) actor, " gets out of ", (the) noun, ".^^"; GL__M(##Exit,3,noun); rfalse; ]; [ ExitSub_R2; if (actor == player) LookSub_P(1); rfalse; ]; [ GetOffSub_C1; if (actor in noun) <>; rfalse; ]; [ GetOffSub_C2; return GL__M(##GetOff,1,noun); ]; Global go_to_location; Global go_from_location; Global go_with_vehicle; Global go_dir_prop; [ Room_Of p; while(p) { if (p ofclass K1_room) return p; if (parent(p)) { p = parent(p); continue; } if (p.component_parent) { p = p.component_parent; continue; } return nothing; } return nothing; ]; [ GoSub_C1; go_to_location = 0; go_from_location = Room_Of(actor); go_with_vehicle = 0; go_dir_prop = 0; if (second ~= 0 && second notin Compass && ObjectIsUntouchable(second)) return; rfalse; ]; [ GoSub_C2 i j k; i=parent(actor); if (i ~= go_from_location) { j = location; location = go_from_location; k=RunRoutines(i,before); if (k~=3) location = j; if (k==1) go_with_vehicle = i; } rfalse; ]; [ GoSub_C3 i; if (go_with_vehicle == nothing) { i=parent(actor); if (i ~= go_from_location) { return GL__M(##Go,1,i); } } rfalse; ]; [ GoSub_C4 j; go_dir_prop=noun.door_dir; j = location; location = go_from_location; if (go_dir_prop ofclass Routine) go_dir_prop=RunRoutines(noun,door_dir); location = j; rfalse; ]; [ GoSub_C5 i; i = Room_Of(actor); if (go_with_vehicle) i = Room_Of(go_with_vehicle); go_to_location = i.go_dir_prop; rfalse; ]; [ GoSub_C6; if (go_to_location ofclass String) { if (player == actor) { print (string) go_to_location; new_line; } rtrue; } rfalse; ]; [ GoSub_C7 i j; i = Room_Of(actor); if (go_with_vehicle) i = Room_Of(go_with_vehicle); if (go_to_location ofclass Routine) { j = location; location = go_from_location; go_to_location = RunRoutines(i, go_dir_prop); location = j; if (go_to_location == true) rtrue; } rfalse; ]; [ GoSub_C8 i; i = parent(actor); if (go_with_vehicle) i = Room_Of(go_with_vehicle); if (go_to_location == nothing) { if (actor == player) { PrintOrRun(i, cant_go); say__p = 1; } rtrue; } rfalse; ]; [ GoSub_C9; if (go_to_location has door && go_to_location has concealed) return GL__M(##Go,2); rfalse; ]; [ GoSub_C10; if (go_to_location has door && go_to_location hasnt open) { if (noun==u_obj) return GL__M(##Go,3,go_to_location); if (noun==d_obj) return GL__M(##Go,4,go_to_location); return GL__M(##Go,5,go_to_location); } rfalse; ]; [ GoSub_C11 k j; if (go_to_location has door) { j = location; location = go_from_location; k=RunRoutines(go_to_location,door_to); location = j; if (k==0) return GL__M(##Go,6,go_to_location); if (k==1) rtrue; go_to_location = k; } rfalse; ]; [ GoSub_O1; if (go_with_vehicle==0) { if (actor == player) move player to go_to_location; else I7_Move(actor, go_to_location); } else I7_Move(go_with_vehicle, go_to_location); if (actor == player) location=go_to_location; rfalse; ]; [ GoSub_O2; if (actor == player) MoveFloatingObjects(); rfalse; ]; [ GoSub_O3 df; if (actor ~= player) rfalse; df = OffersLight(go_to_location); if (df~=0) { location=go_to_location; real_location=go_to_location; lightflag=1; } else { if (go_from_location == thedark) { DarkToDark(); if (deadflag~=0) rtrue; } real_location=go_to_location; location=thedark; lightflag=0; } rfalse; ]; [ GoSub_R1; if (player == actor) { if (say__pc & PARA_COMPLETED == 0) new_line; LookSub_P(1); } else { say__p = 1; print (The) actor; if (noun ofclass K3_direction) { if (location == go_from_location) print " goes "; else print " arrives "; if (location == go_to_location) { print "from "; switch (noun.p10_opposite) { u_obj: print "above"; d_obj: print "below"; default: print "the ", (name) noun.p10_opposite; } } else { if (location == go_from_location) { switch (noun) { u_obj: print "up"; d_obj: print "down"; default: print (name) noun; } } else { print "at ", (the) go_to_location, " from "; switch (noun.p10_opposite) { u_obj: print "above"; d_obj: print "below"; default: print "the ", (name) noun.p10_opposite; } } } } else { if (location == go_from_location) print " goes through "; else print " arrives from "; print (the) noun; } if (go_with_vehicle) { if (go_with_vehicle has supporter) print " on "; else print " in "; print (the) go_with_vehicle; } if (move_pushing) { print ", pushing ", (the) move_pushing; if (IndirectHolder(move_pushing, player)) { print " in front, and you along too"; } else { if (IndirectHolder(go_with_vehicle, player)) print " in front"; else if (location == go_from_location) print " away"; else print " in"; } } if ((IndirectHolder(go_with_vehicle, player)) && (IndirectHolder(move_pushing, player) == false)) { print ", taking you along.^"; I7_TryAction(0, player, ##Look, 0, 0); rfalse; } print ".^"; } rfalse; ]; ! Actions involving sight Global allow_abbreviated_look = 0; Global visibility_levels; [ LookSub_P allow_abbrev; allow_abbreviated_look = allow_abbrev; LookSub(); allow_abbreviated_look = 0; ]; [ LookSub_O1; if (actor ~= player) rfalse; if (parent(actor)==0) return RunTimeError(10); visibility_levels = 0; .MovedByInitial; if (location == thedark) { visibility_ceiling = thedark; NoteArrival(); } else { visibility_levels = FindVisibilityLevels(); if (visibility_ceiling == location) { NoteArrival(); if (visibility_ceiling ~= location) jump MovedByInitial; } } rfalse; ]; [ LookSub_O2 i j; ! Printing the top line: e.g. ! Octagonal Room (on the table) (as Frodo) if (actor ~= player) rfalse; I7_DivideParagraph(); style bold; if (visibility_levels == 0) print (name) thedark; else { if (visibility_ceiling ~= location) print (The) visibility_ceiling; else print (name) visibility_ceiling; } style roman; for (j=1, i=Vis_parent(actor):j0: j--, i=Vis_parent(i)) give i workflag; for (j=visibility_levels: j>0: j--) { for (i=actor, k=0: k; if (noun has worn) { RulebookFails(); rtrue; } } rfalse; ]; [ EatSub_O1; I7_Remove(noun); rfalse; ]; [ EatSub_R1; if (actor ~= player) print (The) actor, " eats ", (the) noun, ".^^"; GL__M(##Eat,2,noun); RulebookSucceeds(); rtrue; ]; ! Actions which are checked but then do nothing [ TouchSub_R1; if (noun==actor) { if (actor ~= player) { print (The) actor, " touches "; if (actor has female) print "herself.^^"; else print "himself.^^"; } return GL__M(##Touch,3,noun); } rfalse; ]; [ TouchSub_R2; if (actor ~= player) { print (The) actor, " touches "; if (noun == player) print "you"; else print (the) noun; ".^"; } if (noun has animate) return GL__M(##Touch,1,noun); rfalse; ]; [ TouchSub_R3; if (actor ~= player) print (The) actor, " touches ", (the) noun, ".^^"; return GL__M(##Touch,2,noun); ]; [ WaveSub_C1; if (noun notin actor) return GL__M(##Wave,1,noun); rfalse; ]; [ WaveSub_R1; if (actor ~= player) print (The) actor, " waves ", (the) noun, ".^^"; return GL__M(##Wave,2,noun); ]; [ PullSub_C1; if (noun has static) return GL__M(##Pull,1,noun); rfalse; ]; [ PullSub_C2; if (noun has scenery) return GL__M(##Pull,2,noun); rfalse; ]; [ PullSub_C3; if (noun has animate) return GL__M(##Pull,4,noun); rfalse; ]; [ PullSub_R1; if (actor ~= player) print (The) actor, " pulls ", (the) noun, ".^^"; return GL__M(##Pull,3,noun); ]; [ PushSub_C1; if (noun has static) return GL__M(##Push,1,noun); rfalse; ]; [ PushSub_C2; if (noun has scenery) return GL__M(##Push,2,noun); rfalse; ]; [ PushSub_C3; if (noun has animate) return GL__M(##Pull,4,noun); rfalse; ]; [ PushSub_R1; if (actor ~= player) print (The) actor, " pushes ", (the) noun, ".^^"; return GL__M(##Push,3,noun); ]; [ TurnSub_C1; if (noun has static) return GL__M(##Turn,1,noun); rfalse; ]; [ TurnSub_C2; if (noun has scenery) return GL__M(##Turn,2,noun); rfalse; ]; [ TurnSub_C3; if (noun has animate) return GL__M(##Pull,4,noun); rfalse; ]; [ TurnSub_R1; if (actor ~= player) print (The) actor, " turns ", (the) noun, ".^^"; return GL__M(##Turn,3,noun); ]; [ PushDirSub_C1; return GL__M(##PushDir,1,noun); ]; [ SqueezeSub_C1; if (noun has animate) return GL__M(##Squeeze,1,noun); rfalse; ]; [ SqueezeSub_R1; if (actor ~= player) print (The) actor, " squeezes ", (the) noun, ".^^"; return GL__M(##Squeeze,2,noun); ]; ! Actions concerning other people [ GiveSub_C1; if (parent(noun)~=actor) return GL__M(##Give,1,noun); rfalse; ]; [ GiveSub_C2; if (second==actor) return GL__M(##Give,2,noun); rfalse; ]; [ GiveSub_C3; if (RunLife(second,##Give)~=0) rtrue; rfalse; ]; [ GiveSub_C4; if (second ofclass K8_person) rfalse; return GL__M(##Give,4,second); ]; [ GiveSub_C5; return GL__M(##Give,3,second); ]; [ GiveSub_O1; I7_Move(noun, second); rfalse; ]; [ GiveSub_R1; if (actor ~= player) print (The) actor, " gives "; else print "You give "; print (the) noun, " to "; if (second ~= player) print (the) second, ".^^"; else print "you.^^"; rtrue; ]; [ ShowSub_C1; if (parent(noun)~=actor) return GL__M(##Show,1,noun); rfalse; ]; [ ShowSub_C2; if (second==actor) return GVS_Convert(##Examine, noun, 0);; rfalse; ]; [ ShowSub_C3; if (RunLife(second,##Show)~=0) rtrue; rfalse; ]; [ ShowSub_C4; return GL__M(##Show,2,second); ]; [ WakeOtherSub_C1; if (RunLife(noun,##WakeOther)~=0) rtrue; rfalse; ]; [ WakeOtherSub_C2; return GL__M(##WakeOther,1,noun); ]; [ ThrowAtSub_C1; if (second>1) { action=##ThrownAt; if (RunRoutines(second,before)~=0) { action=##ThrowAt; rtrue; } action=##ThrowAt; } rfalse; ]; [ ThrowAtSub_C2 k; if (noun has worn) { GL__M(##Drop,3,noun); say__p=0; k = keep_silent; keep_silent = 1; ; keep_silent = k; if (noun has worn && noun in actor) rtrue; } rfalse; ]; [ ThrowAtSub_C3; if (second hasnt animate) return GL__M(##ThrowAt,1); rfalse; ]; [ ThrowAtSub_C4; if (RunLife(second,##ThrowAt)~=0) rtrue; rfalse; ]; [ ThrowAtSub_C5; return GL__M(##ThrowAt,2,noun); ]; [ AttackSub_C1; if (noun has animate && RunLife(noun,##Attack)~=0) rtrue; rfalse; ]; [ AttackSub_C2; return GL__M(##Attack,1,noun); ]; [ KissSub_C1; if (noun==actor) return GL__M(##Touch,3,noun); rfalse; ]; [ KissSub_C2; if (RunLife(noun,##Kiss)~=0) rtrue; rfalse; ]; [ KissSub_C3; return GL__M(##Kiss,1,noun); ]; [ AnswerSub_C1; if (second~=0 && inp2 ~= 1 && RunLife(second,##Answer)~=0) rtrue; rfalse; ]; [ AnswerSub_C2; return GL__M(##Answer,1,noun); ]; [ TellSub_C1; if (noun==actor) return GL__M(##Tell,1,noun); rfalse; ]; [ TellSub_C2; if (RunLife(noun,##Tell)~=0) rtrue; rfalse; ]; [ TellSub_C3; return GL__M(##Tell,2,noun); ]; [ AskSub_C1; if (RunLife(noun,##Ask)~=0) rtrue; rfalse; ]; [ AskSub_C2; return GL__M(##Ask,1,noun); ]; [ AskForSub_C1; if (noun==actor) <>; rfalse; ]; [ AskForSub_C2; I7_TryAction(1, noun, ##Give, second, actor); rtrue; ]; ! Actions blocked in all cases [ YesSub_C1; return GL__M(##Yes); ]; [ NoSub_C1; return GL__M(##No); ]; [ BurnSub_C1; return GL__M(##Burn); ]; [ PraySub_C1; return GL__M(##Pray); ]; [ WakeSub_C1; return GL__M(##Wake); ]; [ ThinkSub_C1; return GL__M(##Think); ]; [ SmellSub_C1; return GL__M(##Smell,1,noun); ]; [ ListenSub_C1; return GL__M(##Listen,1,noun); ]; [ TasteSub_C1; return GL__M(##Taste,1,noun); ]; [ DigSub_C1; return GL__M(##Dig,1,noun); ]; [ CutSub_C1; return GL__M(##Cut,1,noun); ]; [ JumpSub_C1; return GL__M(##Jump,1,noun); ]; [ JumpOverSub_C1; return GL__M(##JumpOver,1,noun); ]; [ TieSub_C1; return GL__M(##Tie,1,noun); ]; [ DrinkSub_C1; return GL__M(##Drink,1,noun); ]; [ FillSub_C1; return GL__M(##Fill,1,noun); ]; [ SorrySub_C1; return GL__M(##Sorry,1,noun); ]; [ StrongSub_C1; return GL__M(##Strong,1,noun); ]; [ MildSub_C1; return GL__M(##Mild,1,noun); ]; [ SwimSub_C1; return GL__M(##Swim,1,noun); ]; [ SwingSub_C1; return GL__M(##Swing,1,noun); ]; [ BlowSub_C1; return GL__M(##Blow,1,noun); ]; [ RubSub_C1; return GL__M(##Rub,1,noun); ]; [ SetSub_C1; return GL__M(##Set,1,noun); ]; [ SetToSub_C1; return GL__M(##SetTo,1,noun); ]; [ WaveHandsSub_C1; return GL__M(##WaveHands,1,noun); ]; [ BuySub_C1; return GL__M(##Buy,1,noun); ]; [ SingSub_C1; return GL__M(##Sing,1,noun); ]; [ ClimbSub_C1; return GL__M(##Climb,1,noun); ]; [ SleepSub_C1; return GL__M(##Sleep,1,noun); ]; [ ScoreSub_O1; #ifdef I7_NOSCORE; "[There is no numerical score.]"; #ifnot; GL__M(##Score); PrintRank(); #endif; ]; [ FullScoreSub_O1 i; ScoreSub_O1(); #ifndef I7_NOSCORE; if (score==0 || TASKS_PROVIDED==1) rfalse; new_line; GL__M(##FullScore,1); for (i=0:ii==1) { PANum(task_scores->i); PrintTaskName(i); } if (things_score~=0) { PANum(things_score); GL__M(##FullScore,2); } if (places_score~=0) { PANum(places_score); GL__M(##FullScore,3); } new_line; PANum(score); GL__M(##FullScore,4); #endif; ]; [ QuitSub_O1; GL__M(##Quit,2); if (YesOrNo()~=0) quit; ]; [ RestartSub_O1; GL__M(##Restart,1); if (YesOrNo()~=0) { @restart; GL__M(##Restart,2); } ]; [ RestoreSub_O1; restore Rmaybe; return GL__M(##Restore,1); .RMaybe; GL__M(##Restore,2); ]; [ SaveSub_O1 flag; #IFV5; @save -> flag; switch (flag) { 0: GL__M(##Save,1); 1: GL__M(##Save,2); 2: GL__M(##Restore,2); } #IFNOT; save Smaybe; return GL__M(##Save,1); .SMaybe; GL__M(##Save,2); #ENDIF; ]; [ VerifySub_O1; @verify ?Vmaybe; jump Vwrong; .Vmaybe; return GL__M(##Verify,1); .Vwrong; GL__M(##Verify,2); ]; [ VersionSub_O1 i; Banner(); print "Identification number: "; for (i=6: i<=UUID_ARRAY->0: i++) print (char) UUID_ARRAY->i; print "^"; if (standard_interpreter > 0) print "Standard interpreter ", standard_interpreter/256, ".", standard_interpreter%256, " (", 0->$1e, (char) 0->$1f, ") / "; else print "Interpreter ", 0->$1e, " Version ", (char) 0->$1f, " / "; print "Library serial number ", (string) LibSerial, "^"; #IFDEF LanguageVersion; print (string) LanguageVersion, "^"; #ENDIF; #IFDEF I7ExtensionVersions; I7ExtensionVersions(); #ENDIF; ]; [ ScriptOnSub_O1; transcript_mode = ((0-->8) & 1); if (transcript_mode) return GL__M(##ScriptOn,1); @output_stream 2; if (((0-->8) & 1) == 0) return GL__M(##ScriptOn,3); GL__M(##ScriptOn,2); VersionSub(); transcript_mode = true; ]; [ ScriptOffSub_O1; transcript_mode = ((0-->8) & 1); if (transcript_mode == false) return GL__M(##ScriptOff,1); GL__M(##ScriptOff,2); @output_stream -2; if ((0-->8) & 1) return GL__M(##ScriptOff,3); transcript_mode = false; ]; [ NotifyOnSub_O1; #ifdef I7_NOSCORE; ScoreSub_O1(); #ifnot; notify_mode=1; GL__M(##NotifyOn); #endif; ]; [ NotifyOffSub_O1; #ifdef I7_NOSCORE; ScoreSub_O1(); #ifnot; notify_mode=0; GL__M(##NotifyOff); #endif; ]; [ LMode1Sub_O1; lookmode=1; print (string) Story; GL__M(##LMode1); ]; ! Brief [ LMode2Sub_O1; lookmode=2; print (string) Story; GL__M(##LMode2); ]; ! Verbose [ LMode3Sub_O1; lookmode=3; print (string) Story; GL__M(##LMode3); ]; ! Superbrief [ PronounsSub_O1 x y c d; GL__M(##Pronouns, 1); c = (LanguagePronouns-->0)/3; if (player ~= selfobj) c++; if (c==0) return GL__M(##Pronouns, 4); for (x = 1, d = 0 : x <= LanguagePronouns-->0: x = x+3) { print "~", (address) LanguagePronouns-->x, "~ "; y = LanguagePronouns-->(x+2); if (y == NULL) GL__M(##Pronouns, 3); else { GL__M(##Pronouns, 2); print (the) y; } d++; if (d < c-1) print ", "; if (d == c-1) print (string) AND__TX; } if (player ~= selfobj) { print "~", (address) ME1__WD, "~ "; GL__M(##Pronouns, 2); c = player; player = selfobj; print (the) c; player = c; } "."; ]; #ifdef DEBUG; [ ShowRLocation obj top; if (obj ofclass K1_room) return; print " "; if (parent(obj)) { if (obj has worn) print "worn by "; else { if (parent(obj) has animate) print "carried by "; if (parent(obj) has container) print "in "; if (parent(obj) ofclass K1_room) print "in "; if (parent(obj) has supporter) print "on "; } print (the) parent(obj); ShowRLocation(parent(obj)); } else { if (obj.component_parent) { if (top == false) print ", which is "; print "part of ", (the) obj.component_parent; ShowRLocation(obj.component_parent); } else print "out of play"; } ]; [ ShowMeSub; if (noun == nothing) noun = real_location; if (ShowMeRecursively(noun, 0, (noun == real_location))) { if (noun == real_location) print "* denotes things which are not in scope^"; } if (noun ofclass K2_thing) { print "location:"; ShowRLocation(noun, true); print "^"; } ]; [ ShowMeRecursively obj depth f c i k; spaces(2*depth); if (f && (depth > 0) && (TestScope(obj, player) == false)) { print "*"; c = true; } print (name) obj; if (depth > 0) { if (obj.component_parent) print " (part of ", (name) obj.component_parent, ")"; if (obj has worn) print " (worn)"; } if (obj provides i7_kind) { k = obj.&i7_kind-->0; if ((k ~= K2_thing) || (depth==0)) { print " - "; if (k == K4_door or K5_container) { if (obj has transparent) print "transparent "; if (obj has locked) print "locked "; else if (obj has open) print "open "; else print "closed "; } print (I7_Kind_Name) k; } } print "^"; if (obj.component_child) c = c | ShowMeRecursively(obj.component_child, depth+2, f); if ((depth>0) && (obj.component_sibling)) c = c | ShowMeRecursively(obj.component_sibling, depth, f); if (child(obj)) c = c | ShowMeRecursively(child(obj), depth+2, f); if ((depth>0) && (sibling(obj))) c = c | ShowMeRecursively(sibling(obj), depth, f); return c; ]; #endif;