9
3

RyGorrExplosiveMiningBarrel.lua 633 B

12345678910111213141516171819202122232425
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/RyGorrExplosiveMiningBarrel.lua
  3. Script Purpose : to make the mining barrel die and create an explosion/hide the rock widget
  4. Script Author : theFoof
  5. Script Date : 2013.6.12
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 500, "destroy_barrel")
  10. AddSpawnAccess(NPC, NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function destroy_barrel(NPC)
  16. player = GetTempVariable(NPC, "player")
  17. KillSpawn(NPC, player, 0)
  18. anim = SpawnByLocationID(GetZone(player), 441170)
  19. AddSpawnAccess(anim, player)
  20. SetTempVariable(anim, "player", player)
  21. SetTempVariable(NPC, "player", nil)
  22. end