diff --git a/scripts/current/npc_scripts/beware_of_creatures.txt b/scripts/current/npc_scripts/beware_of_creatures.txt index 369d57d..a099a2b 100644 --- a/scripts/current/npc_scripts/beware_of_creatures.txt +++ b/scripts/current/npc_scripts/beware_of_creatures.txt @@ -1,58 +1,43 @@ -Block: start -Crikey, look at the size of that one. Hold back mate, I wouldn't get any closer if I were you! -Responses: -Woah, ok. Dangerous? -> danger -Nah, I'm ok. I know what I'm doing. -> know - -Block: insect -Well, its your own life mate. Just let me know so I can back off a little - they're nasty little rippers. -Tell you what, how about I just pick it up and move it out of the way then? -Responses: -Move it? You just said it was dangerous. -> move -Sure, I'll, umm, stand over here. -> stand -So its dangerous then? -> danger - -Block: danger -Well yeah. Everything around here is dripping with venom, or claws or would otherwise like to see what you taste like. -Now ya see this little thing here? One little nip, and you're taking a nap for at least a week. -Responses: -Wow. Maybe I'll just head over there for a sec then. -> stand -Its just an insect. Can't really be that dangerous can it? -> insect -Hmm, seems to dangerous to be around. I'm off. -> leave - -Block: know -Yeah yeah, that's what the last bloke said. See those bones over there? That's not him, but could just of easily have been. -Hes been in hospital for the last 5 months. Up to you, though. -Responses: -Sure, but I think I can handle a little insect. -> insect - -Block: leave -I'll see you at sundown then, hey mate. Good luck. Watch out for those Quizzer! - -Block: stand -If you think it will help, sure. But crikey, these things can strike even from over here. Hope you got the reflexes of Draagax. -Tell you what, there is a nice herd of Banthas over the next rise. The worst they can do is trample you. -Responses: -Thanks for the tip, I'm off. -> leave -Aww, but I like this insect. -> insect - -Block: move -!ifnot character.race=Gungan! Yeah mate? You point is? I've moved hundreds of these things around with nary a mark. Lets see you try that! -!if character.race=Gungan! Yeah mate? Your point is? I've moved ... no, wait, hang on ... don't touch tha... -Responses: -!ifnot character.race=Gungan! Ah, yeah, better not. -> leave -!if character.race=Gungan! *Fall on the ground* -> gungan - -Block: gungan -Quick, get the medikit! Put that syringe on the ground, and help me move this. -No, not the Gungan. The useless fool can stay there for a second. This creature is much more worthy of saving. -Responses: -Gurgle -> gurgle -*Go unconcious* -> collapse - -Block: gurgle -Excellent, this creature is saved. Now to see to that Gungan. Get me a scalpel, by crikey its time for some field surgery! -*Time passes as they deal with you* - -Block: collapse -Daft bugger. Leave the Gungan alone lads, he's gonna wake up with a nasty headache. \ No newline at end of file +(defun start +(say "Crikey, look at the size of that one. Hold back mate, I wouldn't get any closer if I were you!") +(add-response "Woah, ok. Dangerous?" danger) +(add-response "Nah, I'm ok. I know what I'm doing." know) +) +(defun insect +(say "Well, its your own life mate. Just let me know so I can back off a little - they're nasty little rippers. Tell you what, how about I just pick it up and move it out of the way then?") +(add-response "Move it? You just said it was dangerous." move) +(add-response "Sure, I'll, umm, stand over here." stand) +(add-response "So its dangerous then?" danger) +) +(defun danger +(say "Well yeah. Everything around here is dripping with venom, or claws or would otherwise like to see what you taste like. ") +(say "Now ya see this little thing here? One little nip, and you're taking a nap for at least a week.") +(add-response "Wow. Maybe I'll just head over there for a sec then." stand) +(add-response "It's just an insect. Can't really be that dangerous can it?" insect) +(add-response "Hmm, seems to dangerous to be around. I'm off." leave) +) +(defun know +(say "Yeah yeah, that's what the last bloke said. See those bones over there? That's not him, but could just of easily have been. He's been in hospital for the last 5 months. Up to you, though.") +(add-response "Sure, but I think I can handle a little insect." insect) +) +(defun leave +(say "I'll see you at sundown then, hey mate. Good luck. Watch out for those Quizzer!")) + +(defun stand +(say "If you think it will help, sure. But crikey, these things can strike even from over here. Hope you got the reflexes of Draagax. Tell you what, there is a nice herd of Banthas over the next rise. The worst they can do is trample you.") +(add-response "Thanks for the tip. I'm off." leave) +(add-response "Aww, but I like this insect." insect) +) +(defun move +(cond [(eq? (get-race character) 'Gungan) (say "Yeah mate? Your point is? I've moved ... no, wait, hang on ... don't touch tha...") (add-action "Fall on the ground" gungan)] [#t (say "Yeah mate? You point is? I've moved hundreds of these things around with nary a mark. Lets see you try that!")(add-response "Ah, yeah. Better not." leave)]) +) +(defun gungan +(say "Quick, get the medikit! Put that syringe on the ground, and help me move this. No, not the Gungan. The useless fool can stay there for a second. This creature is much more worthy of saving.") +(add-action "gurgle" gurgle) +(add-action "go unconscious" collapse) +) +(defun gurgle +(say "Excellent, this creature is saved. Now to see to that Gungan. Get me a scalpel, by crikey its time for some field surgery!") +(describe "Time passes as they deal with you")) +(defun collapse +(say "Daft bugger. Leave the Gungan alone lads, he's gonna wake up with a nasty headache.")) \ No newline at end of file diff --git a/scripts/current/npc_scripts/unarmed_brawler.txt b/scripts/current/npc_scripts/unarmed_brawler.txt index e60d6ff..65518cb 100644 --- a/scripts/current/npc_scripts/unarmed_brawler.txt +++ b/scripts/current/npc_scripts/unarmed_brawler.txt @@ -1,3 +1,215 @@ -Block: start -* %npc.name% looks at you in a funny way* -'geroff, i'm not in the mood. \ No newline at end of file +; Strength variables +(defvar pc-str (+ (get-skill character 'strength) 1)) +; between - (strength -1) and 6 - Strength +(defvar npc-str (svar 'myStr (+ (get-skill self 'strength) 1) )) +(defvar total-str (+ pc-str npc-str)) +; stun/hp variables + +(defun setNPC-str +(defvar ranmod (rand (- 1 (get-skill self 'strength) ) (- 6 (get-skill self 'strength)))) +(set-var! npc-str (+ (get-skill self 'strength) ranmod)) +) + +(let ((ptempStr pc-str) (ntempStr npc-str)) +(defvar pc-stun (svar 'pc-stun ptempStr)) +(defvar npc-stun (svar 'npc-stun ntempStr)) +) +; more o-variables for recovering from an interrupted interaction and later stat use. +(defvar roundnum (svar 'roundnum 0)) +(defvar numfights (svar 'numfights 0)) +(defvar numwins (svar 'numwins 0)) +(defvar numlosses (svar 'numlosses 0)) +(defvar numties (svar 'numties 0)) +(defvar firstround (svar 'firstround 0)) +(defvar pronounHeShe (cond [(eq? (get-gender self) 'Female) ('She)] [#t 'He])) +(defvar pronounheshe (cond [(eq? (get-gender self) 'Female) ('she)] [#t 'he])) +(defvar pronounherhis (cond [(eq? (get-gender self) 'Female) ('her)] [#t 'his])) +(defvar pronounHerHis (cond [(eq? (get-gender self) 'Female) ('Her)] [#t 'His])) +(defvar pronounherhim (cond [(eq? (get-gender self) 'Female) ('her)] [#t 'him])) +(defvar pronounHerHim (cond [(eq? (get-gender self) 'Female) ('Her)] [#t 'Him])) + +(defun (descriptor-str pc-Npc-object) +(cond +[(eq? pc-Npc-object self) + (cond + [(ge? npc-str 5) "powerful"] + [(ge? npc-str 3) "strong"] + [(ge? npc-str 2) "average"] + [#t "weak"] + )] +[#t +(cond [(ge? pc-str 5) "powerful"] + [(ge? pc-str 3) "strong"] + [(ge? pc-str 2) "average"] + [#t "weak"]) + ]) +) + +(defun start +(cond +[(eq? firstround 0) (setNPC-str) (set-var! firstround 1)(describe (concat "A " (descriptor-str self) "-looking " (get-race self) " stands here. " pronounHeShe " is dressed in comfortable clothing and shifts side to side as if impatiently awaiting something.")) +(say (concat "You look " (descriptor-str character) "." )) +] +[#t (describe (concat "The " (get-race self) " looks expectantly at you. ")) +]) + +; start fight - If fight in progress (Roundnum >0) then give option to continue fight or forfeit. +(cond +[(gt? roundnum 0) (say "Ready to continue the fight?") (add-response "Sure." do-Fight) (add-response "No, I want to surrender this fight." do-forfeit-fight) (add-response "No, I'd rather talk about stuff first." do-talk) (add-response "No, not right now. I'm going to go." pleave)] +[#t (say "You looking to fight?") + +(add-response "Let's Fight!" do-Fight) (add-response "No, not right now. I'm going to go." pleave) +(add-response "No, I'd rather talk about stuff first." do-talk)] +) +;(add-response "Debug: ResetAll" resetAll) +) + +(defun do-talk + (describe (concat "The " (get-race self) " looks annoyed." )) +(say "Right, talking. What do you want to talk about?") +(add-response "Statistics. You know, our record of fights?" stats) +(add-response "I want a better challenge" advancedBrawler) +(add-response "I need an easier brawling partner" devancedBrawler) + +(cond +[(gt? roundnum 0) +(add-response "Let's continue the fight." do-Fight) +(add-response "I want surrender our current fight." do-forfeit-fight) +] +[#t (add-response "Enough talk, let's fight!" do-Fight)] +) +(add-response "Nothing, nevermind." pleave) +) + +(defun resetAll +(set-var! roundnum 0) +(set-var! numfights 0) +(set-var! numwins 0) +(set-var! numlosses 0) +(set-var! numties 0) +(set-var! pc-stun pc-str) +(set-var! npc-stun npc-str) +(ooc (concat "roundnum: " roundnum ", numfights: " numfights ", W:L:T " numwins ":" numlosses ":" numties ", pc-stun: " pc-stun ", npc-stun: " npc-stun)) +(add-action "Back to Start" start) +(add-action "Leave" pleave) +) + +(defun pleave +(describe (concat "The brawler gruffly nods and turns " pronounherhis " attention elsewhere.")) +) +(defun action-leave (describe "")) + +(defun advancedBrawler +(say "Oh, you think you're better than me? You'll just have to find a Brawler who's tougher than me. Try to find one from a race that's tougher than mine, or ask around.") +(say "Get a move on, now.") +(add-action "leave." action-leave) +(add-response "No no, wait. I want to talk some more." do-talk) +(add-response "Wait, let's fight some more." do-Fight) +) +(defun devancedBrawler +(say "Can't handle me, eh? Look around for a Brawler who is weaker than me. Try a race that's less tough than I am, or ask around.") +) + +(defun stats +(say (concat "Well out of " numfights " fights, you've Won " numwins ", Lost " numlosses ", and Tied " numties " times.") ) + +(cond +[(gt? roundnum 0) (say (concat "We're in Round Number: " roundnum " of fight #" numfights ".")) +(say "Ready to continue the fight?") (add-response "Sure." do-Fight) +(add-response "No, I want to surrender this fight." do-forfeit-fight) +(add-response "No, I'd rather talk about stuff first." do-talk) (add-response "No, not right now. I'm going to go." pleave) +] +[#t (say "We're not in the middle of a fight right now.")] +) +(add-response "Let's talk about something else." do-talk) +(add-response "Let's fight." do-Fight) +(add-response "Thanks. See you later." pleave) +) + + +; Determine if the player with the given strength hits +(defun (hit-by-x? str) +(cond +[(le? (rand 1 total-str) str) #t] +[#t #f])) + +(defun do-attack +; Player attacks +(cond +[(hit-by-x? pc-str) (set-var! npc-stun (- npc-stun 1)) (describe "You land a hit!")] +[#t (describe "You miss!")]) +; NPC attacks +(cond +[(hit-by-x? npc-str) (set-var! pc-stun (- pc-stun 1)) (describe "Your opponent lands a hit!")] +[#t (describe "Your opponent misses!")])) + +(defun do-forfeit-fight + (do-EndFight 'forfeit) + ) + + +(defun (do-EndFight result) +; 'forfeit 'win 'lose or 'tie expected +; exits are back to Start or end the interaction. +(set-var! roundnum 0) +(cond +[(eq? result 'forfeit) (set-var! roundnum 0)(flash 'info "You have forfeited the Brawl") (describe "You throw up your hands and give up. You can try again later.") + (set-var! numlosses (+ numlosses 1)) (set-var! pc-stun pc-str) (set-var! npc-stun npc-str) (add-response "Give me a moment, we'll start again." start) + (add-response "That's enough for me." pleave)] + +[(eq? result 'win) (set-var! roundnum 0)(set-var! numwins (+ numwins 1)) (set-var! pc-stun pc-str) + (set-var! npc-stun npc-str)(flash 'green "You have Won the Brawl!")(describe (concat "You stand triumphantly over your battered opponent as " pronounheshe " slowly regains consciousness. ")) + (add-response "Patch us up." start) (add-response "(Leave.)" pleave) + ] + +[(eq? result 'lose) (set-var! roundnum 0)(set-var! numlosses (+ numlosses 1)) (set-var! pc-stun pc-str) + (set-var! npc-stun npc-str)(describe (concat "Your opponent stands triumphantly over your battered body as you slowly regain consciousness.")) + (flash 'bad "You have Lost the Brawl!") (add-response "Patch us up." start) (add-response "(Leave.)" pleave) + ] + +[(eq? result 'tie) (set-var! roundnum 0)(set-var! numties (+ numties 1)) (set-var! pc-stun pc-str) + (set-var! npc-stun npc-str)(describe "You both slowly come back to consciousness after knocking each other out.") +(flash 'info "You have Tied the Brawl!") (add-response "Patch us up." start) (add-response "(Leave.)" pleave) + ] + +[#t (say "Error. Didn't get forfeit, win, lose, or tie")(add-response "(Leave)" pleave)] +) + + +) + + +(defun do-Fight +; Round by Round summary (basic variable-spitting at this point) +; will pick up in the middle of a round if have to break the NPC interaction +; note: With placing round checks after do-attack instead of IN do-attack, effectively both attacks are 'simultaneous' +; PC win condition is PC-Stun > 0 and NPC-Stun <= 0 +(cond + [(le? roundnum 0) (set-var! numfights (+ numfights 1)) (set-var! roundnum (+ roundnum 1)) +; every first round, increase the numfights by 1 and set Roundnum to 1. +(describe "The fight begins! You and your opponent circle each other, sizing each other up. You both make your moves at the same time.") +(do-attack)] + + [#t (set-var! roundnum (+ roundnum 1))(describe (concat "Round " roundnum " starts, and you both make your moves at the same time.")) (do-attack)] +) + ; end of round check +(cond [(and (gt? pc-stun 0) (le? npc-stun 0)) (do-EndFight 'win)] +[(and (gt? npc-stun 0) (le? pc-stun 0)) (do-EndFight 'lose)] +[(and (le? pc-stun 0) (le? npc-stun 0)) (do-EndFight 'tie)] +; if no win/L/T then just summarize and give options. +[#t (describe (concat "At the end of round " roundnum " You are at " pc-stun "/" pc-str "HP, and your opponent is at " npc-stun "/" npc-str "HP.")) +(add-action "attack" do-Fight) +(add-action "give up" do-forfeit-fight) +(add-response "I need a break!" break-leave)] +) + + + +) ; end defun + +(defun break-leave +(describe "You signal your opponent that you need a break and the fight stops.") +(add-response "Just a moment to catch my breath and we can continue." start) + (add-action "give up" do-forfeit-fight) + (add-response "I'm outta here for now." pleave) +) diff --git a/scripts/current/npc_scripts/worker.txt b/scripts/current/npc_scripts/worker.txt index 4ad9867..db722d2 100644 --- a/scripts/current/npc_scripts/worker.txt +++ b/scripts/current/npc_scripts/worker.txt @@ -1,90 +1,89 @@ -Block: start -*The %npc.race% in front of you lounges against some cargo containers, and looks at you curiously* -Hi there. Looking for anyone in particular? -Responses: -Not really. Just taking a look around. -> look -!ifnot character.isowner! Yeah. I'm looking for %owner.name%. -> owner -!if character.isowner! Give me a status report. -> status -What are you up to at the moment? -> moment +(defun start +(describe (concat "The " (get-race self) " in front of you lounges against some cargo containers and looks at you curiously.")) +(say "Hi there. Looking for anyone in particular?") +(add-response "Not really. Just taking a look around." look) +(cond [(is-owner? self character) (add-response "Give me a status report." status)] +[#t (add-response "Yeah. I'm looking for your employer." owner)]) +(add-response "What are you up to at the moment?" moment) +) -Block: look -Really? Not much to look at around here. -!if container.entityType in [City, Planet]! There is a nice breeze here don'tcha think? I like coming out here to think and enjoy my breaks. -!if container.entityType in [City, Planet]! !if time.ofday=Evening! Look at that sunset. Its glorious. Wish I could stay here forever and watch it. -!ifnot container.entityType in [City, Planet]! Pah, would you look at this place. Bulkheads, metal, and minimalist design everywhere. If only for some nice wall coverings and other paraphernalia to liven the place up. -Might want to return back where you came from really. -Responses: -!if container.entityType in [City, Planet]! !ifnot location.planet=Alderaan! Yeah it is nice here. Not a patch on the vistas on Alderaan though. -> alderaan -!if container.entityType in [City, Planet]! !if location.planet=Alderaan! Yeah. One of the nicer planets I think. -> nice -Yeah. Might do that actually. -> leave +(defun look +(say "Really? Not much to look at around here.") +(cond +[(or (eq? (get-entity-type (get-container self)) 'City) (eq? (get-entity-type (get-container self)) 'Planet)) (say "There is a nice breeze here don'tcha think? I like coming out here to think and enjoy my breaks.") +(cond [(eq? timeofday 'Evening) (say "Look at that sunset. It's glorious. Wish I could stay here forever and watch it.")] +[#t]) +] +[#t (say "Pah, would you look at this place. Bulkheads, metal, and minimalist design everywhere. If only for some nice wall coverings and other paraphernalia to liven the place up.") (say "Might want to return back where you came from really.")] +) +(cond [(or (eq? (get-entity-type (get-container self)) 'City) (eq? (get-entity-type (get-container self)) 'Planet)) +(cond [(eq? (planet-name character) 'Alderaan) (add-response "Yeah. One of the nicer planets I think." nice)] [#t (add-response "Yeah it is nice here. Not a patch on the vistas on Alderaan though." alderaan)]) +] [#t]) -Block: leave -Ok then, have fun. I won't expect to see you around again. +(add-response "Yeah. Might do that actually." leave) +) -Block: owner -Ah, everyone seems to want them. I haven't seen them for a while actually, so you might find it easier to just contact them. -Here, I have their holoaddress that you can send to. -Responses: -Thanks. -> leave -Actually, didn't care that much. -> care -*Shrug* -> leave +(defun leave +(say "Ok then, have fun. I won't expect to see you around again.") +) -Block: status -Sure thing %character.formal%. -There actually has been a small hiccup in the project, but with the help of the foreman, we've managed to get past it and we're back on track. -We should be completed on time, and in budget. -Responses: -Hiccup? How come I didn't head about this before? -> hiccup -Excellent. Carry on. -> start -Well, I suppose that is ok. I'll be off, so no slacking. -> leave2 +(defun owner +(say "Ah, everyone seems to want them. I haven't seen them for a while actually, so you might find it easier to just contact them, yourself.") +(send-message self character (concat "My employer's name is: " (get-name (get-owner self)) )) +(add-response "Thanks" leave) +(add-response "Actually, didn't care that much." care) +(add-action "shrug." leave) +) -Block: leave2 -Sure thing boss. I'll see you again I suppose. +(defun status +(say (concat "Sure thing " (get-formal character) ".")) +(say "There actually has been a small hiccup in the project, but with the help of the foreman, we've managed to get past it and we're back on track. We should be completed on time, and in budget.") +(add-response "Hiccup? How come I didn't head about this before?" hiccup) +(add-response "Excellent. Carry on." leave) +(add-response "Well, I suppose that is ok. I'll be off, so no slacking." leave2) +) -Block: care -Really? Then why ask? Bloody nusiance disturbing me in my break and asking pointless questions! -Go back to where you came from, and don't bother me again! +(defun leave2 +(say "Sure thing boss. I'll see you again I suppose.") +) -Block: hiccup -Oh, it was only a small thing. Barely disrupted us for an hour. Nothing to get worried about to be honest. +(defun care +(say "Really? Then why ask? Bloody nuisance disturbing me in my break and asking pointless questions! Go back to where you came from, and don't bother me again!") +) -Block: moment -Me? Not much. In the middle of my break at the moment. Not much going on at the moment. -!if time.ofday=Morning! Really, I've only just come on shift a few hours ago. Got the rest of the day to work. -!if time.ofday=Afternoon! Shift is almost over. Another few hours, and then off to the sack. Or the tavern. Might need a few drinks after this. -!if time.ofday=Evening! Well, looking at the time, its basically time for me to go home. -Responses: -Ah ok then. I'll leave you to it then. -> leave -!if time.ofday=Evening! Want to head to the local tavern with me? -> tavern -Can you spare some credits? -> credits +(defun hiccup +(say "Oh, it was only a small thing. Barely disrupted us for an hour. Nothing to get worried about to be honest.") +) +(defun moment +(say "Me? Not much. In the middle of my break at the moment. Not much going on at the moment.") +(cond [(eq? timeofday 'Morning) (say "Really, I've only just come on shift a few hours ago. Got the rest of the day to work.")] +[(eq? timeofday 'Afternoon) (say "Shift is almost over. Another few hours, and then off to the sack. Or the tavern. Might need a few drinks after this.")] +[#t (say "Well, looking at the time, its basically time for me to go home.") (add-response "Want to head to the local tavern with me?" tavern)]) +(add-response "Ah ok then. I'll leave you to it then." leave) +(add-response "Can you spare some credits?" credits) +) +(defun credits +(say "Nah, sorry. Got just enough for me and my family to live off, and not much more than that.") +) +(defun tavern +(say "Might be an idea. Have to check with my boss first though.") +) +(defun alderaan +(say "Well, it sure is mighty pretty, but sometimes it gets boring. Sometimes a little imperfection magnifies the rest and makes it much more impressive. But horses for courses as they say. I like my little patch.") +(add-response "Yeah." leave) +(add-response "Hmm. Actually got a few more questions for you." start) +) +(defun nice +(say "Yeah. Some say that Alderaan is just too pretty, too perfect, but they are crazy. Too perfect? Are they listening to what they are saying?") +(add-response "Anyway, I have a few other things to chat about." start) +(add-response "Yeah." leave) +) -Block: credits -Nah, sorry. Got just enough for me and my family to live off, and not much more than that. +(defun like +(say "Yeah, well some people should be shot, killed, and restored to life so they can be shot again. They just don't have any style. What about you?") +(add-response "I quite like it actually." shot) +(add-response "Meh, not my style at all." style) +) +(defun shot(say "That ... thats ... I ... oh to hell with it. I don't think I can talk with you anymore.")) -Block: tavern -Might be an idea. Have to check with my boss first though. - -Block: alderaan -Well, it sure is mighty pretty, but sometimes it gets boring. Sometimes a little imperfection magnifies the rest and makes it much more impressive. -But horses for courses as they say. I like my little patch. -Repsonses: -Yeah. -> leave -Hmm. Actually got a few more questions for you. -> start - -Block: nice -Yeah. Some say that Alderaan is just too pretty, too perfect, but they are crazy. Too perfect? Are they listening to what they are saying? -Responses: -Anyway, I have a few other things to chat about. -> start - -Block: like -Yeah, well some people should be shot, killed, and restored to life so they can be shot again. -They just don't have any style. What about you? -Responses: -I quite like it actually. -> shot -Meh, not my style at all. -> style - -Block: shot -That ... thats ... I ... oh to hell with it. I don't think I can talk with you anymore. - -Block: style -Excatly. Oh well, at least one kindrid spirit around here anyway. \ No newline at end of file +(defun style (say "Exactly. Oh well, at least one kindrid spirit around here anyway."))