alostscout1587674.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout1587674.lua
  3. Script Purpose : Waypoint Path for alostscout1587674.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:40
  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, 255.92, -6.51, 79.23, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 267.99, -6.16, 111.84, 2, 0)
  24. MovementLoopAddLocation(NPC, 268.45, -6.08, 114.75, 2, math.random(14, 28))
  25. MovementLoopAddLocation(NPC, 267.84, -6.25, 120.27, 2, 0)
  26. MovementLoopAddLocation(NPC, 266.01, -6.08, 125.18, 2, math.random(14, 28))
  27. MovementLoopAddLocation(NPC, 263.38, -6.82, 117.58, 2, 0)
  28. MovementLoopAddLocation(NPC, 259.79, -6.53, 92.73, 2, math.random(14, 28))
  29. MovementLoopAddLocation(NPC, 256.38, -6.3, 77.75, 2, 0)
  30. MovementLoopAddLocation(NPC, 255.53, -6.09, 70.8, 2, math.random(14, 28))
  31. MovementLoopAddLocation(NPC, 249.65, -6.81, 100.96, 2, math.random(14, 28))
  32. MovementLoopAddLocation(NPC, 244.45, -5.85, 121.32, 2, math.random(14, 28))
  33. MovementLoopAddLocation(NPC, 263.6, -6.83, 106.32, 2, math.random(14, 28))
  34. MovementLoopAddLocation(NPC, 249.81, -5.14, 127.92, 2, math.random(14, 28))
  35. end
  36. function casted_on(NPC, Spawn, Message)
  37. local Cleric = GetSpawn(NPC, 2530111)
  38. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  39. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  40. if newScout ~= nil then
  41. CopySpawnAppearance(newScout, NPC)
  42. SpawnSet(newScout, "visual_state", "0")
  43. SpawnSet(newScout, "attackable", "false")
  44. AddTimer(newScout, 5000, "Speak")
  45. end
  46. local mostHated = GetMostHated(NPC)
  47. if mostHated ~= nil and IsPlayer(mostHated) then
  48. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  49. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  50. end
  51. end
  52. Despawn(NPC)
  53. end
  54. end
  55. function aggro(NPC, Spawn)
  56. local chance = math.random(1, 100)
  57. if chance <= 50 then
  58. local choice = math.random(1, 2)
  59. if choice == 1 then
  60. 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)
  61. else
  62. 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)
  63. end
  64. end
  65. end