alostscout1587670.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. 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, 252.02, -6.82, 100.88, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 231.72, -6.33, 103.92, 2, math.random(14, 28))
  24. MovementLoopAddLocation(NPC, 245.77, -6.73, 111.75, 2, math.random(14, 28))
  25. MovementLoopAddLocation(NPC, 238.5, -6.76, 100.84, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 252.09, -6.75, 81.84, 2, math.random(14, 28))
  27. MovementLoopAddLocation(NPC, 244.83, -6.18, 119.17, 2, 0)
  28. MovementLoopAddLocation(NPC, 242.31, -5.07, 125.2, 2, math.random(14, 28))
  29. MovementLoopAddLocation(NPC, 263.27, -6.83, 116.91, 2, math.random(14, 28))
  30. end
  31. function casted_on(NPC, Spawn, Message)
  32. local Cleric = GetSpawn(NPC, 2530111)
  33. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  34. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  35. if newScout ~= nil then
  36. CopySpawnAppearance(newScout, NPC)
  37. SpawnSet(newScout, "visual_state", "0")
  38. SpawnSet(newScout, "attackable", "false")
  39. AddTimer(newScout, 5000, "Speak")
  40. end
  41. local mostHated = GetMostHated(NPC)
  42. if mostHated ~= nil and IsPlayer(mostHated) then
  43. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  44. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  45. end
  46. end
  47. Despawn(NPC)
  48. end
  49. end
  50. function aggro(NPC, Spawn)
  51. local chance = math.random(1, 100)
  52. if chance <= 50 then
  53. local choice = math.random(1, 3)
  54. if choice == 1 then
  55. 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)
  56. elseif choice == 2 then
  57. 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)
  58. else
  59. 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)
  60. end
  61. end
  62. end