PageRenderTime 15ms CodeModel.GetById 8ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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