PageRenderTime 34ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 1ms

/DailyIntake/QuestItems/Eastern Kingdoms/Isle of Quel'Danas.lua

http://armorcraft.googlecode.com/
Lua | 119 lines | 100 code | 10 blank | 9 comment | 5 complexity | 510f5ad0102424ca80384d0a4eb07845 MD5 | raw file
Possible License(s): GPL-2.0
  1. local QI = DailyIntake.QuestItems;
  2. local Localize = DailyIntake.Localize;
  3. -- Add item: Attuned Crystal Cores; http://www.wowhead.com/?item=34368
  4. local function AttunedCrystalCores()
  5. return not UnitOnTaxi("player")
  6. and GetZoneText() == Localize("Isle of Quel'Danas")
  7. -- must target dead Erratic Sentry (http://www.wowhead.com/?npc=24972)
  8. and not QI.UnitIsTappedByOtherPlayer("target")
  9. and UnitIsDead("target")
  10. and QI.UnitIsEntity("target", 24972, QI.Entity.Mob)
  11. -- must not have completed quest objective yet
  12. and not (QI.QuestIsDone(11524) or -- Erratic Behavior (http://www.wowhead.com/?quest=11524)
  13. QI.QuestIsDone(11524) -- Further Conversions (http://www.wowhead.com/?quest=11525)
  14. );
  15. end;
  16. QI.RegisterQuestItem(34368, QI.Priority.Highest, AttunedCrystalCores);
  17. -- Add item: Astromancer's Crystal; http://www.wowhead.com/?item=34533
  18. local function AstromancersCrystal()
  19. return not UnitOnTaxi("player")
  20. and GetZoneText() == Localize("Isle of Quel'Danas")
  21. -- must be in correct location for an objective of quest (Know Your Ley Lines http://www.wowhead.com/?quest=11547)
  22. and ((QI.PlayerIsCloseTo(0.48501101136208, 0.44425591826439, 0.006) and not QI.QuestObjectiveIsDone(11547, 1)) or -- Portal
  23. (QI.PlayerIsCloseTo(0.61196535825729, 0.625359416008, 0.006) and not QI.QuestObjectiveIsDone(11547, 2)) or -- Portal
  24. (QI.PlayerIsCloseTo(0.42027741670609, 0.35619381070137, 0.007) and not QI.QuestObjectiveIsDone(11547, 3)) -- Bloodcrystal
  25. );
  26. end;
  27. QI.RegisterQuestItem(34533, QI.Priority.High, AstromancersCrystal);
  28. -- Add item: Shattered Sun Banner; http://www.wowhead.com/?item=34414
  29. local function ShatteredSunBanner()
  30. return not UnitOnTaxi("player")
  31. and GetZoneText() == Localize("Isle of Quel'Danas")
  32. -- must target dead Emissary of Hate (http://www.wowhead.com/?npc=25003)
  33. and not QI.UnitIsTappedByOtherPlayer("target")
  34. and UnitIsDead("target")
  35. and QI.UnitIsEntity("target", 25003, QI.Entity.Mob)
  36. -- must not have completed quest objective yet
  37. and not (QI.QuestObjectiveIsDone(11538, 1) or -- The Battle for the Sun's Reach Armory (http://www.wowhead.com/?quest=11538)
  38. QI.QuestObjectiveIsDone(11537, 1) -- The Battle Must Go On (http://www.wowhead.com/?quest=11537)
  39. );
  40. end;
  41. QI.RegisterQuestItem(34414, QI.Priority.Highest, ShatteredSunBanner);
  42. -- Add item: Flaming Oil; http://www.wowhead.com/?item=34489
  43. local function FlamingOil()
  44. return UnitOnTaxi("player")
  45. and GetZoneText() == Localize("Isle of Quel'Danas")
  46. -- must be in propper area
  47. and QI.PlayerIsInArea(0.06, 0.4, 0.25, 0.6)
  48. -- must not have completed quest objective yet
  49. and not ((QI.QuestObjectiveIsDone(11542, 1) and
  50. QI.QuestObjectiveIsDone(11542, 2) and
  51. QI.QuestObjectiveIsDone(11542, 3)) or
  52. (QI.QuestObjectiveIsDone(11543, 1) and
  53. QI.QuestObjectiveIsDone(11543, 2) and
  54. QI.QuestObjectiveIsDone(11543, 3))
  55. );
  56. end;
  57. QI.RegisterQuestItem(34489, QI.Priority.High, FlamingOil);
  58. -- Add item: ManaRemnants; http://www.wowhead.com/?item=34338
  59. local function ManaRemnants()
  60. return not UnitOnTaxi("player")
  61. and GetZoneText() == Localize("Isle of Quel'Danas")
  62. -- must have 4 x [Mana Remnants]
  63. and GetItemCount(34338) >= 4
  64. -- must not have completed the quest
  65. and not (QI.QuestIsDone(11496) or QI.QuestIsDone(11523))
  66. -- must be at one of the crystals
  67. and (QI.PlayerIsCloseTo(0.49124637246132, 0.29462558031082, 0.009) or
  68. QI.PlayerIsCloseTo(0.47490000724792, 0.33658114075661, 0.009) or
  69. QI.PlayerIsCloseTo(0.46538835763931, 0.35283729434013, 0.009) or
  70. QI.PlayerIsCloseTo(0.47492098808289, 0.36833292245865, 0.009) or
  71. QI.PlayerIsCloseTo(0.48636838793755, 0.35440069437027, 0.009) or
  72. QI.PlayerIsCloseTo(0.5004466176033, 0.3356607854366, 0.009) or
  73. QI.PlayerIsCloseTo(0.51121187210083, 0.35687604546547, 0.009) or
  74. QI.PlayerIsCloseTo(0.50291329622269, 0.38194954395294, 0.009) or
  75. QI.PlayerIsCloseTo(0.51273649930954, 0.39842227101326, 0.009) or
  76. QI.PlayerIsCloseTo(0.50389248132706, 0.42377132177353, 0.009) or
  77. QI.PlayerIsCloseTo(0.48934319615364, 0.39143061637878, 0.009) or
  78. QI.PlayerIsCloseTo(0.53719592094421, 0.3621313273906, 0.009)
  79. );
  80. end;
  81. QI.RegisterQuestItem(34338, QI.Priority.Normal, ManaRemnants);
  82. -- Add item: Arcane Charges; http://www.wowhead.com/?item=34475
  83. local function ArcaneCharges()
  84. return UnitOnTaxi("player")
  85. and GetZoneText() == Localize("Isle of Quel'Danas")
  86. and GetSubZoneText() == Localize("Dead Scar")
  87. -- must not have completed the quest yet
  88. and not (QI.QuestIsDone(11532) or QI.QuestIsDone(11533));
  89. end;
  90. QI.RegisterQuestItem(34475, QI.Priority.High, ArcaneCharges);
  91. -- Add item: Orb of Murloc Control; http://www.wowhead.com/?item=34483
  92. local function OrbOfMurlocControl()
  93. return not UnitOnTaxi("player")
  94. and GetZoneText() == Localize("Isle of Quel'Danas")
  95. and GetSubZoneText() == Localize("Greengill Coast")
  96. -- must not have completed the quest yet
  97. and not QI.QuestIsDone(11541);
  98. end;
  99. QI.RegisterQuestItem(34483, QI.Priority.Normal, OrbOfMurlocControl);