9
3

ATaintedSapswillTapper429335.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/ATaintedSapswillTapper429335.lua
  3. Script Author : Rylec
  4. Script Date : 2020.05.24 11:05:09
  5. Script Purpose : Animations for Sapswills and despawn of Dead Deer
  6. --]]
  7. function spawn(NPC)
  8. EmoteLoop(NPC)
  9. end
  10. function hailed(NPC, Spawn)
  11. -- FaceTarget(NPC, Spawn)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function EmoteLoop (NPC)
  17. local choice = math.random(1,2)
  18. local timer = math.random(2500,3500)
  19. if choice == 1 then
  20. PlayAnimation(NPC, 11400)
  21. AddTimer(NPC, timer, "EmoteLoop")
  22. else
  23. PlayAnimation(NPC, 11399)
  24. AddTimer(NPC, timer, "EmoteLoop")
  25. end
  26. end
  27. function death(NPC, Spawn)
  28. AddTimer(NPC, 10000, "DespawnDeadDeer")
  29. end
  30. function DespawnDeadDeer(NPC)
  31. local zone = GetZone(NPC)
  32. local deadDeer = GetSpawnByLocationID(zone, 1587658)
  33. if deadDeer ~= nil then
  34. Despawn(deadDeer)
  35. end
  36. end