'AIClickEvent': # # This is run from the on click action in the assignment script. Naming the # subscripts after the Pathfind.Status vaules allows us to run exactly what we # need without any if blocks... which can be long. # # - define status # - inject s@AIClickEvent p: # type: task script: - chat "I<&sq>ll figure out what to put here later..." Wandering: - flag npc Pathfind.Status:Talking - flag npc WorkingSet:! - flag npc WorkingSet:|:|talk| - run s@AvailableClickDialogue Walking: - flag npc Pathfind.Status:Talking - flag npc WorkingSet:! - flag npc WorkingSet:|:|talk| - run s@AvailableClickDialogue Following: - run s@FollowClickDialogue Leading: - run s@LeadDialogue p:Click Thinking: - chat "I<&sq>m Thinking about where to walk to..." no_target Lost: - chat "I seem to be quite lost..." no_target Fighting: - chat "I<&sq>m a little busy right now... trying not to die and all..." no_target - chat "Maybe someday I<&sq>ll learn how to ask for help..." no_target Talking: # Some clean up... If a player logs out while talking to an NPC they might get # stuck. This will clean up when someone clicks on the NPC. # - define workingSet - define player - define task - define previousStatus - if ]> queue clear - if { - run s@ToggleChatListener p:off - chat "Wow... I spaced out there for a minute." no_target - chat "Thanks for snapping me out of it ." no_target - inject s@PathfindResumeActivity - flag npc WorkingSet:! } else if ]> { - look duration:2s - if { - random { - chat "Can<&sq>t you see I<&sq>m talking to ." no_target - chat "I<&sq>m busy right now ." no_target - chat "Oh hi there ." no_target } } else { - run s@ToggleChatListener p:off - chat "Where in the fuzz did go!?!" no_target - chat "He was just here a minute ago..." no_target - chat "Whatev<&sq>s back to what I was doing." no_target - inject s@PathfindResumeActivity - flag npc WorkingSet:! } } 'AITalkingProximityEvents': type: task script: - chat "I<&sq>ll figure out what to put here later..." exit_follow: - run s@ToggleChatListener p:off - inject s@AIAvailableProximityEvents p:NegativeChat instantly - inject s@PathfindResumeActivity - flag npc WorkingSet:! exit_lead: - run s@ToggleChatListener p:off - run s@LeadDialogue p:DeclineLead - inject s@PathfindResumeActivity - flag npc WorkingSet:! exit_leadChooseDestination: - run s@ToggleChatListener p:off - run s@LeadDialogue p:DeclineLead - inject s@PathfindResumeActivity - flag npc WorkingSet:! exit_burn: - chat "Don<&sq>t just leave me !" no_target 'AvailableClickDialogue': type: task debug: false script: - ^define workingSet - ^define player - ^define task - ^define previousStatus - ^flag npc WorkingSet:! - ^flag npc WeightedRandomChoice:55/GeneralChat|20/follow|20/lead|5/burn - ^inject s@WeightedRandomChoice instantly - ^inject s@AvailableClickDialogue p: - ^flag npc WeightedRandomChoice:! GeneralChat: - ^inject s@AIAvailableProximityEvents p:GeneralChat instantly - ^flag npc Pathfind.Status: follow: - ^inject s@PathfindPauseActivity instantly - ^walk radius:5 - ^flag npc WorkingSet:|:|follow| - ^inject s@FollowQuestionDialogue lead: - ^inject s@PathfindPauseActivity instantly - ^walk radius:5 - ^flag npc WorkingSet:|:|lead| - ^inject s@LeadDialogue p:FirstQuestion burn: - ^inject s@PathfindPauseActivity instantly - ^flag npc WorkingSet:|:|burn| - ^inject s@SpontaneousCombustion - ^inject s@PathfindResumeActivity instantly - ^flag npc WorkingSet:! error: - ^announce "something went horribly wrong" - ^inject s@PathfindPauseActivity instantly - ^flag npc WorkingSet:|:|burn| - ^inject s@SpontaneousCombustion - ^inject s@PathfindResumeActivity instantly - ^flag npc WorkingSet:! 'AITalkingChatEvents': # This is split into subscipts and called from the on chat action # - inject s@AITalkingChatEvents p: # # This removes a potential giant if block and allows us to only execute the # script we need since the task is already known in the chat event # type: task debug: false script: - chat "I<&sq>ll figure out what to put here later..." follow: - if { - if { - queue queue:_fidgetQueue stop - queue queue:_WanderTask_Queue stop } - run s@ToggleChatListener p:off - flag npc Pathfind.Follow.StartingLocation: - flag npc Pathfind.Follow.StartTime: - run s@PathfindFollowTask id:_PathfindFollowTask_Queue delay:10t - run s@FollowClickDialogue delay:20t } else { - run s@ToggleChatListener p:off - run s@AIAvailableProximityEvents p:NegativeChat delay:10t - inject s@PathfindResumeActivity instantly - flag npc WorkingSet:! } lead: - if { - flag npc WorkingSet:! - flag npc WorkingSet:|:|leadChooseDestination| - run s@LeadDialogue p:ChooseDestination delay:10t } else { - run s@ToggleChatListener p:off - run s@LeadDialogue p:DeclineLead delay:10t - inject s@PathfindResumeActivity instantly - flag npc WorkingSet:! } leadChooseDestination: - define world '>' - define town '>' - if ]> { - if { - queue queue:_fidgetQueue stop - queue queue:_WanderTask_Queue stop } - run s@ToggleChatListener p:off - flag npc WorkingSet:! - flag npc WorkingSet:|:|leading| - flag npc Pathfind.Status:Leading - flag npc Pathfind.DestinationName: - run s@PathfindLead id:_PathfindLead_Queue delay:10t - run s@LeadDialogue p:Click delay:20t } else { - run s@ToggleChatListener p:off - run s@LeadDialogue p:UnknownDestination def: delay:20t - inject s@PathfindResumeActivity instantly - flag npc WorkingSet:! } 'AIAvailableProximityEvents': # # Some chat for proximity enter events # Will use categories of topics that can be choosen from based on whatevs. # type: task script: - chat "A script to have NPCs say things to players as they walk by." enter: - if queue clear - if .ProximityEntryCooldown]> queue clear - flag player AI.Global.ChatCooldown duration:15s - flag player AI..ProximityEntryCooldown duration:30s - if { - flag npc WeightedRandomChoice:35/CitizenGreetings|35/GeneralChat|30/Tips } else { - flag npc WeightedRandomChoice:35/TouristGreetings|35/GeneralChat|30/Tips } - inject s@WeightedRandomChoice instantly - flag npc WeightedRandomChoice:! - if ! define player - inject s@AIAvailableProximityEvents p: exit: - if queue clear - if .ProximityExitCooldown]> queue clear - flag player AI.Global.ChatCooldown duration:15s - flag player AI..ProximityExitCooldown duration:30s - if { - flag npc WeightedRandomChoice:35/CitizenFarewell|35/GeneralChat|30/Tips } else { - flag npc WeightedRandomChoice:35/TouristFarewell|35/GeneralChat|30/Tips } - inject s@WeightedRandomChoice instantly - flag npc WeightedRandomChoice:! - inject s@AIAvailableProximityEvents p: GeneralChat: - look duration:2s - if ! define player - random { - chat "Hey , I<&sq>m just ]:walking to the || wandering around the >." no_target - chat "We<&sq>re off to see the Wizard..." no_target - chat "It<&sq>s a ]:horrid || lovely> ]:night || day> isn<&sq>t it?" no_target - chat "]:Good day fellow Citizen! || Ugh, another Tourist...>" - chat "You<&sq>re supposed to breed your animals, not mate with them..." no_target - chat "How much wood could a woodchuck chuck... I wonder" no_target - chat "Oh my god... that was the ugliest baby I<&sq>ve ever seen." no_target - chat "Why do people keep clicking on me..." no_target - chat "I shouldn<&sq>t have eaten that fourth burrito..." no_target - chat "Why do people keep clicking on me..." no_target - chat "I wasn<&sq>t scared! I was singing! I was singing my scream song. Wooaah! Wooaaooh!" no_target - chat "I keep finding baby shoes. What the heck, man? And they<&sq>re all lefties!" no_target - chat "Hey! Crack open that book and read something for fun<&sq>s sake, alright?" no_target - chat ", House-hunting is wiiiild! You<&sq>ve got to try it." no_target - chat "I<&sq>d rather be dancin<&sq> with some babes!" no_target - chat "My subconscious must be hungry, huh?" no_target - chat "You guys are so cute, I could just maul you to death." no_target - chat "I can<&sq>t have you messin<&sq> up my bread and butter, dude." no_target - chat "I<&sq>ll kill you and raise your children as my own!" no_target - chat "I<&sq>m not cute, I<&sq>ll mess you up..." no_target - chat "Bad computer! No! No! Go sit in the corner, and think about your life." no_target - chat "Girl, you smell good. Did you take a bath in rainbows and cupcakes?" no_target - chat "If I had a penny for every time someone went crazy, hopped up and magic energy... I<&sq>d be Abraham Lincoln." no_target - chat "It<&sq>s probably a computal gleetch." no_target - chat "They<&sq>re trying to peel me! I<&sq>m... not... a... banana!" no_target - chat "Oh, I<&sq>m coming with you... if only to be disruptive and obnoxious! " no_target - chat "I<&sq>m puttin<&sq> an end to all this craziness with my Pick-Axe Hand." no_target - chat "Bad biscuits make the baker broke, bro." no_target - chat "Your constant harassment of the female gender makes me siiick" no_target - chat "I dreamed I was in kindergarten again, but I had really big feet, and was also the teacher." no_target - chat "Don<&sq>t let the dragon drag on." no_target - chat "Being crazy is hard. You<&sq>re getting all hung up, all hung up on imaginary problems. You gotta focus on what<&sq>s real, man." no_target - chat "Dude, don<&sq>t make me feel any more awkward than I already do!" no_target } CitizenGreetings: - if ! define player - random { - chat "Hello there Citizen!" no_target - chat "Hey what<&sq>s going on there ?" no_target - chat "Oh hey there ." no_target - chat "How are you ?" no_target - chat "Hey , I forgot to tell you..." no_target - chat "How<&sq>s work ?" no_target - chat "Good ]:evening || day> ." no_target } TouristGreetings: - if ! define player - random { - chat "Hello there <&6><&f>!" no_target - chat "Oh, you are new <&6><&f>." no_target - chat "<&6><&f><&co> Have you read the <&e>/help" no_target - chat "I haven<&sq>t seen you around before." no_target - chat "I like to walk places. You can see a list of interesting destinations by typing <&e>/destination list" no_target - chat "Check out the <&e>/destination<&f> command." no_target - chat "<&6><&f><&co> Have you read <&e>/help rules" no_target - chat "<&6><&f><&co> You need to find Betty. She<&sq>ll rank you up to <&a>Citizen" no_target - chat "You can find Betty in the Municipal Building. That<&sq>s the quartz skyscraper in the center of town." no_target - chat "You won<&sq>t earn much as a Tourist. You need to find Betty to become a Citizen." no_target } CitizenFarewell: - if ! define player - random { - chat "Farewell Citizen!" no_target - chat "Let<&sq>s do lunch sometime ." no_target - chat "See you later !" no_target - chat "Take care ." no_target - chat "Stay safe out there ." no_target - chat "Yeah sure... ignore me..." no_target - chat "Oh my... something really smells." no_target - chat "I think just made a stinky." no_target } TouristFarewell: - if ! define player - random { - chat "Farewell Tourist!" no_target - chat "I hope to see you again <&6><&f>!" no_target - chat "Don<&sq>t forget to find Betty in the Municipal building <&6><&f>." no_target - chat "Make sure you see Betty in the Municipal building before you head out of the city." no_target - chat "We can show you around if you need some help <&6><&f>." no_target - chat "Stay safe out there <&6><&f>." no_target - chat "I<&sq>ll see you around sometime <&6><&f>." no_target } Tips: - if ! define player - random { - chat "I will tell you some valuable secrets!" no_target - chat "You can type <&e>/jobs stats<&f> to see your levels." no_target - chat "There is a lot of information in the <&e>/help<&f> files." no_target - chat "There is a way into the cemetery. You just have to know where to look." no_target } NegativeChat: - ^define workingSet - ^define player - ^define task - ^define previousStatus - look duration:2s - wait 10t - random { - chat "Oh, ok then..." no_target - chat "That<&sq>s not very nice of you ." no_target - chat "I was hoping you would be more helpful." no_target - chat "Of course... The great and mighty doesn't have time to help ol<&sq> ." no_target - chat "That<&sq>s fine. I was only asking so you would finally leave me alone." no_target - chat "Whatev<&sq>s... I only wanted to laugh while watching you fail." no_target }