9
3

Thoroden.lua 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/Thoroden.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.14 04:06:22
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/ExpelNonCitizen.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. NonCitizen(NPC,Spawn)
  15. if GetFactionAmount(Spawn,11) >20000 then
  16. if math.random(1,100)<25 then
  17. FaceTarget(NPC, Spawn)
  18. local choice = MakeRandomInt(1,3)
  19. if choice == 1 then
  20. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gm_ebfceda5.mp3", "Greetings, citizen. I am on guard duty. Should you get into trouble, seek me out.", "attention", 1945337199, 2685949436, Spawn, 0)
  21. elseif choice == 2 then
  22. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gm_c865a827.mp3", "Duty above all else, citizen, except honor!", "scold", 4141262779, 4227030045, Spawn, 0)
  23. elseif choice == 3 then
  24. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gm_ee473c11.mp3", "Good day to you, citizen. All preserve Queen Antonia.", "salute", 2997871263, 2912813719, Spawn, 0)
  25. end
  26. end
  27. end
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. local choice = MakeRandomInt(1,4)
  32. if choice == 1 then
  33. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gm_ebfceda5.mp3", "Greetings, citizen. I am on guard duty. Should you get into trouble, seek me out.", "attention", 1945337199, 2685949436, Spawn, 0)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gm_c865a827.mp3", "Duty above all else, citizen, except honor!", "scold", 4141262779, 4227030045, Spawn, 0)
  36. elseif choice == 3 then
  37. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gm_76da37c9.mp3", "I hate working this shift! If the gnolls don't attack now, I may die of boredom.", "grumble", 4099618783, 4191002419, Spawn, 0)
  38. elseif choice == 4 then
  39. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gm_ee473c11.mp3", "Good day to you, citizen. All preserve Queen Antonia.", "salute", 2997871263, 2912813719, Spawn, 0)
  40. end
  41. end
  42. function respawn(NPC)
  43. spawn(NPC)
  44. end