alostscout1587675.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout1587675.lua
  3. Script Purpose : Waypoint Path for alostscout1587675.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:47
  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, 241.86, -6.9, 87.35, 2, math.random(14, 28))
  20. MovementLoopAddLocation(NPC, 269.78, -6.02, 103.79, 2, math.random(14, 28))
  21. MovementLoopAddLocation(NPC, 240.82, -6.95, 103.57, 2, math.random(14, 28))
  22. MovementLoopAddLocation(NPC, 244.81, -6.57, 114.36, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 257.27, -6.83, 103.49, 2, math.random(14, 28))
  24. MovementLoopAddLocation(NPC, 253.19, -6.83, 101.66, 2, 0)
  25. MovementLoopAddLocation(NPC, 233.5, -6.26, 82.13, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 253.93, -6.83, 110.93, 2, math.random(14, 28))
  27. MovementLoopAddLocation(NPC, 270.93, -5.69, 106.52, 2, math.random(14, 28))
  28. MovementLoopAddLocation(NPC, 256.6, -6.58, 82.51, 2, 0)
  29. MovementLoopAddLocation(NPC, 253.42, -6.08, 70.88, 2, math.random(14, 28))
  30. MovementLoopAddLocation(NPC, 248.4, -6.8, 103.48, 2, math.random(14, 28))
  31. MovementLoopAddLocation(NPC, 243.34, -7.22, 98.12, 2, math.random(14, 28))
  32. MovementLoopAddLocation(NPC, 251.08, -6.1, 120.35, 2, math.random(14, 28))
  33. end
  34. function casted_on(NPC, Spawn, Message)
  35. local Cleric = GetSpawn(NPC, 2530111)
  36. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  37. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  38. if newScout ~= nil then
  39. CopySpawnAppearance(newScout, NPC)
  40. SpawnSet(newScout, "visual_state", "0")
  41. SpawnSet(newScout, "attackable", "false")
  42. AddTimer(newScout, 5000, "Speak")
  43. end
  44. local mostHated = GetMostHated(NPC)
  45. if mostHated ~= nil and IsPlayer(mostHated) then
  46. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  47. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  48. end
  49. end
  50. Despawn(NPC)
  51. end
  52. end
  53. function aggro(NPC, Spawn)
  54. local chance = math.random(1, 100)
  55. if chance <= 50 then
  56. local choice = math.random(1, 2)
  57. if choice == 1 then
  58. PlayFlavor(NPC, "voiceover/english/froglok_base_1/ft/froglok/froglok_base_1_1_aggro_gm_12dbb8ad.mp3", "Caught thee red handed, did I?", "", 2731512393, 911400384)
  59. else
  60. PlayFlavor(NPC, "voiceover/english/froglok_base_1/ft/froglok/froglok_base_1_1_aggro_gm_ad1fc682.mp3", "Looks as if I'll get my workout today.", 1559839053, 2456776330)
  61. end
  62. end
  63. end