ATunarianElder1.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/CircleElders/ATunarianElder1.lua
  3. Script Author : premierio015
  4. Script Date : 2020.05.25 03:05:10
  5. Script Purpose : When a Tunarian Elder dies, starts the Circle Event.
  6. --]]
  7. local KaylID = 433249
  8. function spawn(NPC)
  9. EmoteLoop (NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. end
  14. function respawn(NPC)
  15. end
  16. function death(NPC, Spawn)
  17. local zone = GetZone(NPC)
  18. local Kayl = GetSpawnByLocationID(zone, KaylID)
  19. AddTimer(Kayl, 10000, "MobAttack", 1, Spawn) -- after A Tunarian Elder dies, after 10 sec call function for Old Bruiser to attack the Player
  20. end
  21. function EmoteLoop (NPC) -- Animations
  22. local choice = math.random(1,2)
  23. local timer = math.random(2500,3500)
  24. if choice == 1 then
  25. PlayAnimation(NPC, 10961)
  26. AddTimer(NPC, timer, "EmoteLoop")
  27. else
  28. PlayAnimation(NPC, 10963)
  29. AddTimer(NPC, timer, "EmoteLoop")
  30. end
  31. end