9
3

CorruptedGreenWisp.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : SpawnScripts/Castleview/CorruptedGreenWisp.lua
  3. Script Purpose : CorruptedGreenWisp
  4. Script Author : Scatman
  5. Script Date : 2009.10.02
  6. Script Notes :
  7. --]]
  8. local HIGH_ELF_MENTOR_QUEST_3 = 225
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. --SetRequiredQuest(NPC, HIGH_ELF_MENTOR_QUEST_3, 2)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. end
  19. function casted_on(Target, Caster, SpellName)
  20. if HasQuest(Caster, HIGH_ELF_MENTOR_QUEST_3) and GetQuestStep(Caster, HIGH_ELF_MENTOR_QUEST_3) == 2 and SpellName == "Cleanse" then
  21. SetStepComplete(Caster, HIGH_ELF_MENTOR_QUEST_3, 2)
  22. local devious_sunshimmer_sprite = SpawnMob(GetZone(Target), 2360058, false, 710.408, -15.5306, -161.493, 200)
  23. AddHate(Caster, devious_sunshimmer_sprite, 100)
  24. RemoveSpawnAccess(Target, Caster)
  25. --Despawn(Target, 180000)
  26. end
  27. end
  28. function InRange(NPC, Spawn)
  29. if HasQuest(Spawn, HIGH_ELF_MENTOR_QUEST_3) and GetQuestStep(Spawn, HIGH_ELF_MENTOR_QUEST_3) == 2 then
  30. AddSpawnAccess(NPC, Spawn)
  31. end
  32. end
  33. function LeaveRange(NPC, Spawn)
  34. end