9
3

Oakmyst.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : ZoneScripts/Oakmyst.lua
  3. Script Purpose : Zone script for Oakmyst Forest
  4. Script Author : Scatman
  5. Script Date : 2009.10.02
  6. Script Notes :
  7. --]]
  8. local QUEST_FROM_CHARLIN_4 = 207
  9. local QUEST_FROM_ADALIN = 294
  10. local QUEST_FROM_EMPRESS = 213
  11. function init_zone_script(Zone)
  12. SetLocationProximityFunction(Zone, 964.13, 8.67, -292.63, 40, "InRange")
  13. SetLocationProximityFunction(Zone, 906.62, 3.33, -209.46, 50, "InRangeAdalinTree1")
  14. SetLocationProximityFunction(Zone, 934.61, 8.11, -195.52, 50, "InRangeAdalinTree2")
  15. SetLocationProximityFunction(Zone, 921.71, 3.93, -357.12, 50, "InRangeAdalinTree3")
  16. SetLocationProximityFunction(Zone, x, y, z, 20, "InRangeRotweed")
  17. end
  18. function InRange(Zone, Spawn)
  19. if HasQuest(Spawn, QUEST_FROM_CHARLIN_4) and GetQuestStep(Spawn, QUEST_FROM_CHARLIN_4) == 1 then
  20. Fulkoir = GetSpawn(Spawn, 1950083)
  21. if Fulkoir == nil then
  22. Fulkoir = SpawnMob(Zone, 1950083, false, 998.26, 14.15, -239.86, 133)
  23. Despawn(Fulkoir, 60000)
  24. end
  25. end
  26. end
  27. function InRangeAdalinTree1(Zone, Spawn)
  28. if HasQuest(Spawn, QUEST_FROM_ADALIN) and not QuestStepIsComplete(Spawn, QUEST_FROM_ADALIN, 1) then
  29. SetStepComplete(Spawn, QUEST_FROM_ADALIN, 1)
  30. end
  31. end
  32. function InRangeAdalinTree2(Zone, Spawn)
  33. if HasQuest(Spawn, QUEST_FROM_ADALIN) and not QuestStepIsComplete(Spawn, QUEST_FROM_ADALIN, 2) then
  34. SetStepComplete(Spawn, QUEST_FROM_ADALIN, 2)
  35. end
  36. end
  37. function InRangeAdalinTree3(Zone, Spawn)
  38. if HasQuest(Spawn, QUEST_FROM_ADALIN) and not QuestStepIsComplete(Spawn, QUEST_FROM_ADALIN, 3) then
  39. SetStepComplete(Spawn, QUEST_FROM_ADALIN, 3)
  40. end
  41. end
  42. function InRangeRotweed(Zone, Spawn)
  43. if HasQuest(Spawn, QUEST_FROM_EMPRESS) and GetQuestStep(Spawn, QUEST_FROM_EMPRESS) == 1 then
  44. local rotweed_thistle = GetSpawn(Zone, 1950203)
  45. local rotweed = GetSpawn(Zone, 1950204)
  46. if rotweed_thistle == nil and rotweed == nil then
  47. SpawnMob(Zone, 1950203, 0, 932.211, 11.7112, -176.419, 280.156)
  48. SpawnMob(Zone, 1950203, 0, 932.211, 11.7721, -167.759, 280.656)
  49. SpawnMob(Zone, 1950203, 0, 939.711, 12.075, -172.089, 280.484)
  50. end
  51. end
  52. end