123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- --[[
- Script Name : SpawnScripts/WayfarersRest/adistraughtbartender.lua
- Script Author : Dorbin
- Script Date : 2022.11.14 05:11:10
- Script Purpose :
- :
- --]]
- require "SpawnScripts/Generic/CombatModule"
- require "SpawnScripts/Generic/DialogModule"
- function hailed(NPC, Spawn)
- local zone = GetZone(NPC)
- local Darkelf = GetSpawnByLocationID(zone, 133780688)
- if IsAlive(Darkelf) then
- Dialog1(NPC, Spawn)
- else
- Dialog2(NPC, Spawn)
- end
- end
- function Dialog1(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("I don't know what happened! Suddenly all my regulars started tearing up the place!")
- PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn)
- Dialog.AddOption("I'm here to see what there is to be done.","BeDone")
- Dialog.AddOption("Perhaps a round of drinks will calm their nerves?","Round")
- Dialog.AddOption("This is my kind of party!","Boot")
- Dialog.AddOption("Well, good luck with all this.")
- Dialog.Start()
- end
- function BeDone(NPC,Spawn)
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("Something has got them all riled up. It happened so suddenly, perhaps its the ale or some sort of magic!")
- PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
- Dialog.AddOption("Anything else I should know?","SomethingElse")
- Dialog.AddOption("Perhaps a round of drinks will calm their nerves?","Round")
- Dialog.AddOption("This is my kind of party!","Boot")
- Dialog.AddOption("I'll see what I can do.")
- Dialog.Start()
- end
- function SomethingElse(NPC,Spawn)
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("Now that you mention it... I've heard someone cackling, but it sure isn't coming from someone I can see!")
- PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
- Dialog.AddOption("Perhaps a round of drinks will calm their nerves?","Round")
- Dialog.AddOption("This is my kind of party!","Boot")
- Dialog.AddOption("I'll see what I can do.")
- Dialog.Start()
- end
- function Round(NPC,Spawn)
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("I already tried that! They just threw the mugs at eachother. Please, you must do something!")
- PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
- Dialog.AddOption("I'm here to see what there is to be done.","BeDone")
- Dialog.AddOption("This is my kind of party!","Boot")
- Dialog.AddOption("Alright.")
- Dialog.Start()
- end
- function Boot(NPC,Spawn)
- SendPopUpMessage(Spawn,"You have been kicked out!",255,0,0)
- PlaySound(Spawn,"sounds/ui/ui_warning.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("Get out! NOW! I have no time for you!")
- PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
- Dialog.AddOption("Noo! I want to join the fun!")
- Dialog.Start()
- AddTimer(NPC,4000,"Kick",1,Spawn)
- end
- function Kick(NPC,Spawn)
- SQ = GetZone("SouthQeynos")
- Zone(SQ,Spawn,590.25, -17.22, 245.18, 10)
- end
- function Dialog2(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- PlayFlavor(NPC,"","Thank you for all your help! Now I just have to clean up this mess...","thanks",0,0)
- end
- function spawn(NPC, Spawn)
- combatModule(NPC, Spawn)
- AddTimer(NPC,MakeRandomInt(2000,5000),"EmoteLoop")
- end
- function EmoteLoop(NPC)
- local zone = GetZone(NPC)
- local Darkelf = GetSpawnByLocationID(zone, 133780688)
- if not IsAlive(Darkelf) then
- SpawnSet(NPC,"mood_state",0)
- SpawnSet(NPC,"name","a relieved bartender")
- choice = MakeRandomInt(1,5)
- if choice ==1 then
- PlayFlavor(NPC,"","","shame",0,0)
- elseif choice ==2 then
- PlayFlavor(NPC,"","","sigh",0,0)
- elseif choice ==3 then
- PlayFlavor(NPC,"","","agree",0,0)
- elseif choice ==4 then
- PlayFlavor(NPC,"","","thanks",0,0)
- elseif choice ==5 then
- PlayFlavor(NPC,"","","glare",0,0)
- end
- end
- AddTimer(NPC,7000,"EmoteLoop")
- end
- function respawn(NPC)
- spawn(NPC)
- end
|