OverlordOxulius.lua 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --[[
  2. Script Name : SpawnScripts/MeetingOfTheMinds/OverlordOxulius.lua
  3. Script Author : Neveruary
  4. Script Date : 2021.10.05 11:10:42
  5. Script Purpose : Governs behavior of Overlord Oxulius in A Meeting of the Minds.
  6. Script Notes : Spell functions de-activated. All spells need implementation.
  7. Boss Mechanics : Boss periodically uses custom spells to attack main threat target. If Pkzwk is killed before Oxulius, then adds will spawn and attack the main threat target.
  8. --]]
  9. -- spells = {Glare of Eradication, Gaze of Writhing Agony, Gaze of Oxulius, Gaze of Destruction}
  10. function spawn(NPC)
  11. SetTempVariable(NPC, "addSpawn", "nil")
  12. end
  13. function aggro(NPC, Spawn)
  14. AddTimer(NPC, 1000, "tzkrLoop")
  15. end
  16. function tzkrLoop(NPC, Spawn)
  17. if GetTempVariable(NPC, "addSpawn") == "nil" then
  18. AddTimer(NPC, 3000, "tzkrCheck")
  19. elseif GetTempVariable(NPC, "addSpawn") == "0" then
  20. end
  21. end
  22. function tzkrCheck(NPC, Spawn)
  23. tkzr = GetSpawn(NPC, 5560002)
  24. AddTimer(NPC, 1500, "tzkrLoop")
  25. if GetTempVariable(NPC, "addSpawn") == "nil" then
  26. if not IsAlive(tkzr) then
  27. SetTempVariable(NPC, "addSpawn", "1")
  28. AddTimer(NPC, 1000, "summonAdds")
  29. end
  30. end
  31. end
  32. function summonAdds(NPC, Spawn)
  33. local zone = GetZone(NPC) -- grab zone
  34. if GetTempVariable(NPC, "addSpawn") == "1" then
  35. local borxxSpawn = SpawnByLocationID(zone, 133772846)
  36. local braxxSpawn = SpawnByLocationID(zone, 302036)
  37. local brixxSpawn = SpawnByLocationID(zone, 302037)
  38. end
  39. SetTempVariable(NPC, "addSpawn", "0")
  40. AddTimer(NPC, 4000, "overlordConvo1")
  41. end
  42. function overlordConvo1(NPC, Spawn)
  43. local zone = GetZone(NPC)
  44. local borxx = GetSpawn(NPC, 5560006)
  45. if borxx ~= nil then
  46. Say(NPC, "Borxx, you must aid me now. Interlopers have threatened my plans, you owe me!")
  47. AddTimer(borxx, 3000, "borxxConvo1")
  48. end
  49. end
  50. function overlordConvo2(NPC, Spawn)
  51. local borxx = GetSpawn(NPC, 5560006)
  52. AddTimer(borxx, 3000, "borxxConvo2")
  53. Say(NPC, "I am not to be taken lightly. You don't understand! The plan benefits us all. You must aid me NOW!")
  54. end
  55. function overlordConvo3(NPC, Spawn)
  56. local borxx = GetSpawn(NPC, 5560006)
  57. AddTimer(borxx, 3000, "borxxConvo3")
  58. Say(NPC, "If they are audacious enough to attack me, then what is to prevent them from treating you the same way?! You must aid me NOW!")
  59. end
  60. function overlordConvo4(NPC, Spawn)
  61. local borxx = GetSpawn(NPC, 5560006)
  62. AddTimer(borxx, 3000, "borxxConvo4")
  63. Say(NPC, "You know full well I cannot agree to that! Be reasonable, I can make it worth your while! I must have aid NOW!")
  64. end
  65. function overlordConvo5(NPC, Spawn)
  66. local borxx = GetSpawn(NPC, 5560006)
  67. AddTimer(borxx, 3000, "borxxConvo5")
  68. Say(NPC, "Okay! I will meet your demands. Time grows short; I need you now!")
  69. end
  70. function respawn(NPC)
  71. spawn(NPC)
  72. end