!\--------------------------------------------------------------------------- BILLY.HUG Billy Van Earl's character for Guilty Bastards by Kent Tessman (c) 1998 (Included by "gb2.hug") NOTE: The code in general (i.e., not just this file) contains a lot of "if billy in location" checks since Billy can be convinced to follow the player around--although if you freak him out (and Billy is easily freak-outable) he'll grab a cab home again. ---------------------------------------------------------------------------\! character billy "Billy" { inherits NPC nouns "billy", "bill", "earl" adjectives "billy", "bill", "van" long_desc "Billy Van Earl is in his mid-twenties, kinda lanky, average height. His sun-bleached hair is clipped short. Earring in one ear. Perpetually dazed-looking: the by-product of being a nocturnal creature. Basically wearing a sign that says \"Musician\"." short_desc { if billy in beachhouse "Billy Van Earl is standing out here in front of his house." elseif billy_in_volvo "Billy Van Earl is sitting with you in the Volvo." elseif billy_waiting_around is active "Billy Van Earl is here, just waiting around." else "Billy is here with you." } graphic IMAGES1, "billy" parse_rank 1 ! prefer to house, etc. misc 0 ! number of times he's been buzzed downstairs lying_about_cindy true lying_about_holly true knows_about_photos false is_following 0 suspended false ! for billy_following before { ! Any sort of interaction resets the inactive-turns counter: object DoAsk, DoTell { billy_leaving.timer = 0 return false } xobject DoShow, DoGive { billy_leaving.timer = 0 return false } } after { !------------------ ! DoAsk responses: !------------------ object DoAsk { select xobject case cindy { if self.lying_about_cindy "Billy raises his eyebrows. \ \"Geez...I never heard of her, you know? Wish I could help you out.\"" elseif self.lying_about_holly { "\"Look, man,\" Billy says, \"You don't think I'm broken up over what happened? Maybe I even, like, loved her, you know? You think I don't miss Holly? Well I do.\"" ! This signals the "Holly" slip: self.lying_about_holly = 2 } else "\"She left me! Is that what you want to hear?\" Billy asks. \"I screwed up and I went sneaking around with Holly Golden and Cindy found out and left me. I'm lucky she didn't take any part of me with her. Or strangle me in my sleep.\"" } case murder { if self.lying_about_cindy "\"If I don't know her, I probably don't know who killed her, right?\"" else "Billy looks perplexed. \"Well, \II\i don't know who killed her. I didn't have anything to do with it.\" \ Then he suddenly clues in that maybe that's not the first thing on anyone's mind. \"You know, not that anybody'd even think I \Idid\i, right?\"" } case holly { if self.lying_about_holly = true "\"You mean Holly Golden the movie star? The actress? I've never met her,\" Billy says, shaking his head." ! If self.lying_about_holly = 2, print this ! little preamble to the response for ! self.lying_about_holly = false: ! elseif self.lying_about_holly = 2 { "Billy's eyes widen. \"What? \ Holly--? Did I say Holly? You mean...well, um. God...damn...\" He blows his breath out. You caught him.\n" self.lying_about_holly = false } if self.lying_about_holly = false "\"Aw, geez, man...\" Billy begins. \"Yeah, right--it \Isounds\i great to have all these chicks, right? But it's a nightmare, you know? I'm lying to Cindy, I'm making up excuses for where I've been, where I'm going, I'm sitting there in Malibu listening to Holly bitch and whine--and God, she can bitch and whine--all the time thinking 'Cindy's gonna kill me...Cindy's gonna kill me...'\" \ Really trying his best to get your sympathy. \"But what was I supposed to do? Dump Holly? She's Holly Golden, man.\"" } case milt { if self.lying_about_cindy "\"Should I know who that is?\" Billy asks." else "\"Exactly! Milt Walker, man!\" Billy says excitedly. \"If you want to find out what happened to Cindy, that's one dude you should talk to--Milt Walker's one of those guys who knows everything and everybody.\"" } case stuart { if self.lying_about_cindy "\"Never heard of the guy.\"" else "\"Well, maybe Cindy might've mentioned him or something,\" Billy says. \"But I sure didn't know the guy.\"" } case chuck { if self.lying_about_cindy "\"I don't know who you're talking about,\" Billy says." else "\"Oh, I know who you're talking about,\" Billy says, \"but I don't know much about him. Other than he was Cindy's agent and she talked about him once in a while. I think he may've liked her, too. In a way that's more than just her agent, you know? Like, she said something once about how he said something that made her uncomfortable. I don't really remember, though...\"" } #ifset INCLUDE_OTHER_CHARACTERS case johnny "\"I've never been a real big fan of his or anything,\" Billy says." #endif case cindysmovie { if self.lying_about_cindy "\"I've never heard of that.\"" else "\"I know Cindy really wanted it to turn out well,\" Billy says, \"but she was, like, a little bit worried about how it was going.\"" } case photos, negatives { if self.lying_about_cindy "Billy looks kinda shaken. \"So you got pictures of me doing the horizontal with a movie star,\" he says, managing to recover a little. \"Seems to me that can only make me look \Igood\i.\"" else { "\"Where did you get those, man?\" Billy asks. \"Oh man, I can't believe it. Who took pictures of us? I mean, if Cindy had ever found out, she woulda killed me. Like, seriously.\" And Billy's nodding as if, yes, she woulda killed him. \"She was a cute, sweet little thing, but when it came to something like that she had a temper like you wouldn't believe.\"" self.lying_about_holly = false } } case funk_music { if not FindObject(funk_music) { "\"That's my band, Funkzilla. It's our new CD.\"" return true } if funk_music is not special "\"Yeah,\" Billy says, as brightly as he can muster. \"That's my band, Funkzilla. That's our new CD. Pretty groovy, huh?\" He stands there for a second, forgetting you, bopping his head in time to the beat." else "\"I turned it off.\"" funkzilla is known } case funkzilla "\"Funkzilla's my band. We just put out a new CD: \IEl Thump\i.\"" case cassettetape { if self.lying_about_cindy "Billy shrugs. \"It's just a tape of some of our songs. We make, like, dozens of 'em, give 'em out all over the place. Who knows where that one came from?\"" else "Billy says: \"I made it for Holly--it was some of our new stuff.\" He looks genuinely sad. \"She really was important to me, you know. My music was the best gift I had.\"" } case birthdaycard { if not self.lying_about_holly "\"I guess she must've thrown it out. I mean, she was pretty pissed about me and Holly. She'd been staying with me but after all that shit hit the fan, she moved back to her place.\"" elseif not self.lying_about_cindy "\"It's a birthday card--I gave it to her. There's nothing wrong with that, is there?\"" else "\"What am I supposed to know about somebody's birthday card?\"" } case santamonica, ocean, beachhouse "\"I dunno...it's a pretty cool place to live, you know? Like, right on the ocean...\"" case malibu, hollyshouse { if self.lying_about_holly "Billy shrugs. \"Nice place to surf, I guess.\"" else "Billy looks guilty. \"Well, I spent a lot of time sneaking back and forth to there, lemme tell you.\"" } case groupies "\"Well, lemme tell you, I always figured if I was a musician, maybe I could get chicks, but I never figured I get this \Imany\i chicks.\"" case else return false } !------------------- ! DoTell responses: !------------------- object DoTell { select xobject case else return false } !------------------- ! DoShow responses: !------------------- xobject DoShow { select object case birthdaycard { "Billy looks at the card, surprised. Then not-so-surprised. Then he swallows. \"Well, that could be any Billy, right?\" He reconsiders. Deep breath. \"Well...okay, so I did know her. \ Look, can you blame me? For lying, I mean? I'm pretty freaked out here.\"" self.lying_about_cindy = false } case torncard "Billy frowns and hmmms. \"I dunno, man. \ That name kinda sounds familiar, though. It's not, like, a supermarket or something, is it? Or a puppet?\"" ! Same as asking about these: case photos, cassettetape Perform(&DoAsk, self, object) case else return false } } order_response { if verbroutine = &DoFollow and object = player { if self.is_following "\"Hey, I'm, like, doing my best,\" Billy says." elseif self.lying_about_cindy "\"No way,\" Billy says, a little too emphatically. \"I don't have anything to do with this--you don't have anything on me, man.\"" else { "Billy sighs grudgingly. \"Okay. But only because I want to find out what happened to Cindy.\"" Activate(billy_following) self.is_following = player } } elseif verbroutine = &DoStop { if not self.is_following "Billy looks at you, not sure what you're talking about but willing to agree anyway. \"Yeah, okay, man. Whatever.\"" else { "\"Okay,\" Billy says, shrugging."; if billy in volvo { " He gets out of the Volvo."; billy_in_volvo = false } " \"I'll just, uh, hang around here for a bit.\"" Deactivate(billy_following) Activate(billy_waiting_around) self.is_following = 0 } } else "\"You know, I don't really want to...\" Billy says." } } compound "his", "band" ! mostly harmless hack synonym "hisband" for "funkzilla" object funkzilla "Funkzilla" { nouns "funkzilla", "band" is known } object groupies "groupies" { nouns "groupies", "girls", "fans", "chicks", "babes" is known } !---------------------------------------------------------------------------- ! For managing Billy coming to answer the doorbell (and subsequently ! going back upstairs): routine RingDoorbell { if billy_arriving is active: return if billy in location "\nBilly looks at you funny. \"Hey, man, why're you buzzing me? I'm right here.\"" ! If Billy is not in nothing--i.e., if he's actually somewhere on ! the game map--ringing the doorbell is an empty gesture elseif billy in nothing Activate(billy_arriving, 3) } fuse billy_arriving { timer 0 } event in billy_arriving { local n, t t = self.tick if t = 2 return if t = 1 or billy.is_following Deactivate(self) ! Figure out if this is the first time the player has rung ! the doorbell, or if Billy has been buzzed one or two or ! many times before, and react appropriately: n = ++billy.misc if n > 100: billy.misc = 100 ! Billy won't come down more than 10 times if n < 12 { move billy to beachhouse Activate(billy_leaving) billy_leaving.timer = 0 } else return if player in beachhouse { event_flag = true if n < 10 { "\nAfter a minute or so, Billy Van Earl comes ambling down from somewhere upstairs. "; ! If we haven't met Billy yet if self is not special { "\"Hey,\" he says, squinting. He obviously doesn't know you." self is special billy is known } elseif n < 5 "\"Hey,\" he says, squinting." else "\"Hey, man, what's going on?\" he asks. \ \"You keep rattling my ass off the sofa.\" He's looking less like your friend than he did, oh, five rings ago." } elseif n < 12 "\nAfter a minute, Billy comes marching angrily down again from upstairs. \"What the hell, man?\" he asks, scowling. \"If you keep ringing my buzzer like that, I'm gonna...\" He's not sure what he's gonna do, to be honest. But he's going to be pissed off about it, whatever it is." } } daemon billy_leaving { timer 0 } event in billy_leaving { ! If the player leaves, Billy goes back upstairs if player not in beachhouse { remove billy Deactivate(self) return } ! If the player hasn't spoken to Billy in a while, he'll wander back ! upstairs if ++self.timer > 10 { "\n\"Well, I'm just going to wander back on upstairs,\" Billy says, before doing exactly that." Deactivate(self) remove billy event_flag = true } } !---------------------------------------------------------------------------- ! For managing Billy following the player: global billy_in_volvo daemon billy_following {} event in billy_following { if billy.suspended { ! billy.suspended = 2 if Billy is waiting for the player ! to come back out of Cindy's apartment if billy.suspended = 2 { if location = stairs { "\nBilly comes out from where he's been hiding just around the corner. \"I just didn't want to...you know...hang around in there.\"" billy.suspended = false move billy to location } } return } ! Billy mirrors the player getting in and out of the car: if player in volvo and not billy_in_volvo { "\nBilly gets into the passenger seat of the Volvo." billy_in_volvo = true return } elseif player not in volvo and billy_in_volvo { "\nBilly gets out of the Volvo, too." billy_in_volvo = false return } if billy in location or location = old_location ! no need to follow return if billy_in_volvo ! no need for a message here { move billy to location return } ! Deal with special following messages for certain locations: select location ! Santa Monica locations: case beachhouse ! Billy's house { "\nBilly follows you back to his house." Deactivate(self) } case beach ! Santa Monica { if old_location = overlookingbeach "\nBilly follows you down the cement steps to the beach." else "\nBilly follows you north up the beach, away from his house." } case overlookingbeach { if old_location = beach "\nBilly climbs up the stairs after you." else "\nBilly follows you away from the street." } case santamonica "\nBilly follows you back to where you parked." ! Malibu locations: case belowhouse ! below Holly's house { if old_location = malibu "\n\"Oh, man...\" Billy complains, \"I don't know if I wanna go up there...\" But he reluctantly follows you anyway." else "\nBilly follows you back down away from the house." } case outsidehouse ! outside Holly's house { if old_location = driveway "\n\"Uh-oh,\" Billy mutters, taking a deep breath." else "\nBilly follows you back up the driveway." } ! The Pelican Hotel: case yourroom "\nBilly comes into the hotel after you. \"Kind of a dive, isn't it?\" he asks. \"Like, what kinda lowlife murder suspect is flopping here?\"" ! Studio locations: case mainbuilding { "\nBilly follows you north toward the main building."; if milt in location " He sees Milt and cringes. Under his breath: \"Oh, man...this guy hates me.\"" print newline } case reception "\nBilly hangs around the door to the reception area." ! Cindy's apartment: case apartmentbuilding { if old_location = nationalblvd "\nBilly follows you away from National, toward Cindy's apartment building. \"This place kinda makes me nervous,\" he says, stuffing his hands in his pockets." else jump DefaultFollowMessage } case alley "\n\"What're you doing sneaking around in the alley?\" Billy asks, frowning as he sneaks after you." case cindysapartment { "\nBilly chickens out. \"You know, I hope you'll understand if I don't want to, like, hang around in here. I'll just be outside...\" And he slips out the door again." remove billy billy.suspended = 2 return } ! Wilshire locations: case closet "\nBilly pokes his head into the closet after you. \"What are you doing?\" he asks." case wilshirelobby { if old_location ~= closet ! otherwise do nothing elseif old_location = chucksoffice "\nBilly follows you back downstairs." else "\nBilly comes into the building after you." } ! Default follow message, i.e., "Billy follows you .": case else { :DefaultFollowMessage ! To fix a condition where Stuart ambushing the player ! will run (and move the player to the kitchen) before this ! so billy.suspended won't be set properly (as above) if location = kitchen and billy in stairs { billy.suspended = 2 return } "\nBilly follows you"; if last_object.type = direction { if last_object = u_obj, d_obj ! use "up" instead of "above", "down" ! instead of "below": print " "; last_object.noun #2; else print " "; last_object.name; } print "." } ! Return before here if you don't want Billy to follow: move billy to location } !---------------------------------------------------------------------------- ! For when the player has told Billy to stop following: daemon billy_waiting_around { timer 0 } event in billy_waiting_around { if player in parent(billy) { if self.timer >= 30 "\n\"There you are. I was just about to grab a cab back to the beach or something,\" Billy says." self.timer = 0 } else { ! Billy will hang around for 45 minutes or so before ! catching a cab home if ++self.timer >= 45 { Deactivate(self) remove billy } } } !---------------------------------------------------------------------------- ! For when Billy is following the player and the player does something to ! freak Billy out: fuse billy_freaked {} event in billy_freaked { if not self.tick { if billy in location print "" BillyBolts } } routine BillyBolts { if billy in location { event_flag = true "Billy--who is skittish enough to begin with--\ has apparently had enough. \"Forget it, man. I'm buggin' outta here. I'm, like, grabbing a cab home.\" \ And he takes off." } billy.is_following = 0 move billy to nothing Deactivate(billy_following) if billy_freaked is active Deactivate(billy_freaked) } ! Stubs to prevent compiler errors in billy_following if just compiling PART2: #ifclear PART1 room stairs {} room yourroom {} room mainbuilding {} room reception {} room apartmentbuilding {} room nationalblvd {} room alley {} room cindysapartment {} #endif