alostscout1587669.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout1587669.lua
  3. Script Purpose : Waypoint Path for alostscout1587669.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:23
  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, 229.68, -6.32, 101.19, 2, math.random(14, 28))
  20. MovementLoopAddLocation(NPC, 234.61, -6, 119.93, 2, math.random(14, 28))
  21. MovementLoopAddLocation(NPC, 233.99, -6.43, 107.3, 2, 0)
  22. MovementLoopAddLocation(NPC, 235.92, -6.64, 103.69, 2, 0)
  23. MovementLoopAddLocation(NPC, 258.58, -6.84, 95.57, 2, math.random(14, 28))
  24. MovementLoopAddLocation(NPC, 260.2, -6.51, 91.86, 2, math.random(14, 28))
  25. MovementLoopAddLocation(NPC, 247.19, -7.24, 95.51, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 254.55, -6.83, 106.51, 2, 0)
  27. MovementLoopAddLocation(NPC, 263.7, -6.83, 109.2, 2, math.random(14, 28))
  28. MovementLoopAddLocation(NPC, 271.43, -5.61, 106.22, 2, math.random(14, 28))
  29. end
  30. function casted_on(NPC, Spawn, Message)
  31. local Cleric = GetSpawn(NPC, 2530111)
  32. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  33. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  34. if newScout ~= nil then
  35. CopySpawnAppearance(newScout, NPC)
  36. SpawnSet(newScout, "visual_state", "0")
  37. SpawnSet(newScout, "attackable", "false")
  38. AddTimer(newScout, 5000, "Speak")
  39. end
  40. local mostHated = GetMostHated(NPC)
  41. if mostHated ~= nil and IsPlayer(mostHated) then
  42. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  43. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  44. end
  45. end
  46. Despawn(NPC)
  47. end
  48. end
  49. function aggro(NPC, Spawn)
  50. local chance = math.random(1, 100)
  51. if chance <= 50 then
  52. local choice = math.random(1, 3)
  53. if choice == 1 then
  54. 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)
  55. elseif choice == 2 then
  56. 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)
  57. else
  58. 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)
  59. end
  60. end
  61. end