KayloftheCircle.lua 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. --[[
  2. Script Name : SpawnScripts/CircleElders/KayloftheCircle.lua
  3. Script Author : premierio015
  4. Script Date : 2020.05.20 06:05:17
  5. Script Purpose : Kayl Script for the Circle Event.
  6. :
  7. --]]
  8. local OldBruiserID = 433247
  9. local TayilID = 1587665
  10. function spawn(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. --[[
  16. function InRange(NPC, Spawn)
  17. AddTimer(NPC, 10000, "MobAttack", 1, Spawn)
  18. end
  19. --]]
  20. function MobAttack(NPC, Spawn)
  21. local zone = GetZone(NPC)
  22. local OldBruiser = GetSpawnByLocationID(zone, OldBruiserID)
  23. if OldBruiser ~= nil then
  24. Say(NPC, "Old Bruiser Attack!")
  25. SendPopUpMessage(Spawn, "Old Bruiser growls at " .. GetName(Spawn) .. " ", 255, 0, 0)
  26. SendMessage(Spawn, "Old Bruiser growls at " .. GetName(Spawn) .. " ", "red")
  27. SpawnSet(OldBruiser, "show_level", 1) -- Lemmeron added please check this is what you want
  28. SpawnSet(OldBruiser, "faction", 1) -- Lemmeron added please check this is what you want
  29. SpawnSet(OldBruiser, "attackable", 1) -- Lemmeron added please check this is what you want
  30. Attack(OldBruiser, Spawn)
  31. end
  32. end
  33. function KillDialogue(NPC, Spawn)
  34. local zone = GetZone(NPC)
  35. local Tayil_Spawn = SpawnByLocationID(zone, TayilID) -- Spawn Tayil after Breeze dies and Kayl start speech.
  36. if Tayil_Spawn ~= nil then
  37. local Tayil2 = GetSpawnByLocationID(zone, TayilID)
  38. MoveToLocation(Tayil_Spawn, 6.52, 0.00, -0.52, 2)
  39. AddTimer(NPC, 5000, "kill1", Spawn)
  40. end
  41. end
  42. function kill1(NPC, Spawn)
  43. local zone = GetZone(NPC)
  44. local Tayil = GetSpawnByLocationID(zone, TayilID)
  45. if Tayil ~= nil then
  46. PlayFlavor(Tayil, "", "I knew we'd find you, Kayl. I see you've been doing well for yourself. Too bad your treasures are about to become mine!", "", 1689589577, 4560189)
  47. PlayFlavor(NPC, "", "T... Tayil! How did you find me?", "beg", 1689589577, 4560189)
  48. AddTimer(NPC, 7000, "kill2", Spawn)
  49. end
  50. end
  51. function kill2(NPC, Spawn)
  52. local zone = GetZone(NPC)
  53. local Tayil = GetSpawnByLocationID(zone, TayilID)
  54. PlayFlavor(Tayil, "", "That's not important, Qeynosian. What is important is that your days upon Norrath are at an end. Prepare to die!", "", 1689589577, 4560189)
  55. AddTimer(NPC, 3000, "death", Spawn)
  56. end
  57. function death(NPC, Spawn)
  58. local zone = GetZone(NPC)
  59. local Tayil = GetSpawnByLocationID(zone, TayilID)
  60. PlayFlavor(NPC, "", "Noooooooo!", "", 1689589577, 4560189)
  61. KillSpawn(NPC)
  62. end