9
3

smashedbarrel.lua 1011 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. if GetClientVersion(Spawn) <= 546 then
  15. PlayFlavor(Spawn,"","","kick",0,0)
  16. else
  17. PlayFlavor(Spawn,"","","tantrum_short",0,0)
  18. end
  19. SpawnSet(NPC,"visual_state","0")
  20. AddTimer(NPC,800,"FireOut",1,Spawn)
  21. end
  22. end
  23. end
  24. function FireOut(NPC,Spawn)
  25. if QuestStepIsComplete(Spawn,5749,3)== false then
  26. local zone = GetZone(NPC)
  27. local Object2 = GetSpawnByLocationID(zone,133776550)
  28. SpawnSet(Object2,"model_type","1428")
  29. SpawnSet(NPC,"model_type","0")
  30. end
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end