!---------------------------------------------------------------------------- !****************************************** VARIOUS "CAN'T DO THAT" MESSAGES !---------------------------------------------------------------------------- routine PrintText03(val1,val2) { select val1 case 0 { !Usage: (3,0,obj) !A pretty generic message that can be used in some places where !"Nothing happens" and "You can't do that" neither seem to fit. print "Trying to "; VerbWord; " "; The(val2, true); if (verbroutine = &DoPush,&DoMove,&DoPull) and (xobject ~= nothing) { print " toward "; the(xobject); } print " doesn't get "; player.pronoun #2; " anywhere." } case 1,28 { !Usage: (3,1,obj) - Will honor distant_response, if any. !Usage: (3,28,obj) - Will always just print this default. !** User is trying to interact with distant_scenery. !Oringally, printed name of person, but said that/those for !if the object wasn't living. Appeared too confusing with !objects of similar types (grassy meadow and grassy patch, for !example. So, decided it's best to say the full name. Helps user. !And now, with distant_response property, I'm now able to customize !the message that's printed, for certain objects, as needed. if (val1 = 28) { print CThe(val2); IsOrAre(val2,true); " too far away." } elseif (not val2.distant_response) { print CThe(val2); IsOrAre(val2,true); " too far away." } } case 2 { select val2 case 1 { !Usage: (3,2,1) "You can't do that." !Very generic message for some things. } case 2 { !Usage: (3,2,2) !This could be used for other generics, not just sniffing. "Nothing notable there." !For generic sniffing, and so on. } case 3 { !Usage: (3,2,3) "Nothing happens." !Ultra-generic. For &DoShake and others. } case 4 { !Usage: (3,2,4) "You don't know how." !Another generic message we can use. } case 5 { !Usage: (3,2,5) ! This differs from "You don't know how" because it implies ! that there might be a way that you're just overlooking. ! But not always. For instance, this is the DoLasso default. "You see no good way to do that." !Yet another generic msg. } case 6 { !Usage: (3,2,6) "Better not." !Uber generic message, means we can't do it. } case 7 { !Usage: (3,2,7) !Player is trying to do something that requires the rope. "You don't have anything to use as a lasso." } case 8 { !Usage (3,2,8) with (xobject = attachable_object) !Player is trying to lasso something, but rope is tied. print "You can't. "; CThe(xobject); " is already attached to "; ListAttachments(xobject) print "." !And then just end the line. } case 9 { !Usage: (3,2,9) with (xobject = attachable_object) !Prints "You can't LASSO anything with THE OBJECT." !But it can also do "You can't BLOCK anything with the X." !And I'm going to use it "You can't WATER anything with the X." print "You can't "; VerbWord; " anything with "; print The(xobject); "." } case 10 { !Usage: (3,2,10) !Printed if the player is trying to do something dangerous. "If your own safety was of less importance, maybe." } case 11 { !Usage: (3,2,11) !Player isn't trying to do something vague. Needs specific. "How, though?" !That's a pretty simple way of saying it. } case 12 { !Usage: (3,2,12) !This can be used for certain clues. Prints right after the "At least, not yet." !previous thing said (or new line). } case 13 { !Usage: (3,2,13) "Nothing is to be gained by even trying that." !Generic. } case 14 { !Usage: (3,2,14) ! Will print generic "He/She wouldn't like that." ! NPC=Object version: Assumes object is living. print capital object.pronouns #1; } case 15 { !Usage: (3,2,15) ! Will print generic "He/She wouldn't like that." ! NPC=XObject version: Assumes xobject is living. print capital xobject.pronouns #1; } case 14,15 { !Continues from #14 and #15 above. " wouldn't like that." } case 16 { !Usage: (3,2,16) - Very generic NPC response. ! "The NPC takes no notice." - Very Generic print CThe(object); " take"; print MatchSubject(object); " no notice."; ! NOTE: ! If there is nothing to say afterwards, ! we are expected to print newline later. } case 17 { !Usage: (3,2,17) - Very generic NPC response. ! Like #16, except it assumes NPC is the xobject instead. print CThe(xobject); " take"; print MatchSubject(object); " no notice."; ! NOTE: ! If there is nothing to say afterwards, ! we are expected to print newline later. } case 18 { !Usage: (3,2,18) ! Generic message, when searching for something that either ! isn't here, or is here but hidden/concealed or not known. print CThe(player); " can't see that here." } case 19 { !Usage: (3,2,19) !This gets called on "object" when the object is already !open or already closed. Caller assures that first. !I guess this is like VMessage(&DoOpen,2), really. print CThe(object); " is already "; if (object is open) { "open." } else { "closed." } } case 20 { !Usage: (3,2,20) !User is trying to "right" or "push over" something. "There is no need to try "; print VerbWord; "ing "; The(object); if (VerbWord = "right") { "." !Just a period to end the sentence. } else { " over." !Turn/push over. } } case 21 { !Usage: (3,2,21) !Another generic message. "You haven't the need." } case 22 { !Usage: (3,2,22) !Another generic message. Used for "getting" an NPC, etc. "You can't. You're not a barbarian." } case 23 { !Usage: (3,2,23) !Another generic message. Used for "getting" an NPC, etc. "That's not your way." } case 24 { !Usage: (3,2,24) !Used when following/chasing an NPC who's still here. print CThe(object); rnd = random(6) !Spreads more randomness. select rnd case 1,3,5 { print MatchPlural(object,"hasn't", " haven't"); print " gone anywhere." } case 2,4,6 { print IsOrAre(object, true); " still here." } } case 25 { !Usage: (3,2,25) !Begin with a random message, sometimes when we throw stuff. rnd = random(9) !Help spread the randomness. select rnd case 1,4,7: print "A good throw. "; case 2,5,8: print "Good aim. "; case 3,6,9: print "That works. "; ! Note that we always expect to print more text afterwards. ! That's why we end with a space, and no linefeed after it. } case 26 { !Usage: (3,2,26) !Another generic sort of message, created initially so I !can say "You can't BAR that with THE OBJECT". print "You can't "; VerbWord; print MatchPlural(object,"that","those"); " with "; print The(xobject); "." } } case 3 { !The swordsman is trying to talk to somebody about something. !These are some general cases for default "talking" routines. select val2 case 1 { !Usage: (3,3,1) "You conduct a brief inner monologue." } case 2 { !Usage: (3,3,2) "You give a friendly nod, but to nobody in particular." } case 3 { !Usage: (3,3,3) if (object is unfriendly) { print CThe(object); " doesn't seem to care." } else { print "You nod a greeting to "; The(object); "." } } case 4 { !Usage: (3,3,4) ! Trying to "talk to" an NPC gives this message. ! We can randomize this to give a little variety. ! Most of the time, though NPC should "watch" which ! helps leave it a little more ambigious (which I want). swordsman.misc #3 ++ !Increment the generic talk counter. if (swordsman.misc #3 <= 2) or (random(4) = 1) { rnd = random(8) select rnd case 1,2,3,4: PrintMessage(3,3,6) !Object watches, shrugs.. case 5: PrintMessage(3,3,7) !Your life would be easier... case 6,7: PrintMessage(3,3,8) !Object can't understand..... case 8: PrintMessage(3,3,9) !Strong and silent type...... } elseif (swordsman.misc #3 <= 5) or (random(4) = 1) { rnd = random(6) select rnd case 1,2,3,4: PrintMessage(3,3,10) !really can't understand. case else: PrintMessage(3,3,12) !Can't comprehend. } else { PrintMessage(3,3,13) !Random final message. } } case 5 { !Usage: (3,3,5) !No longer using anything in this case. } case 6 { !Usage: (3,3,6) !A version of the #5 message, but when NPC is the object. print CThe(object); " watches without comprehension, then shrugs." } case 7 { !Usage: (3,3,7) "Your life would be easier if you could." } case 8 { !Usage: (3,3,8) print CThe(object); " can't understand you." } case 9 { !Usage: (3,3,9) "No need. You're the strong and silent type." } case 10 { !Usage: (3,3,10) print CThe(object); " really can't understand you." } case 11 { !Usage: (3,3,11) !This gets called when we're trying to ask something. !It's not exactly the same as "talk to" because we're !not going to print all the same things as "talk to". !Note that this is also called in order_response code. swordsman.misc #3 ++ !Increment the generic talk counter. if (swordsman.misc #3 <= 2) or (random(4) = 1) { rnd = random(6) !Provides more randomness. select rnd case 1,3,5: PrintMessage(3,3,6) !Object watches then shrugs. case 2,4,6: PrintMessage(3,3,8) !Object can't understand.... } elseif (swordsman.misc #3 <= 5) or (random(4) = 1) { rnd = random(6) select rnd case 1,2,3,4: PrintMessage(3,3,10) !really can't understand. case else: PrintMessage(3,3,12) !Can't comprehend you. } else { PrintMessage(3,3,13) !Random final message. } } case 12 { !Usage: (3,3,12) print CThe(object); " watches, but shows no comprehension." } case 13 { !Usage: (3,3,13) rnd = random(6) select rnd case 1,4 { print "If only "; The(object); " could understand you. It just isn't working." } case 2,5 { "In your travels, few have ever understood you. Pointing always works better." } case 3,6 { print CThe(object); " just seems confused. This is why you prefer to be the strong and silent type." } } } case 4 { !Trying to search in something that can't be searched. select val2 case 1 { !Usage: (3,4,1) !Default response for trying to look under something living. print "You can't see anything"; " under "; The(object); "." } case 2 { !Usage: (3,4,2) !Default response for trying to look behind something living. print "You can't see anything"; " behind "; The(object); "." } case 3 { !Usage: (3,4,3) ! When attempting to search an NPC, this is the default. ! It could also be used in other instances where the player ! is attempting to do something mean-spirited to an NPC. rnd = random(9) !Maybe help spread the randomness. select rnd case 1,4,7: "Such an ignoble act is beneath you." case 2,5,8 { print capital object.pronouns #3; " privacy is more important than your curiosity." } case 3,6,9 { print capital object.pronouns #1; print MatchPlural(object,"doesn't","don't"); " deserve that." } } case distant_grassy_patch { !Usage: (3,4,obj) print "You'll have to go there if you intend to search "; The(val2); "." } case distant_glinting_thing { !Usage: (3,4,obj) "It might be hidden in the taller grass ahead, but it isn't here." } case near_glinting_thing { !Usage: (3,4,obj) !This is shown from several places: ! Looking at the near_grassy_patch ! Searching the near_grassy_patch ! Searching for the glint in the "at_grassy_patch" room. "The patch of grass here is too tall and thick. It may easily conceal whatever you saw before, but you're unlikely to find it like this." if (val2.misc #1 < 9) { val2.misc #1 ++ !Increment number of times we've seen it. } ! In "Trading Punches" I tried to prompt the player to the ! right action after every turn that passes. I hope this is a ! better way. I'll only prompt to the right action if the ! user keeps doing the *wrong* action, and maybe provide some ! clues if the user tries other things like moving the grass. if (val2.misc #1 = 2) { "\nThis is the right place. You're sure of it." } elseif (val2.misc #1 = 4) { "\nYou take a moment to consider the area, strumming your fingers against the sheath at your hip." } elseif (val2.misc #1 = 6) { "\nStill, you aren't called \"swordsman\" for nothing." } elseif (val2.misc #1 = 9) { "\nSurely even the tallest of grass is of no concern given the swiftness of your blade." } } case grassy_meadow { !Usage: (3,4,obj) !Trying to search the grassy meadow (without an xobject) "The grassland stretches far in all directions. "; if ((xobject = nothing) and (pendant is not moved)) { "However, a taller grassy patch a ways ahead probably conceals the glinting object you noticed." } else { !no need to specifically handle xobject = glint object !because the glinting objects before.search handles it. "It just isn't feasible to search it all." } } case girl { !Usage: (3,4,npc) !For trying to search or touch the girl, when she's trapped. !If she's trapped, then we know the bees are here. "Her cloak of bees expands, threatening your safety if you get close enough to try that." } case tyrant { !Usage: (3,4,npc) "You can't get close enough to search him. Anyway, it doesn't look like he's carrying anything but the short sword." } } case 5 { !Usage: (3,5,obj) !Trying to enter somewhere you're already at. select val2 case porch { "You're close enough as it is." } case else { !For all other cases, just say "you're already there." "You're already there." } } case 6 { !Usage: (3,6,obj) !Trying to interact with something that's concealed. print CThe(player); " can't see"; print MatchPlural(val2, "it.", "them.") } case 7 { !Usage: (3,7) !Trying to move/push the taller grass? Well, that won't work. "You push some of the tall grass aside. It isn't a large patch, but the blades are thick and closely grown. If something is down there, you won't find it this way." } case 8 { !Usage: (3,8) !Trying to pull the grass. Yeah, that won't work either. !Not going to use the word "tear" as that might prompt wrong. "You pull some of the tall grass from the earth, breaking it unevenly as you do. That reveals nothing, but it did help. At least it seems like the right sort of idea.\n" "Still, there must be a faster way." } case 9 { !Usage: (3,9) !Player tries to listen, or listen to something. if (player = swordsman) { "You hear nothing." !Literally, he hears nothing. } else { "Nothing sounds out of the ordinary." } } case 10 { select val2 case 1 { !Usage: (3,10,1) !Player tries to drink from the flask, when there is water. if (flask.misc #1 = 0) { "You lift the flask to your lips for a sip of cool, refreshing water. You decide to conserve the rest of it for now. On such a warm day, during such a long trek, you might need it later." flask.misc #1 = counter+1 !Remember the last drink. } elseif (flask.misc #1 + 4 < counter) { !Must wait 5 turns before taking another sip. Really, !this is all for show. Drinking it isn't necessary. "You take another refreshing sip of cool water from your flask, but only a small one." flask.misc #1 = counter+1 !Remember the last drink. } else { "You consider it, but decide instead to save what remains in the flask until later." } } case 2 { !Usage: (3,10,2) !Player tries to drink from the flask, when it's empty. Print CArt(flask); " is empty." } } case 11 { !Usage: (3,11,obj) !Player is trying to "cut" or "stab" something with the sword. !This will go for unanticipated xobjects only, since for the !most part I'll try to allow lots of cutting and slashing. if (val2 = sword) { print "It isn't possible to "; VerbWord; " "; Art(sword); " with its own blade." } else { print CArt(sword); " is no toy, and your mastery of it never to be abused. You forego the urge to strike out at "; print The(val2); "." } } case 12 { !Usage: (3,12,obj) !General "it's not broken" message. ! "can't fix with" ones are in 20. ! "It's already fixed" are in 21 ! "be more specific" ones are in 22. if (val2 = player) { !In reference to deafness. "Not even magic can do that." } else { if (val2 is living) { if (val2 is plural) { "They"; } else { print capital val2.pronouns #1; } } else { print MatchPlural(val2,"That","Those"); } print MatchPlural(val2,"doesn't","don't"); " appear to be broken." } } case 13 { !Usage: (3,13) !Trying to open, close, lock, or unlock the broken gate. if (location = house) { print CThe(north_gate); } else { "The gate"; } print " is broken and useless. You can't "; VerbWord; " it. "; "A gap leads "; if (location = house) { print n_obj.name; } else { print s_obj.name; } " through the fence, where the gate used to be." } case 14 { !Usage: (3,14,obj) "You'll have to pick "; print MatchPlural(val2,"it","them"); " it up first." } case 15 { !Usage: (3,15,obj) !You can't [WORD1] the [OBJECT]. if (verbroutine = &DoClimb) and (val2.type = direction) { print "You can't "; VerbWord; " that direction." } else { print "You can't "; VerbWord; " "; The(val2); "." } } case 16 { !Usage: (3,16,obj) !what I want is a library "You don't see the X there" !but I couldn't figure out where that is in the library. print "You don't see "; The(val2); " there." } case 17 { !Usage: (3,17) !You can't tie the hatch...... "You can't tie the hatch down while it's open." } case 18 { select val2 case 1 { !Usage: (3,18,1) !Trying to push the wagon over with raw strength. "You're strong, but you're not that strong. It would take the vigor of four men to right the wagon." if (wheel not in wagon) { "\nEven if you manage to tip it upright somehow, it won't go far with a wheel missing." } } case 2 { !Usage: (3,18,2) !Trying to tie the rope to the wheel, after it's on wagon. "That would be a little difficult now that the wheel has been reattached to the wagon's axle, since on its side the wagon is taller than you. Even so, you might have better luck tying the rope to the wagon's hitch instead." } } case 19 { !Usage: (3,19) !For whatever reason, the player is trying to *wear* the harness. "No, it's made to fit cattle." } case 20 { !Usage: (3,20,obj) !Errors when trying to "fix" something: You can't fix that. print "You can't fix "; The(val2); " that way." } case 21 { !Usage: (3,21,obj) ! Errors when trying to "fix" something that's already fixed. ! We can tell this by checking to see if the object is both ! fixable *and* not broken. print MatchPlural(val2,"It's", "Those are"); print " already fixed." } case 22 { !Usage: (3,22,obj) ! Be more specific about how you want to fix that. ! Hopefully by asking the question *this* way, it'll prompt ! them to phrase it in normal verb/obj/xobj format. I hope. ! If not, then the "with" verb will check to see if we have ! a pending "xobject question", and if so, direct it to the ! last verbroutine supplied. print "How do you intend to "; VerbWord; " "; The(val2); "?" if (val2 = mill_steps) and (verbroutine = &DoRepair) { !We don't have to be holding the wing in order to fix steps. LookForAnswer(true,false) !So that user replies "with object". } else { !The xobject used must be held, for all other conditions. LookForAnswer(true,true) !So that user can reply "with object". } } case 23 { !Usage: (3,23,obj) ! This is something that can't be repaired. Default message. ! Means it's flagged as "broken" and "not fixable". if (val2 = distant_wagon) { "After its short, violent trip down the hill, "; print The(val2); " is beyond repair." } elseif (val2 = contraption) { print "The workings of "; The(val2); " are a mystery to you, and you have nothing likely to fit. You can't "; print VerbWord; " it." } else { print "It isn't possible to "; VerbWord; " "; The(val2); "." } } case 24 { !Usage: (3,24,obj) ! This is something that can't be attached to something else. print "It isn't readily possible to "; VerbWord; " "; The(val2); " to anything." } case 25 { !Usage: (3,25,obj) ! For when you're trying to do things, but you're already ! carrying something that requires all your attention. ! Basically, "You can't do that while you're carrying the X." print "You can't do that while you're carrying "; The(val2); "."; if (val2 = beam) { " It's all you can do just to hold it across both arms." } else { print newline !Just end the line. Nothing custom to add. } } case 26 { !Usage: (3,26,obj) !This happens when trying to move something that's NOT static, !as a replacement for the "you can't move that" default. if Contains(player, val2) { print "You're carrying "; The(val2); ". "; if (val2 is always_held) { "You don't need to move it." } else { "You could drop"; if (val2.size <= 50): " or throw"; print MatchPlural(val2,"it","them"); ", if you like." } } else { "The best way to move"; print MatchPlural(val2,"that","those"); " is to pick"; print MatchPlural(val2,"it","them"); " up." } } case 27 { select val2 case 1 { !Usage: (3,27,1) !This is when player tries to do something while spiders here. "No time for that. The spiders demand your full attention." } case 2 { !Usage: (3,27,2) !This is when player tries something and spiders approach. "With the horde of spiders approaching from the "; print barge_aft_dir.name; ", you have no time for that." } case 3 { !Usage: (3,27,3) !Spiders are still here, and blocking whatever we try. "Too many spiders block the way." } } case 28 { ! Intentionally unused! This is coupled with 3,1,obj, basically ! to prevent (in certain instances) the "custom" distance message. ! Putting this case here just so I don't accidentally re-use it. } case 29 { !Usage: (3,29,obj) ! Player is trying to "hang" or drape" something from something. ! This could also be used in other similar situations. print "You can see no way to "; VerbWord; " "; The(val2); " there." } case 30 { !Usage: (3,30,dir) - "you can't run upward/downward." "You can't run "; if (val2 = u_obj): "upward." else: "downward." } }