ATaintedSapswillTapper1584912.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/ATaintedSapswillTapper1584912.lua
  3. Script Author : Rylec
  4. Script Date : 2020.05.23 10:05:21
  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, 1587642)
  33. if deadDeer ~= nil then
  34. Despawn(deadDeer)
  35. end
  36. end