alostscout433155.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout433155.lua
  3. Script Purpose : Waypoint Path for alostscout433155.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, 255.88, -4.57, 63.03, 2, math.random(14, 28))
  20. MovementLoopAddLocation(NPC, 248.45, -6.62, 73.89, 2, math.random(14, 28))
  21. MovementLoopAddLocation(NPC, 232.39, -6.32, 92.67, 2, math.random(14, 28))
  22. MovementLoopAddLocation(NPC, 261.02, -6.43, 92.71, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 245.86, -7.23, 92.69, 2, math.random(14, 28))
  24. MovementLoopAddLocation(NPC, 245.98, -7.06, 87.3, 2, math.random(14, 28))
  25. MovementLoopAddLocation(NPC, 254.7, -6.15, 71.17, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 255.68, -6.41, 75.43, 2, 0)
  27. MovementLoopAddLocation(NPC, 254.66, -6.83, 98.58, 2, math.random(14, 28))
  28. MovementLoopAddLocation(NPC, 249.6, -5.79, 122.85, 2, math.random(14, 28))
  29. MovementLoopAddLocation(NPC, 241.2, -6.88, 87.35, 2, math.random(14, 28))
  30. MovementLoopAddLocation(NPC, 248.47, -6.99, 84.59, 2, math.random(14, 28))
  31. end
  32. function casted_on(NPC, Spawn, Message)
  33. local Cleric = GetSpawn(NPC, 2530111)
  34. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  35. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  36. if newScout ~= nil then
  37. CopySpawnAppearance(newScout, NPC)
  38. SpawnSet(newScout, "visual_state", "0")
  39. SpawnSet(newScout, "attackable", "false")
  40. AddTimer(newScout, 5000, "Speak")
  41. end
  42. local mostHated = GetMostHated(NPC)
  43. if mostHated ~= nil and IsPlayer(mostHated) then
  44. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  45. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  46. end
  47. end
  48. Despawn(NPC)
  49. end
  50. end
  51. function aggro(NPC, Spawn)
  52. local chance = math.random(1, 100)
  53. if chance <= 10 then
  54. local choice = math.random(1, 3)
  55. if choice == 1 then
  56. 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)
  57. elseif choice == 2 then
  58. 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)
  59. else
  60. 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)
  61. end
  62. end
  63. end