alostscout1587670.lua 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout1587670.lua
  3. Script Purpose : Waypoint Path for alostscout1587670.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:28
  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, 252.02, -6.82, 100.88, 2, math.random(14, 28))
  20. MovementLoopAddLocation(NPC, 231.72, -6.33, 103.92, 2, math.random(14, 28))
  21. MovementLoopAddLocation(NPC, 245.77, -6.73, 111.75, 2, math.random(14, 28))
  22. MovementLoopAddLocation(NPC, 238.5, -6.76, 100.84, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 252.09, -6.75, 81.84, 2, math.random(14, 28))
  24. MovementLoopAddLocation(NPC, 244.83, -6.18, 119.17, 2, 0)
  25. MovementLoopAddLocation(NPC, 242.31, -5.07, 125.2, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 263.27, -6.83, 116.91, 2, math.random(14, 28))
  27. end
  28. function casted_on(NPC, Spawn, Message)
  29. local Cleric = GetSpawn(NPC, 2530111)
  30. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  31. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  32. if newScout ~= nil then
  33. CopySpawnAppearance(newScout, NPC)
  34. SpawnSet(newScout, "visual_state", "0")
  35. SpawnSet(newScout, "attackable", "false")
  36. AddTimer(newScout, 5000, "Speak")
  37. end
  38. local mostHated = GetMostHated(NPC)
  39. if mostHated ~= nil and IsPlayer(mostHated) then
  40. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  41. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  42. end
  43. end
  44. Despawn(NPC)
  45. end
  46. end
  47. function aggro(NPC, Spawn)
  48. local chance = math.random(1, 100)
  49. if chance <= 50 then
  50. local choice = math.random(1, 3)
  51. if choice == 1 then
  52. 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)
  53. elseif choice == 2 then
  54. 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)
  55. else
  56. 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)
  57. end
  58. end
  59. end