Add new code snippets
This commit is contained in:
353
Complete Projects/Legion/Loot Filter.lua
Normal file
353
Complete Projects/Legion/Loot Filter.lua
Normal file
@@ -0,0 +1,353 @@
|
||||
--START_LOOT_ROLL
|
||||
--Doesn't work for now
|
||||
function(_, id)
|
||||
local name, _, quality, ilvl, _, class, subclass, _, slot = GetItemInfo(GetLootRollItemLink(id))
|
||||
local _, _, count, _, bopflag, canneed, cangreed, cande = GetLootRollItemInfo(id)
|
||||
local pclass = select(3, UnitClass("player"))
|
||||
|
||||
print("name " .. name)
|
||||
print("quality " .. quality)
|
||||
print("ilvl " .. ilvl)
|
||||
print("class " .. class)
|
||||
print("subclass " .. subclass)
|
||||
print("slot " .. slot)
|
||||
|
||||
print("cannneed", canneed)
|
||||
if cannneed == 1 then
|
||||
if bopflag == 0 then
|
||||
RollOnLoot(id, 1)
|
||||
print("Rolling on " .. class .. " " .. subclass .. " 1!")
|
||||
elseif name == "Bloodhunter's Quarry" then
|
||||
RollOnLoot(id, 1)
|
||||
print("Rolling on " .. class .. " " .. subclass .. " 2!")
|
||||
end
|
||||
print("cangreed", cangreed)
|
||||
elseif cangreed == 1 then
|
||||
if bopflag == 1 then
|
||||
if aura_env.skills[pclass][subclass] ~= 1 then
|
||||
RollOnLoot(id, 0)
|
||||
print("Rolling on " .. class .. " " .. subclass .. " 3!")
|
||||
elseif aura_env.skills[pclass][class] ~= 1 then
|
||||
RollOnLoot(id, 0)
|
||||
print("Rolling on " .. class .. " " .. subclass .. " 4!")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.skills =
|
||||
{
|
||||
--Warrior
|
||||
[1] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Paladin
|
||||
[2] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Hunter
|
||||
[3] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Rogue
|
||||
[4] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Priest
|
||||
[5] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Death Knight
|
||||
[6] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Shaman
|
||||
[7] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Mage
|
||||
[8] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Warlock
|
||||
[9] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Monk
|
||||
[10] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Druid
|
||||
[11] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Demon Hunter
|
||||
[12] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user