alostscout433130.lua 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout433130.lua
  3. Script Purpose : Waypoint Path for alostscout433130.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. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function waypoints(NPC)
  19. MovementLoopAddLocation(NPC, 266.07, -6.4, 122.6, 2, math.random(14, 28))
  20. MovementLoopAddLocation(NPC, 248.41, -6.56, 111.8, 2, math.random(14, 28))
  21. MovementLoopAddLocation(NPC, 248.32, -6.1, 117.88, 2, 0)
  22. MovementLoopAddLocation(NPC, 249.49, -5.8, 122.57, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 246.44, -5.71, 123.33, 2, 0)
  24. MovementLoopAddLocation(NPC, 236.65, -6, 121.14, 2, 0)
  25. MovementLoopAddLocation(NPC, 233.2, -6, 119.19, 2, 0)
  26. MovementLoopAddLocation(NPC, 230.79, -6, 119.16, 2, math.random(14, 28))
  27. MovementLoopAddLocation(NPC, 234.62, -6.5, 109.27, 2, 0)
  28. MovementLoopAddLocation(NPC, 237.2, -6.76, 106.31, 2, math.random(14, 28))
  29. MovementLoopAddLocation(NPC, 242.25, -7.15, 95.51, 2, math.random(14, 28))
  30. MovementLoopAddLocation(NPC, 247.27, -6.98, 84.71, 2, math.random(14, 28))
  31. MovementLoopAddLocation(NPC, 253.37, -6.81, 84.79, 2, math.random(14, 28))
  32. MovementLoopAddLocation(NPC, 262.26, -6.83, 111.44, 2, 0)
  33. MovementLoopAddLocation(NPC, 263.16, -6.83, 117.1, 2, 0)
  34. MovementLoopAddLocation(NPC, 264.4, -6.59, 120.34, 2, 0)
  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 <= 10 then
  58. local choice = math.random(1, 3)
  59. if choice == 1 then
  60. PlayFlavor(NPC, "voiceover/english/halfling_base_1/ft/halfling/halfling_base_1_1_aggro_gm_2f9edb08.mp3", "You'll never get the drop on a halfling!", "", 252597960, 759690529, Spawn)
  61. elseif choice == 2 then
  62. PlayFlavor(NPC, "voiceover/english/halfling_base_1/ft/halfling/halfling_base_1_1_aggro_gm_7434777c.mp3", "Help! Intruders! Someone get the guard!", "", 2664487555, 1568864156, Spawn)
  63. else
  64. PlayFlavor(NPC, "voiceover/english/halfling_base_1/ft/halfling/halfling_base_1_1_aggro_gm_7b251faa.mp3", "Try to sneak into my home, will ya!", "", 100218096, 392363658, Spawn)
  65. end
  66. end
  67. end