9
3

wellspringremainstoss.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/Darklight/wellspringremainstoss.lua
  3. Script Purpose : For the quest, "Thexian Taint"
  4. Script Author : Cynnar
  5. Script Date : 8/18/2015
  6. Script Notes : PlayAnimation is not set properly yet.
  7. Script Notes : Object wellspring_remains_toss (340748)
  8. --]]
  9. local ThexianTaint = 135
  10. function spawn(NPC)
  11. AddSpawnAccess(NPC, NPC)
  12. SetPlayerProximityFunction(NPC, 20, "SpawnAccess", "SpawnAccess")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function SpawnAccess(NPC, Spawn)
  18. if HasQuest(Spawn, ThexianTaint) and GetQuestStep(Spawn, ThexianTaint) == 2 then
  19. AddSpawnAccess(NPC, Spawn)
  20. else
  21. RemoveSpawnAccess(NPC, Spawn)
  22. end
  23. end
  24. function casted_on(NPC, Spawn, SpellName)
  25. if SpellName == "Toss Remains in the Well" then
  26. if HasQuest(Spawn, ThexianTaint) and HasItem(Spawn, 14387) then
  27. --if GetQuestStep(Spawn, ThexianTaint) == 2 then
  28. RemoveItem(Spawn, 14387)
  29. PlayAnimation(NPC, 22403)
  30. SendMessage(Spawn, "You toss the vex-runed remains in the well!", "white")
  31. SetStepComplete(Spawn, ThexianTaint, 2)
  32. --end
  33. end
  34. end
  35. end