!\--------------------------------------------------------------------------- SPUREVEN.HUG by Kent Tessman (c) 1995-1997 Events, fuses, and daemons for Spur ---------------------------------------------------------------------------\! !---------------------------------------------------------------------------- ! MASTER GLOBAL EVENT ! ! The master global event takes care of running all time-related events ! in the story. !---------------------------------------------------------------------------- global sarah_activated event { ! 9:50 a.m. if counter >= 590 and not sarah_activated { Activate(sarah_waiting, 25) sarah_activated = true } ! 10:30 a.m. if counter >= 630 and deputies_waiting is active Deactivate(deputies_waiting) ! 9:00 p.m. if counter > 1260: counter = 1260 select counter case 630 ! 10:30 a.m. { ! Deputies leave Main Street Deactivate(deputies_waiting) select location case saloon {"\nYou watch under the swinging doors as the boots trundle away. Apparently the deputies have gone to look for you elsewhere." event_flag = true} case mainstreet_north {"\nTo the south, you can see the gang of deputies leaving Main Street. Apparently they're going to look for you elsewhere." event_flag = true} case yourroom { if yourcurtains is open {"\nDown below on Main Street, you can see the gang of deputies walking away from the saloon. Apparently they're going to look for you elsewhere." event_flag = true} } } case 1080 ! 6:00 p.m. { if location is outside {"\nThe overhead sun begins its long descent to the horizon." event_flag = true} } case 1140 ! 7:00 p.m. { if location is outside {"\nThe sun begins to sink lower in the western sky." event_flag = true} } case 1200 ! 8:00 p.m. { if location is outside {"\nThe sun is dropping closer to the western horizon; there's maybe an hour of sunlight left in the day." event_flag = true} } case 1255 ! 8:55 p.m. { "\n(Getting verrry close to the end of the day...)" event_flag = true } case 1260 ! 9:00 p.m. { "\nThe sun sinks below the western horizon and disappears. \ Sundown. Know what that means? It's the end of the movie, John Wayne. Ride off into the sunset. Roll end credits. \ Stand up, brush the popcorn off your lap, and go home. It would, however, be worth noting that you have ostensibly been the hero in this little misadventure, and, as such, you have left the story decidedly unfinished. Rather unherolike, one might add. Shame on you, one might also add after that. At any rate..." endflag = 3 } } !---------------------------------------------------------------------------- ! STORY-DRIVING FUSES AND DAEMONS !---------------------------------------------------------------------------- fuse royheffer_gunfight ! at the beginning of the story {} event royheffer_gunfight { local t t = self.tick select t case 1 {"\nRoy draws his six-shooter, yanking it from its holster and raising it toward you..." self is moved event_flag = 1} case 0 {"\nRoy pulls the trigger. Catches you square in the chest. \IOuch\i--that smarts! Not to mention the fact that it kills you." endflag = 2} } fuse crowdgathering ! after Roy Heffer is killed {} event crowdgathering { local t t = self.tick if location = mainstreet { select t case 12 {"\nA crowd starts to gather around you and the corpse." event_flag = true move crowd to mainstreet} case 11 {"\nMore people come out onto the street to see what happened. They see the body. Some of them point at you and begin talking to each other in low voices." event_flag = true} case 10 {"\nYou hear someone saying to you: \"Look, partner. I dunno what your beef with ole Roy here was, but you best be getting outta here before the Sheriff shows up.\"" event_flag = true} case 0 {"\nSheriff Argyle strolls up Main Street from the south, accompanied by two of his deputies. It doesn't take long for him to take into account the corpse, the crowd of people who saw it happen, and all the fingers pointing at you and saying you did it. He doesn't want to hear about whose fault it was or who started what; there's been a killing in his town, and that's the bottom line. "; "And he doesn't like that one bit. With a nod from the Sheriff, the deputies step forward and grab you roughly before marching you off to the hoosegow." "\nMorning comes, and the crowd gathers this time at the gallows south of town. There's gonna be a hangin'. And you're the guest of honor..." endflag = 3} } if t = 0 { if yourgun in location remove yourgun if roysgun in location remove roysgun if royswallet in location remove royswallet remove royheffer_corpse remove spanishguitar Activate(deputies_waiting) deputies_waiting.in_scope = mainstreet deputies is known select location case saloon {"\nYou watch under the swinging doors as several sets of boots show up. The Sheriff's deputies have come looking for you." event_flag = true} case mainstreet_north {"\nTo the south, you can see the Sheriff and a gang of deputies arrive outside the hotel, first to deal with Roy Heffer's body--then to look for you." event_flag = true} if location = yourroom and yourcurtains is open {"\nOut the window you can see Sheriff Argyle arriving on the street below. After talking to the bystanders and looking all around (probably for you), the Sheriff orders Roy Heffer's body heaved up and carted away. A gang of deputies remains behind, standing guard outside the saloon." event_flag = true} remove crowd } } daemon deputies_waiting ! Outside the saloon {} event deputies_waiting { "\nAs you arrive, the deputies jump up from where they've been waiting for you, grab you, and push you to the ground. They quickly shackle your hands before hauling you back to your feet. Time to go see the Sheriff...\n\n...and the gallows." endflag = 3 } fuse murderer_fuse ! Activated (by default) whenever {} ! the player shoots a character event murderer_fuse { if verbroutine = &DoGo or verbroutine = &DoMoveinVehicle \ or not self.tick { "\nSuddenly a half-dozen of the Sheriff's roughest, toughest, and hungriest-for-justice deputies show up. \ They level their guns at the murderer (meaning you, of course), and bring you down in a blaze of trigger-\ pulling." endflag = 2 } } fuse sarah_waiting ! at the stable ! special once Sarah is heard {} event sarah_waiting { if location = stall and self is not special {"\nYou hear a noise outside the stall, like someone moving around." self is special} elseif location = stable { "\nA woman slips into the stable behind you. She stands off to the side, almost in the shadows, regarding you warily. She looks vaguely familiar." sarah is known move sarah to location Deactivate(self) obstacle = sarah Activate(sarah_conversation, 15) } elseif not self.tick remove sarah } fuse sarah_conversation ! again, at the stable {} event sarah_conversation { local t t = self.tick select t case 14 { "\nThe woman seems relieved. \"Good. I wasn't sure if you'd actually come,\" she says.\n\n She goes to the stable door and looks outside, making sure that the two of you are alone before she closes it." event_flag = true } case 13 { "\n\"That must mean you remember what I told you last night in Grady's, right? About Glen Heffer? I mean before his bastard son showed up and started causing trouble.\"\n\n That's when it hits you: this is the woman for whose honor--directly or indirectly--you ended up in a gunfight this morning. Sarah or Sandra or Samantha or something like that. Sarah. That's right: Sarah. Whew. Nice memory on you." sarah.name = "Sarah" sarah.article = "" event_flag = true sarah is moved glenheffer is known } case 11 { "\nSarah looks at you skeptically again. \"Okay. Here's what you have to do,\" she says. "; if oldmare not in location and redstallion not in location "\"You have a horse, right? I mean, I'm assuming you do. If you don't, you'll have to get yourself one. I guess I just figure any cowboy worth his weight in dust has a horse."; else "\"You've got a horse. Good."; " You know the road going east just north of town? Ride east, all the way to the end. You'll know when you're there because you'll find me waiting for you.\"" event_flag = true } case 10 { "\nSarah's face softens a little, and some of her tough facade fades away.\n\n\ \"Look, I don't know if you're a hero or just not very smart or what. It was more than enough that you stood up for me against Roy. Now this. It's probably more than I can ask, but...thank you.\"" obstacle = 0 event_flag = true } case 3 { if location = parent(sarah) { "\nSarah moves to the door. \"I've got to go now. \ I'll see you there.\"" event_flag = true score = 3 } } case 1 { if location = parent(sarah) { "\nSarah slips out of the stable." event_flag = true } move sarah to sarahshorse Activate(sarahroad_daemon) sarahroad_daemon.in_scope = sarah } ! Just in case the player jumps the gun and rides to the end of ! the road before the conversation is technically over ! if location = dustyroad { Deactivate(sarah_conversation) move sarah to sarahshorse Activate(sarahroad_daemon) sarahroad_daemon.in_scope = sarah } } fuse stratfordtaffy_fuse ! when Stratford's all gummed up {} event stratfordtaffy_fuse { local t remove taffy t = self.tick if (location = stratfordsporch or location = hiddenmeadow) \ and stratford not in location { move stratford to location "\nStratford follows you to "; print The(location); "." } if stratford in location { select t case 4 "\nStratford is helpless as his hands and mouth are all gummed up with sticky taffy." case 3 "\nStratford fights to get his hands free. He's only making it worse. Boy, that's some sticky taffy." case 2 "\nAgainst all odds, Stratford is actually making some progress in getting free from the taffy." case 1 {stratford is not special "\nSomehow Stratford manages to separate himself from the sticky taffy. Watch out." remove taffy} case 0 {"\nStratford levels his taffy-free shotgun at you and fills you with buckshot." endflag = 2} event_flag = true } } daemon sarahroad_daemon ! waiting for you {} event sarahroad_daemon { "\n\"I'm glad you made it,\" Sarah says as she climbs down from her horse." move sarah to location Activate(sarahfollow_daemon) Deactivate(self) } daemon sarahfollow_daemon ! after meeting her at road's end {} event sarahfollow_daemon ! This daemon has the special attribute set whenever the player wanders west ! on the dusty road; Sarah will not follow, but she will once the player ! returns { local old ! Sarah's old location local msg ! default message if false if (location = dustyroad or location = edgeoftown) \ and self is not special { self is special "\n(Sarah stayed behind at the east end of the road.)" } elseif location = endofroad self is not special if self is not special { old = parent(sarah) if sarah not in location { move sarah to location ! Various appropriate following messages if location = topofbank { if old = endofroad "\nSarah scrambles up the bank after you. \"I hope you know what you're doing,\" she says." elseif old = frontofhouse "\nSarah walks beside you as you move away from the house. \"But that's where we've got to go,\" she says." elseif old = besidehouse "\nSarah follows you back out into the open." else "\nSarah follows you back to the top of the bank." msg = true } elseif location = hayfield {"\nSarah follows you into the hayfield. \ \"What are you doing over here?\" she asks." msg = true} elseif location = insidehouse { if old = frontofhouse "\nSarah walks quietly into the house after you." else "\nSarah follows you back to the front entrance. \"Are you lost?\" she asks." msg = true } elseif location = eastwing or location = westwing {"\nA none-too-sure-looking Sarah follows \ you into "; print The(location); "." msg = true} elseif location = livingroom { if glenheffer in location { "\nSarah comes into the living room after you and spies the bound man. \ \"Uncle Bucky!\" Then she sees Heffer, and snarls: \"You withered old son of a bitch...\"" "\nHeffer leaps to his feet and yanks Uncle Bucky roughly to his feet. The two of them make a break for the back door--Heffer running and towing a stumbling Bucky behind him. The door slams behind them." "\nSarah spins toward you. \"Did you see that?\" she asks." ! They run out the back door move glenheffer to backyard glenheffer is not hidden move bucky to backyard backdoor is not locked ! Large Duane comes to find you Activate(duaneprowl_fuse, 15) largeduane is special } elseif old = insidehouse "\nSarah walks into the living room behind you." else "\nSarah follows you back inside the house. \"You're going the wrong way,\" she complains." msg = true } elseif location = kitchen { if old = backyard "\nSarah walks quickly after you, protesting: \"Shouldn't we be getting the heck out of here?\"" else "\n\"What are we doing in the kitchen?\" Sarah asks, following you nonetheless." msg = true } if not msg "\nSarah follows after you." } } } fuse haystackburning_fuse ! when Large Duane runs to put it out {} event haystackburning_fuse { if not self.tick { hayfieldobject.misc = 2 ! burnt to a crisp if largeduane is not special { move largeduane to frontofhouse if player in frontofhouse { "\nJust at this moment, Large Duane returns from fighting the fire in the hayfield. \ He wipes the sweat from his brow as he trudges back to the front of the house." "\nSuddenly he looks up. Spots you. His eyes narrow to two mean little slits. \"Why you little...\" he begins, but apparently figures it's easier to finish his thought with a couple of slugs from his six-shooter." endflag = 2 } elseif player in topofbank { "\nFrom here, you can see Large Duane trudging back to the front of the house, returning from fighting the fire in the hayfield." move largeduane to frontofhouse event_flag = true } } } } fuse duaneprowl_fuse ! after bursting in on Glen Heffer {} event duaneprowl_fuse { if not self.tick { if location = fireplace "\nSuddenly Large Duane pokes his head into the fireplace. "; else "\nSuddenly Large Duane bursts in on the two of you. "; "\"\IYou!\i\" he shouts, pointing at you, of course. \"You show up, cook the hayfield, trick me into running around like a fool, come in here, "; if glenheffer is not dead "try to "; "do in my boss...\"\n" "He pauses. \"Aw, to hell with it,\" he mutters. \"Yer just too much damn trouble.\"\n" "With that, Large Duane pulls back the hammer on his pistol, points it right at you, and pulls the trigger." endflag = 2 } } fuse glenheffer_fuse {} event glenheffer_fuse { if self.tick "\nHeffer levels the barrel of his gun betwixt your eyes." else {"\nHeffer pulls the trigger, knocking you backward, head over teakettle. You whack your skull against a rock, and everything goes dark--either because of the rock or because..." endflag = 2} event_flag = true }