Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Inactive check. Let's me disable a task for all toons
- -- WhiteLists check
- -- If there is a WhiteList for this task, and this toon is not in the WhiteList, return false
- -- BlackLists check
- -- Faction check
- -- Class check
- -- Level check
- if Task.MinLevel or Task.MaxLevel then
- -- iLevel check
- if Task.MiniLevel or Task.MaxiLevel then
- -- Profession check
- -- MarkCompletedIfKnowSpellId check
- -- Hunter Pet Check
- -- Guild Check
- -- Dual Spec Check
- -- Garrison check
- if Task.BuildingName then
- if (not Task.BuildingMinLevel) or (BuildingInfo.rank >= Task.BuildingMinLevel) then
- -- Reputation Check
- if Task.Reputation then
- local _, _, rep = DataStore:GetRawReputationInfo(character, Task.Reputation.Faction)
- if not rep or (rep < Task.Reputation.ReputationLevel) then
- return false
- end
- end
- -- Shipyard Oil Rig
- -- Trade Agreement from Arakkoa Outcasts
- -- The Awakener Ship: Order of the Awakened
- -- Garrison Cache. Disable if have less than 400 resource to pick up or if already have max that I can carry (got tired of logging in just to pick up resources).
- if EA_Task.taskName == 'Cache Pick Up' then
- local GarrisonResources = DataStore:GetUncollectedResources(character)
- if GarrisonResources < 400 then
- return false
- else
- local GarrisonResourcesID = 824
- local amount, earnedThisWeek, weeklyMax, totalMax = DataStore:GetCurrencyTotals(character, GarrisonResourcesID)
- if amount >= totalMax then
- return false
- end
- end
- end
- -- Equip Heirlooms in all possible slots
- if EA_Task.taskName == "Equip Heirlooms in all possible slots" then
- local MinNumOfHeirloomsForFalse = 10 -- Toon must have at least 10 heirlooms equipped, if not this entry will be true
- if DataStore:GetCharacterClass(character) == 'Rogue' then
- MinNumOfHeirloomsForFalse = 11
- end
- -- Count number of equipped heirlooms
- local InventoryItems = DataStore:GetInventory(character)
- local NumHeirloomsEquipped = 0
- for slot, ItemID in pairs(InventoryItems) do
- local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(ItemID)
- if itemRarity and (itemRarity == 7) then
- NumHeirloomsEquipped = NumHeirloomsEquipped + 1
- end
- end
- if NumHeirloomsEquipped >= MinNumOfHeirloomsForFalse then
- return false
- end
- end
- -- Follower Check - recruit followers
- -- Followers At iLevel675 check
- -- Followers At Level100 check
- -- LFR Dungeon Check
- if Task.LFR_DungeonID and Task.LFR_EncounterIndex then
- if self:IsBossDead(ToonRealm, Task.LFR_DungeonID, Task.LFR_EncounterIndex) then
- return false
- end
- end
- -- if toon passed all the checks, return true so the task will be enabled.
- return true
Advertisement
Add Comment
Please, Sign In to add comment