12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- --[[
- Script Name : SpawnScripts/WayfarersRest/afrightenedbarmaid.lua
- Script Author : Dorbin
- Script Date : 2022.11.14 05:11:39
- Script Purpose :
- :
- --]]
- require "SpawnScripts/Generic/CombatModule"
- 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 barmaid")
- 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,"","","scold",0,0)
- end
- end
- AddTimer(NPC,7000,"EmoteLoop")
- end
- function respawn(NPC)
- spawn(NPC)
- end
- 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)
- choice = MakeRandomInt(1,6)
- if choice ==1 then
- PlayFlavor(NPC,"","Please! Don't hurt me!","squeal",0,0,Spawn)
- elseif choice ==2 then
- PlayFlavor(NPC,"","I don't know what happened! Everyone just started acting all crazy!","wince",0,0,Spawn)
- elseif choice ==3 then
- PlayFlavor(NPC,"","I hear strange laughing coming from the near supplies... and it's not from one of this lot!","listen",0,0,Spawn)
- elseif choice ==4 then
- PlayFlavor(NPC,"","Not in the face! Please!","cringe",0,0,Spawn)
- elseif choice ==5 then
- PlayFlavor(NPC,"","Save me from this madness!","beg",0,0,Spawn)
- elseif choice ==6 then
- PlayFlavor(NPC,"","I heard something from behind the crates a moment ago...","listen",0,0,Spawn)
- end
- end
- function Dialog2(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- PlayFlavor(NPC,"","Thank the gods you came along! I thought I was destined for the grave.","thanks",0,0)
- end
|