Quigley.lua 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Quigley.lua
  3. Script Author : Dorbin
  4. Script Date : 05/11/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 5, "InRange", "LeaveRange")
  10. end
  11. function InRange(NPC, Spawn)
  12. if GetFactionAmount(Spawn,11)<0 then
  13. FaceTarget(NPC, Spawn)
  14. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  15. else
  16. local chance = math.random(0, 100)
  17. if chance <= 33 then
  18. hailed(NPC, Spawn)
  19. end
  20. end
  21. end
  22. function hailed(NPC, Spawn)
  23. FaceTarget(NPC, Spawn)
  24. local choice = math.random(1, 4)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "voiceover/english/halfelf_eco_good_1/ft/service/bartender/halfelf_bartender_service_good_1_hail_gf_ce1f039f.mp3", "Might I interest you in some meat and cheese to go with that tall glass of ale?", "shrug", 3345899068, 3251734592, Spawn)
  27. elseif choice == 2 then
  28. PlayFlavor(NPC, "voiceover/english/halfelf_eco_good_1/ft/service/bartender/halfelf_bartender_service_good_1_hail_gf_41d55b0d.mp3", "The best part about this job is all the extra coin I get.", "wink", 3789765642, 1946956397, Spawn)
  29. elseif choice == 3 then
  30. PlayFlavor(NPC, "voiceover/english/halfelf_eco_good_1/ft/service/bartender/halfelf_bartender_service_good_1_hail_gf_ce733912.mp3", "I bet you have some stories, eh? Adventuring must be an exciting life!", "smile", 1178661573, 1894551598, Spawn)
  31. elseif choice == 4 then
  32. PlayFlavor(NPC, "voiceover/english/halfelf_eco_good_1/ft/service/bartender/halfelf_bartender_service_good_1_hail_gf_201b6d6a.mp3", "What can I get for ya?", "nod", 2190631918, 1997401965, Spawn)
  33. end
  34. end
  35. function respawn(NPC)
  36. spawn(NPC)
  37. end