alostscout433112.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/alostscout433112.lua
  3. Script Purpose : Waypoint Path for alostscout433112.lua
  4. Script Author : Jabantiz (movement by Rylec)
  5. Script Date : 06-01-2020 10:07:20
  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, 234.61, -6.5, 106.29, 2, math.random(14, 28))
  23. MovementLoopAddLocation(NPC, 233.32, -6.37, 101.36, 2, 0)
  24. MovementLoopAddLocation(NPC, 233.37, -6.37, 98.12, 2, math.random(14, 28))
  25. MovementLoopAddLocation(NPC, 230.55, -6.32, 94.35, 2, math.random(14, 28))
  26. MovementLoopAddLocation(NPC, 232.12, -6.33, 98.42, 2, math.random(14, 28))
  27. MovementLoopAddLocation(NPC, 233.32, -6.37, 100.35, 2, 0)
  28. MovementLoopAddLocation(NPC, 246.83, -6.79, 108.87, 2, math.random(14, 28))
  29. MovementLoopAddLocation(NPC, 236.07, -6.27, 114.62, 2, 0)
  30. MovementLoopAddLocation(NPC, 230.68, -6, 118.07, 2, math.random(14, 28))
  31. MovementLoopAddLocation(NPC, 234.23, -6.46, 108.93, 2, 0)
  32. MovementLoopAddLocation(NPC, 245.88, -7.23, 95.62, 2, math.random(14, 28))
  33. MovementLoopAddLocation(NPC, 234.63, -5.73, 122.84, 2, math.random(14, 28))
  34. MovementLoopAddLocation(NPC, 239.97, -6.84, 103.84, 2, math.random(14, 28))
  35. MovementLoopAddLocation(NPC, 259.37, -6.59, 90.73, 2, math.random(14, 28))
  36. MovementLoopAddLocation(NPC, 250.99, -6.82, 106.11, 2, math.random(14, 28))
  37. MovementLoopAddLocation(NPC, 240.85, -6.56, 76.36, 2, math.random(14, 28))
  38. MovementLoopAddLocation(NPC, 237.1, -6.29, 73.77, 2, math.random(14, 28))
  39. MovementLoopAddLocation(NPC, 236.1, -6.66, 100.71, 2, 0)
  40. end
  41. function casted_on(NPC, Spawn, Message)
  42. local Cleric = GetSpawn(NPC, 2530111)
  43. if Message == "Divine Smite" and CompareSpawns(Spawn, Cleric) then
  44. local newScout = SpawnMob(GetZone(NPC), 2530196, false, GetX(NPC), GetY(NPC), GetZ(NPC), GetHeading(NPC))
  45. if newScout ~= nil then
  46. CopySpawnAppearance(newScout, NPC)
  47. SpawnSet(newScout, "visual_state", "0")
  48. SpawnSet(newScout, "attackable", "false")
  49. AddTimer(newScout, 5000, "Speak")
  50. end
  51. local mostHated = GetMostHated(NPC)
  52. if mostHated ~= nil and IsPlayer(mostHated) then
  53. if HasQuest(mostHated, JoiningTheForwardRanks) and GetQuestStep(mostHated, JoiningTheForwardRanks) == 2 then
  54. AddStepProgress(mostHated, JoiningTheForwardRanks, 2, 1)
  55. end
  56. end
  57. Despawn(NPC)
  58. end
  59. end
  60. function aggro(NPC, Spawn)
  61. local chance = math.random(1, 100)
  62. if chance <= 10 then
  63. local choice = math.random(1, 3)
  64. if choice == 1 then
  65. 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)
  66. elseif choice == 2 then
  67. 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)
  68. else
  69. 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)
  70. end
  71. end
  72. end