9
3

WillowWood.lua 917 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : ZoneScripts/WillowWood.lua
  3. Script Purpose : Willow Wood
  4. Script Author : Scatman
  5. Script Date : 2009.09.26
  6. Script Notes : Updated by Jabantiz (4/22/2017)
  7. --]]
  8. local WOODELF_MENTOR_QUEST_3 = 215
  9. local A_RABID_WOLF = 2370107
  10. function init_zone_script(Zone)
  11. SetLocationProximityFunction(Zone, 798.53, -15.94, -602.98, 10, "InRange")
  12. end
  13. function InRange(Zone, Spawn)
  14. if HasQuest(Spawn, WOODELF_MENTOR_QUEST_3) and GetQuestStep(Spawn, WOODELF_MENTOR_QUEST_3) == 4 then
  15. local wolf = GetSpawn(Spawn, A_RABID_WOLF)
  16. if wolf == nil then
  17. SpawnWolfForQuest(Zone, Spawn)
  18. elseif not IsInCombat(wolf) then
  19. Despawn(wolf)
  20. SpawnWolfForQuest(Zone, Spawn)
  21. end
  22. end
  23. end
  24. function SpawnWolfForQuest(Zone, Spawn)
  25. local wolf = SpawnMob(Zone, A_RABID_WOLF, 0, 770.647, 0.814391, -611.79, 258.078)
  26. AddHate(Spawn, wolf, 100)
  27. SendMessage(Spawn, "You hear a growling in the hills to the east.")
  28. end