9
3

smashedbarrel.lua 881 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/MizansCellar/smashedbarrel.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.22 05:09:39
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetRequiredQuest(NPC,5749,3,1,0,0)
  10. end
  11. function casted_on(NPC, Spawn, Message)
  12. if Message == "Put out fire" then
  13. if QuestStepIsComplete(Spawn,5749,3)== false then
  14. PlayFlavor(Spawn,"","","tantrum_short",0,0)
  15. SpawnSet(NPC,"visual_state","0")
  16. AddTimer(NPC,1200,"FireOut",1,Spawn)
  17. end
  18. end
  19. end
  20. function FireOut(NPC,Spawn)
  21. if QuestStepIsComplete(Spawn,5749,3)== false then
  22. local zone = GetZone(NPC)
  23. local Object2 = GetSpawnByLocationID(zone,133776550)
  24. SpawnSet(Object2,"model_type","1428")
  25. SpawnSet(NPC,"model_type","0")
  26. end
  27. end
  28. function respawn(NPC)
  29. spawn(NPC)
  30. end