9
3

GuardKaladenth.lua 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --[[
  2. Script Name : SpawnScripts/ElddarGrove/GuardKaladenth.lua
  3. Script Purpose : Guard Kaladenth <Guard>
  4. Script Author : John Adams
  5. Script Date : 2008.09.28
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  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. waypoints(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if GetFactionAmount(Spawn, 11) <0 then
  20. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  21. else
  22. choice = math.random(1,2)
  23. if choice == 1 then
  24. PlayFlavor(NPC, "voiceover/english/highelf_eco_good_1/ft/service/guard/highelf_guard_service_good_1_hail_gm_ebfceda5.mp3", "Greetings, citizen. I am on guard duty. Should you get into trouble, seek me out.", "attention", 3027655540, 4120709915, Spawn)
  25. elseif choice == 2 then
  26. PlayFlavor(NPC, "voiceover/english/highelf_eco_good_1/ft/service/guard/highelf_guard_service_good_1_hail_gm_c865a827.mp3", "Duty above all else, citizen, except honor!", "scold", 739074204, 2925833259, Spawn)
  27. else
  28. end
  29. end
  30. end
  31. function waypoints(NPC)
  32. MovementLoopAddLocation(NPC, 594.35, -21.42, -257.29, 2, 5)
  33. MovementLoopAddLocation(NPC, 580.75, -20.84, -259, 2, 0)
  34. MovementLoopAddLocation(NPC, 553.51, -20.04, -277.93, 2, 0)
  35. MovementLoopAddLocation(NPC, 518.75, -20.64, -286.51, 2, 0)
  36. MovementLoopAddLocation(NPC, 550.5, -21.45, -311.58, 2, 0)
  37. MovementLoopAddLocation(NPC, 545.01, -21.17, -325.85, 2, 0)
  38. MovementLoopAddLocation(NPC, 530.36, -21.04, -314.28, 2, 0)
  39. MovementLoopAddLocation(NPC, 520.82, -20.75, -290.82, 2, 0)
  40. MovementLoopAddLocation(NPC, 538.52, -20.27, -282.51, 2, 0)
  41. MovementLoopAddLocation(NPC, 550.93, -20.18, -281.09, 2, 0)
  42. MovementLoopAddLocation(NPC, 555.04, -20.01, -277.3, 2, 0)
  43. MovementLoopAddLocation(NPC, 574.43, -20.55, -266.52, 2, 0)
  44. MovementLoopAddLocation(NPC, 584.22, -20.78, -258.42, 2, 0)
  45. MovementLoopAddLocation(NPC, 594.35, -21.42, -257.29, 2, 5)
  46. end