9
3

alostscout1587672.lua 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout1587672.lua
  3. Script Purpose : Waypoint Path for alostscout1587672.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:55
  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. math.randomseed(os.time())
  15. voice = math.random (1,3)
  16. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1063.mp3", "", "hello", 0, 0, Spawn)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function waypoints(NPC)
  22. MovementLoopAddLocation(NPC, 239.64, -5.69, 68.34, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 239.83, -6.35, 72.16, 2, 0)
  24. MovementLoopAddLocation(NPC, 238.78, -6.51, 77.16, 2, 0)
  25. MovementLoopAddLocation(NPC, 239.68, -6.86, 87.27, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 248.4, -6.48, 112.53, 2, 0)
  27. MovementLoopAddLocation(NPC, 251.09, -5.49, 125.34, 2, math.random(14, 28))
  28. MovementLoopAddLocation(NPC, 247.84, -5.79, 123.56, 2, 0)
  29. MovementLoopAddLocation(NPC, 242.21, -6.23, 117.13, 2, math.random(14, 28))
  30. MovementLoopAddLocation(NPC, 256.14, -6.83, 98.22, 2, math.random(14, 28))
  31. MovementLoopAddLocation(NPC, 231.79, -6.33, 106.39, 2, math.random(14, 28))
  32. MovementLoopAddLocation(NPC, 246.94, -6.97, 82.35, 2, math.random(14, 28))
  33. MovementLoopAddLocation(NPC, 264.78, -6.52, 98.25, 2, math.random(14, 28))
  34. MovementLoopAddLocation(NPC, 244.72, -5.27, 125.24, 2, math.random(14, 28))
  35. MovementLoopAddLocation(NPC, 262.13, -6.78, 98.24, 2, math.random(14, 28))
  36. MovementLoopAddLocation(NPC, 235.95, -6.65, 89.92, 2, math.random(14, 28))
  37. MovementLoopAddLocation(NPC, 239.83, -6.35, 72.44, 2, 0)
  38. end
  39. function casted_on(NPC, Spawn, Message)
  40. local Cleric = GetSpawn(NPC, 2530111)
  41. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  42. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  43. if newScout ~= nil then
  44. CopySpawnAppearance(newScout, NPC)
  45. SpawnSet(newScout, "visual_state", "0")
  46. SpawnSet(newScout, "attackable", "false")
  47. AddTimer(newScout, 5000, "Speak")
  48. end
  49. local mostHated = GetMostHated(NPC)
  50. if mostHated ~= nil and IsPlayer(mostHated) then
  51. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  52. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  53. end
  54. end
  55. Despawn(NPC)
  56. end
  57. end
  58. function aggro(NPC, Spawn)
  59. local chance = math.random(1, 100)
  60. if chance <= 50 then
  61. local choice = math.random(1, 3)
  62. if choice == 1 then
  63. 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)
  64. elseif choice == 2 then
  65. 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)
  66. else
  67. 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)
  68. end
  69. end
  70. end