9
3

alostscout1587673.lua 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout1587673.lua
  3. Script Purpose : Waypoint Path for alostscout1587673.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:38
  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.."_1016.mp3", "", "hello", 0, 0, Spawn)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function waypoints(NPC)
  22. MovementLoopAddLocation(NPC, 249.69, -7.13, 90.12, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 236.96, -6.75, 103, 2, math.random(14, 28))
  24. MovementLoopAddLocation(NPC, 253.48, -6.83, 114.37, 2, math.random(14, 28))
  25. MovementLoopAddLocation(NPC, 235.95, -6.62, 81.99, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 242.95, -6.04, 71.75, 2, 0)
  27. MovementLoopAddLocation(NPC, 251.16, -4.44, 63.28, 2, math.random(14, 28))
  28. MovementLoopAddLocation(NPC, 259.82, -6.71, 95.32, 2, 0)
  29. MovementLoopAddLocation(NPC, 263.82, -6.83, 103.63, 2, 0)
  30. MovementLoopAddLocation(NPC, 267.3, -6.36, 117.07, 2, 0)
  31. MovementLoopAddLocation(NPC, 267.24, -6.37, 119.68, 2, math.random(14, 28))
  32. MovementLoopAddLocation(NPC, 267.12, -6.39, 116.95, 2, 0)
  33. MovementLoopAddLocation(NPC, 263.42, -6.83, 109.83, 2, math.random(14, 28))
  34. MovementLoopAddLocation(NPC, 254.81, -6.83, 110.92, 2, 0)
  35. MovementLoopAddLocation(NPC, 243.31, -6.97, 108.92, 2, math.random(14, 28))
  36. MovementLoopAddLocation(NPC, 263.86, -6, 127.71, 2, 0)
  37. MovementLoopAddLocation(NPC, 268.44, -6.3, 130.65, 2, math.random(14, 28))
  38. MovementLoopAddLocation(NPC, 254.59, -6, 125.44, 2, 0)
  39. MovementLoopAddLocation(NPC, 251.4, -5.88, 123.91, 2, 0)
  40. MovementLoopAddLocation(NPC, 247.09, -5.94, 122.34, 2, math.random(14, 28))
  41. end
  42. function casted_on(NPC, Spawn, Message)
  43. local Cleric = GetSpawn(NPC, 2530111)
  44. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  45. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  46. if newScout ~= nil then
  47. CopySpawnAppearance(newScout, NPC)
  48. SpawnSet(newScout, "visual_state", "0")
  49. SpawnSet(newScout, "attackable", "false")
  50. AddTimer(newScout, 5000, "Speak")
  51. end
  52. local mostHated = GetMostHated(NPC)
  53. if mostHated ~= nil and IsPlayer(mostHated) then
  54. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  55. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  56. end
  57. end
  58. Despawn(NPC)
  59. end
  60. end
  61. function aggro(NPC, Spawn)
  62. local chance = math.random(1, 100)
  63. if chance <= 50 then
  64. local choice = math.random(1, 2)
  65. if choice == 1 then
  66. 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)
  67. else
  68. 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)
  69. end
  70. end
  71. end