WillowWood.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. SetLocationProximityFunction(Zone, 840.94, -20.50, -617.89, 4, "SpiritOfTheFaydwer","LeaveLocation")
  13. SetLocationProximityFunction(Zone, 826.18, -21.43, -662.40, 5, "WillowWoodMemorial","LeaveLocation")
  14. end
  15. function InRange(Zone, Spawn)
  16. if HasQuest(Spawn, WOODELF_MENTOR_QUEST_3) and GetQuestStep(Spawn, WOODELF_MENTOR_QUEST_3) == 4 then
  17. local wolf = GetSpawn(Spawn, A_RABID_WOLF)
  18. if wolf == nil then
  19. SpawnWolfForQuest(Zone, Spawn)
  20. elseif not IsInCombat(wolf) then
  21. Despawn(wolf)
  22. SpawnWolfForQuest(Zone, Spawn)
  23. end
  24. end
  25. end
  26. function SpawnWolfForQuest(Zone, Spawn)
  27. local wolf = SpawnMob(Zone, A_RABID_WOLF, 0, 770.647, 0.814391, -611.79, 258.078)
  28. AddHate(Spawn, wolf, 100)
  29. SendMessage(Spawn, "You hear a growling in the hills to the east.")
  30. end
  31. function enter_location(zone, spawn, grid)
  32. SetLocationProximityFunction(Zone, 841.22, -20.52, -618.14, 5, "SpiritOfTheFaydwer")
  33. SetLocationProximityFunction(Zone, 826.18, -21.43, -662.40, 4, "WillowWoodMemorial")
  34. end
  35. function SpiritOfTheFaydwer(Zone,Player)
  36. SendPopUpMessage(Player, "Spirit of Faydark Park", 255, 255, 0)
  37. end
  38. function WillowWoodMemorial(Zone,Player)
  39. SendPopUpMessage(Player, "The Willow Wood Memorial", 255, 255, 0)
  40. end