9
3

alostscout433089.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout433089.lua
  3. Script Purpose : Waypoint Path for alostscout433089.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:17
  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.."_1024.mp3", "", "hello", 0, 0, Spawn)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function waypoints(NPC)
  22. MovementLoopAddLocation(NPC, 242.24, -6.97, 106.38, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 244.65, -7.22, 90.01, 2, math.random(14, 28))
  24. MovementLoopAddLocation(NPC, 243.37, -6.35, 116.19, 2, 0)
  25. MovementLoopAddLocation(NPC, 247.17, -6.13, 120.43, 2, 0)
  26. MovementLoopAddLocation(NPC, 263.4, -6.36, 122.58, 2, math.random(14, 28))
  27. MovementLoopAddLocation(NPC, 238.97, -6.43, 111.41, 2, 0)
  28. MovementLoopAddLocation(NPC, 236.25, -6.67, 109.33, 2, 0)
  29. MovementLoopAddLocation(NPC, 227.28, -6.15, 106.29, 2, math.random(14, 28))
  30. MovementLoopAddLocation(NPC, 244.64, -4.43, 63.82, 2, 0)
  31. MovementLoopAddLocation(NPC, 247, -4.46, 60.16, 2, 0)
  32. MovementLoopAddLocation(NPC, 255.99, -4.3, 35.58, 2, math.random(14, 28))
  33. MovementLoopAddLocation(NPC, 238.51, -6.76, 100.79, 2, math.random(14, 28))
  34. MovementLoopAddLocation(NPC, 239.54, -6.93, 95.39, 2, math.random(14, 28))
  35. MovementLoopAddLocation(NPC, 252.13, -6.72, 114.25, 2, math.random(14, 28))
  36. end
  37. function casted_on(NPC, Spawn, Message)
  38. local Cleric = GetSpawn(NPC, 2530111)
  39. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  40. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  41. if newScout ~= nil then
  42. CopySpawnAppearance(newScout, NPC)
  43. SpawnSet(newScout, "visual_state", "0")
  44. SpawnSet(newScout, "attackable", "false")
  45. AddTimer(newScout, 5000, "Speak")
  46. end
  47. local mostHated = GetMostHated(NPC)
  48. if mostHated ~= nil and IsPlayer(mostHated) then
  49. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  50. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  51. end
  52. end
  53. Despawn(NPC)
  54. end
  55. end
  56. function aggro(NPC, Spawn)
  57. local chance = math.random(1, 100)
  58. if chance <= 10 then
  59. local choice = math.random(1, 3)
  60. if choice == 1 then
  61. 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)
  62. elseif choice == 2 then
  63. 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)
  64. else
  65. 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)
  66. end
  67. end
  68. end