widget_kinloch_x3_orc_flame.lua 894 B

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/widget_kinloch_x3_orc_flame.lua
  3. Script Purpose : for the ry'gorr torches
  4. Script Author : theFoof
  5. Script Date : 2013.6.15
  6. Script Notes :
  7. --]]
  8. local GreenMystery = 67
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, GreenMystery, 1)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function casted_on(NPC, Spawn, SpellName)
  16. if HasItem(Spawn, 7928) then
  17. if SpellName == 'melt the green ice' then
  18. if GetQuestStep(Spawn, GreenMystery) == 1 then
  19. AddStepProgress(Spawn, GreenMystery, 1, 1)
  20. local invis_cube = GetSpawn(NPC, 4701576)
  21. SpawnSet(invis_cube, "visual_state", "17420")
  22. AddTimer(NPC, 30000, "RemoveGas", 1, invis_cube)
  23. end
  24. end
  25. else
  26. SendMessage(Spawn, "You must have green ice to do this!", "yellow")
  27. end
  28. end
  29. function RemoveGas(NPC, cube)
  30. SpawnSet(cube, "visual_state", "0")
  31. end