-- Here's some pickit stuff
function hasCertainSockets(item, sockets)
for i = 0, item.stats:size() - 1 do
if item.stats[i].Stat.Name == "Sockets" and item.stats[i].Value == sockets then
return true
end
end
end
function isEnhancedDef(item, percent)
for i = 0, item.mods:size() - 1 do
if item.mods[i].Stat.Stat == "item_armor_percent" and item.mods[i].Value >= percent then
return true
end
end
end
elseif (item.baseItem.code == "utu" or item.baseItem.code == "utp" or item.baseItem.code == "uui" or item.baseItem.code == "uar" or item.baseItem.code == "xtp") and item.quality == ItemQuality.Superior and item.flags.Ethereal == false then
if isEnhancedDef(item, 15) and (hasCertainSockets(item, 0) or hasCertainSockets(item, 3) or hasCertainSockets(item, 4)) then
return 7
end -- pick only 0,3 or 4 socket Good non eth armors for runewords with 15ed
elseif item.baseItem.code == "7wa" and item.flags.Ethereal == true and hasCertainSockets(item, 5) and item.quality == ItemQuality.Superior and isEnhancedDef(item, 15) then
return 9 -- pick only 15ed 5 soc eth zerker axe
elseif (item.baseItem.code == "7wa" or item.baseItem.code == "7cr" or item.baseItem.code == "uit") and item.quality == ItemQuality.Superior and item.flags.Ethereal == false then
if isEnhancedDef(item, 15) and (hasCertainSockets(item, 0) or hasCertainSockets(item, 4) or hasCertainSockets(item, 5) or hasCertainSockets(item, 6)) then
return 7
end -- pick only 0,4,5 or 6 socket 15ed zerker pb or monarch
elseif item.baseItem.code == "crs" and item.flags.Ethereal == true and hasCertainSockets(item, 5) and (item.quality == ItemQuality.Normal or item.quality == ItemQuality.Superior) then
return 9 -- pick only 5 soc eth crystal sword
elseif (item.baseItem.code == "pab" or item.baseItem.code == "pac" or item.baseItem.code == "pad" or item.baseItem.code == "pae or item.baseItem.code == "paf") and (item.quality == ItemQuality.Superior or item.quality == ItemQuality.Normal) then
for n = 0, item.mods:size() - 1 do
if item.mods[n].Stat.Name == "Fire Resist" and item.mods[n].Value >= 40 then
return 7
end
end -- pick only elite pally shields with 40+ res all eth or non eth and sup or normal
-- Rest are for sellitem
elseif item.baseItem.code == "uap" and item.flags.Identified == true and item.quality == ItemQuality.Unique then
for i = 0, item.stats:size() - 1 do
if item.stats[i].Stat.Name == "Armor Class" and not (item.stats[i].Value >= 141) then
return true
end
end --- Only keep 141 def Shako
elseif item.baseItem.code == "mgl" and item.flags.Identified == true and item.quality == ItemQuality.Unique then
for n = 0, item.mods:size() - 1 do
if item.mods[n].Stat.Name == "Magic Find" and not (item.mods[n].Value >= 40) then
return true
end
end --- Only keep 40mf Chance Guards
elseif item.baseItem.code == "xtb" and item.flags.Identified == true and item.quality == ItemQuality.Unique then
for n = 0, item.mods:size() - 1 do
if item.mods[n].Stat.Name == "Magic Find" and not (item.mods[n].Value >= 45) then
return true
end
end --- Only keep 45mf+ War Travs
elseif item.baseItem.code == "cm3" and item.flags.Identified == true and item.quality == ItemQuality.Unique then
for n = 0, item.mods:size() - 1 do
if item.mods[n].Stat.Name == "Magic Find" and not (item.mods[n].Value >= 40) then
return true
end
end --- Only keep 40mf Gheeds