9
3

blackshard.lua 856 B

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : SpawnScripts/IllbodingDark1/blackshard.lua
  3. Script Purpose : for the black shard spawns in zone 516 and 517
  4. Script Author : theFoof
  5. Script Date : 2013.6.19
  6. Script Notes :
  7. --]]
  8. local SeveringHead = 72
  9. function spawn(NPC)
  10. SpawnSet(NPC, "action_state", "2623")
  11. SetRequiredQuest(GetSpawnByLocationID(GetZone(NPC), 465212), SeveringHead, 2)
  12. SetRequiredQuest(GetSpawnByLocationID(GetZone(NPC), 465211), SeveringHead)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function casted_on(NPC, Spawn, SpellName)
  18. if SpellName == "Smash the stone!" then
  19. if GetQuestStep(Spawn, SeveringHead) == 2 then
  20. SetStepComplete(Spawn, SeveringHead, 2)
  21. SpawnSet(GetSpawnByLocationID(GetZone(NPC), 465211), "visual_state", "0")
  22. SpawnSet(NPC, "visual_state", "18193")
  23. AddTimer(NPC, 500, "Despawn")
  24. end
  25. end
  26. end