alostscout1587671.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout1587671.lua
  3. Script Purpose : Waypoint Path for alostscout1587671.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:38
  6. Script Notes : Locations collected from Live
  7. --]]
  8. local JoiningTheForwardRanks = 163
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function waypoints(NPC)
  19. MovementLoopAddLocation(NPC, 258.39, -6.83, 117.19, 2, math.random(14, 28))
  20. MovementLoopAddLocation(NPC, 249.73, -6.42, 114.59, 2, math.random(14, 28))
  21. MovementLoopAddLocation(NPC, 247.31, -7.03, 100.77, 2, math.random(14, 28))
  22. MovementLoopAddLocation(NPC, 262.09, -6.43, 92.75, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 264, -6.44, 95.92, 2, 0)
  24. MovementLoopAddLocation(NPC, 268.31, -6.15, 117.21, 2, math.random(14, 28))
  25. MovementLoopAddLocation(NPC, 257.26, -6.83, 87.34, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 246.07, -6.66, 111.96, 2, math.random(14, 28))
  27. MovementLoopAddLocation(NPC, 248.46, -7.24, 90.23, 2, math.random(14, 28))
  28. MovementLoopAddLocation(NPC, 245.91, -6.38, 117.21, 2, math.random(14, 28))
  29. MovementLoopAddLocation(NPC, 250.97, -7.01, 95.44, 2, math.random(14, 28))
  30. MovementLoopAddLocation(NPC, 237.12, -6.05, 117.1, 2, math.random(14, 28))
  31. MovementLoopAddLocation(NPC, 237.03, -6.69, 110.39, 2, 0)
  32. MovementLoopAddLocation(NPC, 235, -6.54, 103.17, 2, 0)
  33. MovementLoopAddLocation(NPC, 232.87, -6.33, 100.01, 2, 0)
  34. MovementLoopAddLocation(NPC, 232.07, -6.32, 92.76, 2, math.random(14, 28))
  35. end
  36. function casted_on(NPC, Spawn, Message)
  37. local Cleric = GetSpawn(NPC, 2530111)
  38. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  39. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  40. if newScout ~= nil then
  41. CopySpawnAppearance(newScout, NPC)
  42. SpawnSet(newScout, "visual_state", "0")
  43. SpawnSet(newScout, "attackable", "false")
  44. AddTimer(newScout, 5000, "Speak")
  45. end
  46. local mostHated = GetMostHated(NPC)
  47. if mostHated ~= nil and IsPlayer(mostHated) then
  48. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  49. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  50. end
  51. end
  52. Despawn(NPC)
  53. end
  54. end
  55. function aggro(NPC, Spawn)
  56. local chance = math.random(1, 100)
  57. if chance <= 50 then
  58. local choice = math.random(1, 3)
  59. if choice == 1 then
  60. PlayFlavor(NPC, "voiceover/english/woodelf_base_1/ft/woodelf/woodelf_base_1_1_aggro_gf_e78cd055.mp3", "You covered your approach well, but it doesn't matter much now.", "", 2593953869, 4106947814, Spawn)
  61. elseif choice == 2 then
  62. PlayFlavor(NPC, "voiceover/english/woodelf_base_1/ft/woodelf/woodelf_base_1_1_aggro_gf_b9683a31.mp3", "Winds carried your voice long ago. I'm prepared now.", "", 1982146573, 3859905890, Spawn)
  63. else
  64. PlayFlavor(NPC, "voiceover/english/woodelf_base_1/ft/woodelf/woodelf_base_1_1_aggro_gf_8fcdd59.mp3", "You ruined your own lands, but you won't ruin these.", "", 2300111785, 2561177665, Spawn)
  65. end
  66. end
  67. end