Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
-- Enchanting reagents
local VOID = 22450
local NEXUS = 20725
local LPRISMATIC = 22449
local LBRILLIANT = 14344
local LRADIANT = 11178
local LGLOWING = 11139
local LGLIMMERING = 11084
local SPRISMATIC = 22448
local SBRILLIANT = 14343
local SRADIANT = 11177
local SGLOWING = 11138
local SGLIMMERING = 10978
local GPLANAR = 22446
local GETERNAL = 16203
local GNETHER = 11175
local GMYSTIC = 11135
local GASTRAL = 11082
local GMAGIC = 10939
local LPLANAR = 22447
local LETERNAL = 16202
local LNETHER = 11174
local LMYSTIC = 11134
local LASTRAL = 10998
local LMAGIC = 10938
local ARCANE = 22445
local ILLUSION = 16204
local DREAM = 11176
local VISION = 11137
local SOUL = 11083
local STRANGE = 10940
local priceUpperLimit = {
[22450] = 750000, -- Void Crystal
[20725] = 75000, -- Nexus Crystal
[22449] = 180000, -- Large Prismatic Shard
[14344] = 85000, -- Large Brilliant Shard
[11178] = 75000, -- Large Radiant Shard
[11139] = 15000, -- Large Glowing Shard
[11084] = 5000, -- Large Glimmering Shard
[22448] = 50000, -- Small Prismatic Shard
[14343] = 10000, -- Small Brilliant Shard
[11177] = 50000, -- Small Radiant Shard
[11138] = 3500, -- Small Glowing Shard
[10978] = 2500, -- Small Glimmering Shard
[22446] = 52500, -- Greater Planar Essence
[16203] = 82500, -- Greater Eternal Essence
[11175] = 45000, -- Greater Nether Essence
[11135] = 6000, -- Greater Mystic Essence
[11082] = 4500, -- Greater Astral Essence
[10939] = 4500, -- Greater Magic Essence
[22447] = 17500, -- Lesser Planar Essence
[16202] = 27500, -- Lesser Eternal Essence
[11174] = 15000, -- Lesser Nether Essence
[11134] = 2000, -- Lesser Mystic Essence
[10998] = 1500, -- Lesser Astral Essence
[10938] = 1500, -- Lesser Magic Essence
[22445] = 18500, -- Arcane Dust
[16204] = 17500, -- Illusion Dust
[11176] = 5000, -- Dream Dust
[11137] = 1500, -- Vision Dust
[11083] = 1500, -- Soul Dust
[10940] = 750, -- Strange Dust
}
-- A price adjustment to favour/disfavour particular reagents
-- depending on the market and how much of the reagent I have
-- already. Set manually, but I am working on automating this
local priceAdjustment = {
[VOID] = 0.5,
[NEXUS] = 0.5,
[LPRISMATIC] = 1,
[LBRILLIANT] = 1,
[LRADIANT] = 1,
[LGLOWING] = 1,
[LGLIMMERING] = 1,
[SPRISMATIC] = 1,
[SBRILLIANT] = 1,
[SRADIANT] = 1,
[SGLOWING] = 1,
[SGLIMMERING] = 1,
[GPLANAR] = 1,
[GETERNAL] = 1,
[GNETHER] = 1,
[GMYSTIC] = 1,
[GASTRAL] = 1,
[GMAGIC] = 1,
[LPLANAR] = 1,
[LETERNAL] = 1,
[LNETHER] = 1,
[LMYSTIC] = 1,
[LASTRAL] = 1,
[LMAGIC] = 1,
[ARCANE] = 1,
[ILLUSION] = 1,
[DREAM] = 1,
[VISION] = 1,
[SOUL] = 1,
[STRANGE] = 1,
}
-- item types
local WEAPON = 0
local ARMOR = 1
-- item qualities
local UNCOMMON = 2
local RARE = 3
local EPIC = 4
-- convert an item type string to an integer type
local typeStringToType = {
["Weapon"] = WEAPON,
["Armor"] = ARMOR,
}
-- disenchanting level bracket upper bounds, e.g. an ilevel 52 item
-- goes into bracket 55
local levelUpperBounds = { 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 85, 99, 120 }
-- bad items that look like they should be disenchantable but aren't
local badItem = {
[11287] = {}, -- Lesser Magic Wand
[11288] = {}, -- Greater Magic Wand
[11289] = {}, -- Lesser Mystic Wand
[11290] = {}, -- Greater Mystic Wand
[20406] = {}, -- Twilight Cultist Mantle
[20407] = {}, -- Twilight Cultist Robe
[20408] = {}, -- Twilight Cultist Cowl
}
-- the big disenchant table, indexed by [quality][type][level bracket]
-- and yielding { { reagent type, drop probability, average drop quantity }, ... }
-- I would use Enchantrix, but it lacks data for new items
local disenchantTable = {
[UNCOMMON] = {
[WEAPON] = {
[15] = { { STRANGE , 0.20, 1.5 }, { LMAGIC , 0.80, 1.5 }, },
[20] = { { STRANGE , 0.20, 2.5 }, { GMAGIC , 0.75, 1.5 }, { SGLIMMERING, 0.05, 1.0 }, },
[25] = { { STRANGE , 0.15, 5.0 }, { GMAGIC , 0.75, 1.5 }, { SGLIMMERING, 0.10, 1.0 }, },
[30] = { { SOUL , 0.20, 1.5 }, { GMAGIC , 0.75, 1.5 }, { LGLIMMERING, 0.05, 1.0 }, },
[35] = { { SOUL , 0.20, 3.5 }, { LMYSTIC , 0.75, 1.5 }, { SGLOWING , 0.05, 1.0 }, },
[40] = { { VISION , 0.20, 1.5 }, { GMYSTIC , 0.75, 1.5 }, { LGLOWING , 0.05, 1.0 }, },
[45] = { { VISION , 0.15, 3.5 }, { LNETHER , 0.80, 1.5 }, { SRADIANT , 0.05, 1.0 }, },
[50] = { { DREAM , 0.20, 1.5 }, { GNETHER , 0.75, 1.5 }, { LRADIANT , 0.05, 1.0 }, },
[55] = { { DREAM , 0.20, 3.5 }, { LETERNAL, 0.75, 1.5 }, { SBRILLIANT , 0.05, 1.0 }, },
[60] = { { ILLUSION, 0.20, 1.5 }, { GETERNAL, 0.75, 1.5 }, { LBRILLIANT , 0.05, 1.0 }, },
[65] = { { ILLUSION, 0.20, 3.5 }, { GETERNAL, 0.75, 2.5 }, { LBRILLIANT , 0.05, 1.0 }, },
[85] = { { ARCANE , 0.20, 2.5 }, { LPLANAR , 0.75, 2.5 }, { SPRISMATIC , 0.05, 1.0 }, },
[99] = { { ARCANE , 0.20, 2.5 }, { LPLANAR , 0.75, 2.5 }, { SPRISMATIC , 0.05, 1.0 }, },
[120] = { { ARCANE , 0.20, 3.5 }, { GPLANAR , 0.75, 1.5 }, { LPRISMATIC , 0.05, 1.0 }, },
},
[ARMOR] = {
[15] = { { STRANGE , 0.80, 1.5 }, { LMAGIC , 0.20, 1.5 }, },
[20] = { { STRANGE , 0.75, 2.5 }, { GMAGIC , 0.20, 1.5 }, { SGLIMMERING, 0.05, 1.0 }, },
[25] = { { STRANGE , 0.75, 5.0 }, { LASTRAL , 0.15, 1.5 }, { SGLIMMERING, 0.10, 1.0 }, },
[30] = { { SOUL , 0.75, 1.5 }, { GASTRAL , 0.20, 1.5 }, { LGLIMMERING, 0.05, 1.0 }, },
[35] = { { SOUL , 0.75, 3.5 }, { LMYSTIC , 0.20, 1.5 }, { SGLOWING , 0.05, 1.0 }, },
[40] = { { VISION , 0.75, 1.5 }, { GMYSTIC , 0.20, 1.5 }, { LGLOWING , 0.05, 1.0 }, },
[45] = { { VISION , 0.80, 3.5 }, { LNETHER , 0.15, 1.5 }, { SRADIANT , 0.05, 1.0 }, },
[50] = { { DREAM , 0.75, 1.5 }, { GNETHER , 0.20, 1.5 }, { LRADIANT , 0.05, 1.0 }, },
[55] = { { DREAM , 0.75, 3.5 }, { LETERNAL, 0.20, 1.5 }, { SBRILLIANT , 0.05, 1.0 }, },
[60] = { { ILLUSION, 0.75, 1.5 }, { GETERNAL, 0.20, 1.5 }, { LBRILLIANT , 0.05, 1.0 }, },
[65] = { { ILLUSION, 0.75, 3.5 }, { GETERNAL, 0.20, 2.5 }, { LBRILLIANT , 0.05, 1.0 }, },
[85] = { { ARCANE , 0.75, 2.5 }, { LPLANAR , 0.20, 2.5 }, { SPRISMATIC , 0.05, 1.0 }, },
[99] = { { ARCANE , 0.75, 2.5 }, { LPLANAR , 0.20, 2.5 }, { SPRISMATIC , 0.05, 1.0 }, },
[120] = { { ARCANE , 0.75, 3.5 }, { GPLANAR , 0.20, 1.5 }, { LPRISMATIC , 0.05, 1.0 }, },
},
},
[RARE] = {
[WEAPON] = {
[20] = { { SGLIMMERING, 1.00, 1.0 }, }, [25] = { { SGLIMMERING, 1.00, 1.0 }, },
[30] = { { LGLIMMERING, 1.00, 1.0 }, }, [35] = { { SGLOWING , 1.00, 1.0 }, },
[40] = { { LGLOWING , 1.00, 1.0 }, }, [45] = { { SRADIANT , 1.00, 1.0 }, },
[50] = { { LRADIANT , 1.00, 1.0 }, }, [55] = { { SBRILLIANT , 1.00, 1.0 }, },
[60] = { { LBRILLIANT , 0.99, 1.0 }, { NEXUS, 0.01, 1.0 }, },
[65] = { { LBRILLIANT , 0.99, 1.0 }, { NEXUS, 0.01, 1.0 }, },
[85] = { { SPRISMATIC , 0.99, 1.0 }, { NEXUS, 0.01, 1.0 }, },
[99] = { { SPRISMATIC , 0.99, 1.0 }, { VOID , 0.01, 1.0 }, },
[120] = { { LPRISMATIC , 0.99, 1.0 }, { VOID , 0.01, 1.0 }, },
},
[ARMOR] = {
[20] = { { SGLIMMERING, 1.00, 1.0 }, }, [25] = { { SGLIMMERING, 1.00, 1.0 }, },
[30] = { { LGLIMMERING, 1.00, 1.0 }, }, [35] = { { SGLOWING , 1.00, 1.0 }, },
[40] = { { LGLOWING , 1.00, 1.0 }, }, [45] = { { SRADIANT , 1.00, 1.0 }, },
[50] = { { LRADIANT , 1.00, 1.0 }, }, [55] = { { SBRILLIANT , 1.00, 1.0 }, },
[60] = { { LBRILLIANT , 0.99, 1.0 }, { NEXUS, 0.01, 1.0 }, },
[65] = { { LBRILLIANT , 0.99, 1.0 }, { NEXUS, 0.01, 1.0 }, },
[85] = { { SPRISMATIC , 0.99, 1.0 }, { NEXUS, 0.01, 1.0 }, },
[99] = { { SPRISMATIC , 0.99, 1.0 }, { VOID , 0.01, 1.0 }, },
[120] = { { LPRISMATIC , 0.99, 1.0 }, { VOID , 0.01, 1.0 }, },
},
},
[EPIC] = {
[WEAPON] = {
[45] = { { SRADIANT , 1.00, 3.5 }, }, [50] = { { LRADIANT , 1.00, 3.5 }, },
[55] = { { SBRILLIANT, 1.00, 3.5 }, }, [60] = { { NEXUS , 1.00, 1.0 }, },
[65] = { { NEXUS , 1.00, 1.0 }, }, [85] = { { NEXUS , 1.00, 1.0 }, },
[99] = { { VOID , 1.00, 1.0 }, }, [120] = { { VOID , 1.00, 1.5 }, },
},
[ARMOR] = {
[45] = { { SRADIANT , 1.00, 3.5 }, }, [50] = { { LRADIANT , 1.00, 3.5 }, },
[55] = { { SBRILLIANT, 1.00, 3.5 }, }, [60] = { { NEXUS , 1.00, 1.0 }, },
[65] = { { NEXUS , 1.00, 1.0 }, }, [85] = { { NEXUS , 1.00, 1.0 }, },
[99] = { { VOID , 1.00, 1.0 }, }, [120] = { { VOID , 1.00, 1.5 }, },
},
},
}
----------------------------------------
local watchList = {
-- 10-19 weapons
[1935] = 1500000, -- Assassin's Blade
[1482] = 1300000, -- Shadowfang
[890] = 360000, -- Twisted Chanter's Staff
[2567] = 350000, -- Evocator's Blade
[1318] = 340000, -- Night Reaver
[1484] = 300000, -- Witching Stave
-- 10-19 armor
[2059] = 510000, -- Sentry Cloak
[8350] = 490000, -- The 1 Ring
[1486] = 490000, -- Tree Bark Jacket
[1121] = 400000, -- Feet of the Lynx
[12977] = 300000, -- Magefist Gloves
-- 20-29 weapons
[776] = 920000, -- Vendetta
[4454] = 490000, -- Talon of Vultros
[8226] = 450000, -- The Butcher
[4446] = 410000, -- Blackvenom Blade
[13033] = 400000, -- Zealot Blade
[3413] = 390000, -- Doomspike
[7730] = 300000, -- Cobalt Crusher
-- 20-29 armor
[9491] = 630000, -- Hotshot Pilot's Gloves
[2264] = 780000, -- Mantle of Thieves
[1978] = 530000, -- Wolfclaw Gloves
[2039] = 500000, -- Plains Ring
[9510] = 410000, -- Caverndeep Trudgers
[13108] = 400000, -- Tigerstrike Mantle
[2278] = 390000, -- Forest Tracker Epaulets
[2292] = 390000, -- Necrology Robes
[9509] = 370000, -- Petrolspill Leggings
[1491] = 360000, -- Ring of Precision
[7728] = 320000, -- Beguiler Robes
[12998] = 300000, -- Magician's Mantle
-- 30-39 weapons
[873] = 2300000, -- Staff of Jordan
[2825] = 1200000, -- Bow of Searing Arrows
[870] = 1200000, -- Fiery War Axe
[9425] = 1100000, -- Pendulum of Doom
[869] = 1000000, -- Dazzling Longsword
[1982] = 1000000, -- Nightblade
[9424] = 580000, -- Ginn-su Sword
[868] = 550000, -- Ardent Custodian
[9426] = 430000, -- Monolithic Bow
[9718] = 410000, -- Reforged Blade of Heroes
[8223] = 390000, -- Blade of the Basilisk
[13034] = 380000, -- Speedsteel Rapier
[9384] = 380000, -- Stonevault Shiv
[9392] = 330000, -- Annealed Blade
[10570] = 320000, -- Manslayer
[6327] = 320000, -- The Pacifier
[13064] = 300000, -- Jaina's Firestarter
[5756] = 300000, -- Sliverblade
-- 30-39 armor
[10583] = 1500000, -- Quillward Harness
[2955] = 1400000, -- First Mate Hat
[867] = 1100000, -- Gloves of Holy Might
[9429] = 1100000, -- Miner's Hat of the Deep
[1981] = 930000, -- Icemail Jerkin
[7755] = 740000, -- Flintrock Shoulders
[10574] = 660000, -- Corpseshroud
[5257] = 540000, -- Dark Hooded Cape
[9420] = 510000, -- Adventurer's Pith Helmet
[10328] = 500000, -- Scarlet Chestpiece
[1204] = 490000, -- The Green Tower
[9431] = 410000, -- Papal Fez
[1980] = 400000, -- Underworld Band
[9396] = 370000, -- Legguards of the Vault
[10332] = 370000, -- Scarlet Boots
[13110] = 360000, -- Wolffear Harness
[1718] = 350000, -- Basilisk Hide Pants
[2277] = 350000, -- Necromancer Leggings
[2951] = 350000, -- Ring of the Underwood
[9375] = 320000, -- Expert Goldminer's Helmet
[10581] = 310000, -- Death's Head Vestment
[13117] = 300000, -- Ogron's Sash
[13084] = 300000, -- Kaleidoscope Chain
}
----------------------------------------
-- calculate value of a stack of reagents based on
-- auctioneer data and price tables above
local getReagentValue = function(itemID, itemCount)
local upperLimit = priceUpperLimit[itemID]
local adjust = priceAdjustment[itemID] or 1
if not upperLimit then return nil end
local median, snapshot, snapshotCount = nil, nil, nil
local _, link = GetItemInfo(itemID)
if link then
local key = Auctioneer.ItemDB.CreateItemKeyFromLink(link)
if key then
median = Auctioneer.Statistic.GetItemHistoricalMedianBuyout(key)
snapshot, snapshotCount = Auctioneer.Statistic.GetItemSnapshotMedianBuyout(key)
end
end
median = median or upperLimit
snapshot = snapshot or upperLimit
snapshotCount = snapshotCount or 1
median = math.min(median, upperLimit)
snapshot = math.min(snapshot, upperLimit)
local snapshotWeight = 0
if snapshotCount >= 5 and snapshot < median then
snapshotWeight = math.log10(snapshotCount) / math.log10(20)
end
snapshotWeight = math.min(math.max(snapshotWeight, 0), 1)
local medianWeight = 1 - snapshotWeight
local combined = median * medianWeight + snapshot * snapshotWeight
return combined * adjust * itemCount
end
-- take an ilevel and round it up to the corresponding bracket
local roundupLevel = function(level)
for _, bracket in pairs(levelUpperBounds) do
if bracket >= level then
return bracket
end
end
return nil
end
-- get entry from disenchant table (or nil if nothing found)
local getDisenchants = function(quality, type, level)
if disenchantTable[quality] and disenchantTable[quality][type] and disenchantTable[quality][type][level] then
return disenchantTable[quality][type][level]
end
return nil
end
-- calculate disenchant value of item based on disenchant table and
-- calculated reagent values
local getDisenchantValue = function(itemID)
local result = nil
local _, _, quality, level, _, typeString, _, _, _, _ = GetItemInfo(itemID)
if quality >= UNCOMMON and quality <= EPIC and not badItem[itemID] then
local type = typeStringToType[typeString]
if type then
level = roundupLevel(level)
if level then
local disenchants = getDisenchants(quality, type, level)
if disenchants then
result = 0
for _, stats in pairs(disenchants) do
local reagent, chance, count = stats[1], stats[2], stats[3]
result = result + getReagentValue(reagent, chance * count)
end
end
end
end
end
return result
end
--------------------------------------------------------------------------------
-- now decide what to do with the auction
-- min profit for bid
local bidMinProfitRel = 0.25
local bidMinProfitAbs = 5000
-- min profit for buy
local buyMinProfitRel = 0.25
local buyMinProfitAbs = 5000
-- if buyout is close enough to low enough bid, just buy it anyway
local buyMaxBidNear = 0.01
-- adjust low bids upwards, but no closer to maximum bid than this
local bidLess = 0.20
-- assume item is worthless until proven otherwise
basePrice = 0
-- calculate disenchant value or reagent value depending on the type of item
local disenchantValue = getDisenchantValue(itemID)
if disenchantValue then
basePrice = disenchantValue
reason = "Disenchant"
depositCost = 0
depositRate = 0
else
local reagentValue = getReagentValue(itemID, itemCount)
if reagentValue then
basePrice = reagentValue
reason = "Reagent"
depositCost = 0
depositRate = 0
end
end
-- account for AH cut
local resaleValue = basePrice * 0.95
-- decide whether or not to buy
local buyMaxRel = resaleValue * (1 - buyMinProfitRel)
local buyMaxAbs = resaleValue - buyMinProfitAbs
local bidMaxRel = resaleValue * (1 - bidMinProfitRel)
local bidMaxAbs = resaleValue - bidMinProfitAbs
if watchList[itemID] then
basePrice = watchList[itemID]
local bidMax = basePrice * 0.85
if buyPrice ~= 0 and buyPrice <= bidMax then
action = "buy"
reason = "Watch List"
elseif bidPrice ~= 0 and bidPrice <= bidMax then
action = "bid"
reason = "Watch List"
end
else
if buyPrice ~= 0 and buyPrice <= buyMaxRel and buyPrice <= buyMaxAbs then
action = "buy"
reason = reason .. " (buy)"
elseif bidPrice ~= 0 and bidPrice <= bidMaxRel and bidPrice <= bidMaxAbs then
if buyPrice ~= 0 and bidPrice >= buyPrice * (1 - buyMaxBidNear) then
action = "buy"
reason = reason .. " (buy near bid)"
else
action = "bid"
reason = reason .. " (bid, orig = " .. bidPrice .. ")"
local bidRelUp = (resaleValue * (1 - bidMinProfitRel)) * (1 - bidLess)
local bidAbsUp = (resaleValue - bidMinProfitAbs) * (1 - bidLess)
bidPrice = math.max(bidPrice, math.min(bidRelUp, bidAbsUp))
end
end
endPosted By: gnarl
I'm testing out Chardonay's baserule now...the only thing is that I want to change is that I just want to use the baseline prices from allakhazam all the time (not my auctioneer scan). Reason is that there are a lot a few people (probably using BTM on my server and they always post many stacks of 1 reagent wayyyy over an "allakhazam" median). Am I correct in thinking this is all I would need to modify in order to always use the allakhazam prices?
median = base
snapshot = base
median = median or base
snapshot = snapshot or base
snapshotCount = snapshotCount or 1
if median > base then median = base end
if snapshot > base then snapshot = base end
-- min profit for bid
local bidMinProfitRel = 0.25
local bidMinProfitAbs = 5000
-- min profit for buy
local buyMinProfitRel = 0.25
local buyMinProfitAbs = 5000
-- if buyout is close enough to low enough bid, just buy it anyway
local buyMaxBidNear = 0.01
-- adjust low bids upwards, but no closer to maximum bid than this
local bidLess = 0.20 if quality >= UNCOMMON and quality <= EPIC and not badItem[itemID] and level <= 99 then2. As far as I can tell, "time left" for an auction is not directly available inside a baserule. You might wanna add a trac ticket for this.
-- prevent equipable greens from showing up for resale and revaluate blue equipables with custom factor
local blueAdjust = 0.5 -- change this to change valuation e.g. 0.5 = 50% lower basePrice than auctioneer would use
local _,_, quality, _, _, class, _,_,_ = GetItemInfo(itemID)
if (quality==2 and (class =="Weapon" or class == "Armor"))
then
basePrice = 0
elseif (quality==3 and (class =="Weapon" or class == "Armor"))
then
basePrice = basePrice * blueAdjust
end
), auctioneers shows it as "Valuation (custom)" BUT.. it also changes the valuation on the watchlist items. It doesn't really matter since the baserule will still prompt to buy them (made another quick 30G on a watchlist item today, thx Chardonnay) but it does look silly when it says 'buyout item xx at 25G?' 'valuated at 15g'. So I tried two things, one was to simply put the whole expression into the watchlist bit, i.e. if watchlist[itemID] then etc,.. else see code above, but that didn't work, I think because there is already an if.. else in there.
local blueAdjust = 0.5
local _,_, quality, _, _, class, _,_,_ = GetItemInfo(itemID)
if (quality==2 and (class =="Weapon" or class == "Armor"))
then
basePrice = 0
elseif (not watchList[itemID] and (quality==3 and (class =="Weapon" or class == "Armor")))
then
basePrice = basePrice * blueAdjust
end
elseif (not watchList[itemID]) and (quality==3 and (class =="Weapon" or class == "Armor"))
if quality >= UNCOMMON and quality <= EPIC and not badItem[itemID] and level <= 99 then-- assume item is worthless until proven otherwise
basePrice = 0
-- calculate disenchant value or reagent value depending on the type of item
etc.-- assume item is worthless until proven otherwise
myBasePrice = 0
-- calculate disenchant value or reagent value depending on the type of item
local disenchantValue = getDisenchantValue(itemID)
if disenchantValue then
myBasePrice = disenchantValue
reason = "Disenchant"
depositCost = 0
depositRate = 0
else
local reagentValue = getReagentValue(itemID, itemCount)
if reagentValue then
myBasePrice = reagentValue
reason = "Reagent"
depositCost = 0
depositRate = 0
end
end
-- account for AH cut
local resaleValue = myBasePrice * 0.95
basePrice = disenchantValue

Posted By: MartijnfThanks for the help Bishop! BTW since you haven't implemented the ' and level <= 99' into your baserule can I assume you've levelled your chanter to lvl 35?
-- assume item is worthless until proven otherwise
basePrice = 0 if quality >= UNCOMMON and quality <= EPIC and not badItem[itemID] and level >= 40 then [LASTRAL] = 1,
[LMAGIC] = 1,
[ARCANE] = 1,
[ILLUSION] = 1,Posted By: Martijnfwhat I think you could do is use the price adjustment system Chardonnay devised that is at the top, where it says for instance:[LASTRAL] = 1,
[LMAGIC] = 1,
[ARCANE] = 1,
[ILLUSION] = 1,
and simply set all the reagents that you don't want to get to 0, that way the baserule should valuate items that give that type of reagent to 0 value and shouldn't prompt you for buyout. That way you don't have to change anything to the code.

Started using BTM and Exchantrix since my enchanting lvl was pretty low then anyway, but it wasnt until I started using this baserule (last week or so) that the cash really started rolling in.-- I bid/buy, DE, list, all in one swell foop. Prices M-T on mats
-- are lower on my server than they are F-S, hence the lazy way
-- of toggling between the two.
-- local myDefaultPrice = 1 -- The weekend price.
local myDefaultPrice = 0.85 -- The weekday price.
local priceAdjustment = {
[VOID] = myDefaultPrice - 0.3,
[NEXUS] = myDefaultPrice - 0.3,
if (action ~= "bid" and action ~= "buy") then
basePrice = basePrice * 0.85
end
/btm mindeprofit FOOif (action ~= "bid" and action ~= "buy") then
basePrice = basePrice * 0.50
end --AH cut price
local myAHcut = 0.95 -- home/other AH cut
--local myAHcut = 0.85 -- neutral AH cut
local _,_, quality, level, _, class, _,_,_ = GetItemInfo(itemID)
local myCheapLPrism = myAHcut * 140000 --price I *know* I can sell L. and S. Prismatic Shards on
local myCheapSPrism = myAHcut * 50000 --weekends despite what current pricing data reflects
if (quality >= RARE and (class =="Weapon" or class == "Armor") and level > 84) then
if (quality >= RARE and (class =="Weapon" or class == "Armor") and level < 100) then
reason = "Cheap S.Prismatic"
basePrice = priceUpperLimit[SPRISMATIC]
myCheapPrism = myCheapSPrism
end
if (quality >= RARE and (class =="Weapon" or class == "Armor") and level > 99) then
reason = "Cheap L.Prismatic"
basePrice = priceUpperLimit[LPRISMATIC]
myCheapPrism = myCheapLPrism
end
if buyPrice <= myCheapPrism then
action = "buy"
elseif bidPrice <= myCheapPrism then
action = "bid"
end
end local disenchantValue = 0
if (Enchantrix and Enchantrix.Storage) then
local disenchantTo = Enchantrix.Storage.GetItemDisenchants(Enchantrix.Util.GetSigFromLink(itemLink), itemName, true)
if (disenchantTo and disenchantTo.totals and disenchantTo.totals.hspValue and iQual > 1 and iCount <= 1) then
disenchantValue = disenchantTo.totals.hspValue * disenchantTo.totals.conf
end
endlocal watchList = {
--[item] = price (copper)
--mine
[22829] = 20000, --Super Healing Potion
[22832] = 12000, -- Super Mana Potion
-- 10-19 Weps
[1935] = 1000000, -- Assassin's Blade
[1482] = 900000, -- Shadowfang
[890] = 250000, -- Twisted Chanter's Staff
-- 10-19 armor
[2059] = 510000, -- Sentry Cloak
[8350] = 490000, -- The 1 Ring
[1486] = 490000, -- Tree Bark Jacket
[1121] = 400000, -- Feet of the Lynx
[12977] = 300000, -- Magefist Gloves
-- 20-29 weapons
[776] = 920000, -- Vendetta
[4454] = 490000, -- Talon of Vultros
[8226] = 450000, -- The Butcher
[4446] = 410000, -- Blackvenom Blade
[13033] = 400000, -- Zealot Blade
[3413] = 390000, -- Doomspike
[7730] = 300000, -- Cobalt Crusher
-- 20-29 armor
[9491] = 630000, -- Hotshot Pilot's Gloves
[2264] = 780000, -- Mantle of Thieves
[1978] = 530000, -- Wolfclaw Gloves
[2039] = 500000, -- Plains Ring
[9510] = 410000, -- Caverndeep Trudgers
[13108] = 400000, -- Tigerstrike Mantle
[2278] = 390000, -- Forest Tracker Epaulets
[2292] = 390000, -- Necrology Robes
[9509] = 370000, -- Petrolspill Leggings
[1491] = 360000, -- Ring of Precision
[7728] = 320000, -- Beguiler Robes
[12998] = 300000, -- Magician's Mantle
-- 30-39 weapons
[873] = 2300000, -- Staff of Jordan
[2825] = 1200000, -- Bow of Searing Arrows
[870] = 1200000, -- Fiery War Axe
[9425] = 1100000, -- Pendulum of Doom
[869] = 1000000, -- Dazzling Longsword
[1982] = 1000000, -- Nightblade
[9424] = 580000, -- Ginn-su Sword
[868] = 550000, -- Ardent Custodian
[9426] = 430000, -- Monolithic Bow
[9718] = 410000, -- Reforged Blade of Heroes
[8223] = 390000, -- Blade of the Basilisk
[13034] = 380000, -- Speedsteel Rapier
[9384] = 380000, -- Stonevault Shiv
[9392] = 330000, -- Annealed Blade
[10570] = 320000, -- Manslayer
[6327] = 320000, -- The Pacifier
[13064] = 300000, -- Jaina's Firestarter
[5756] = 300000, -- Sliverblade
-- 30-39 armor
[10583] = 1500000, -- Quillward Harness
[2955] = 1400000, -- First Mate Hat
[867] = 1100000, -- Gloves of Holy Might
[9429] = 1100000, -- Miner's Hat of the Deep
[1981] = 930000, -- Icemail Jerkin
[7755] = 740000, -- Flintrock Shoulders
[10574] = 660000, -- Corpseshroud
[5257] = 540000, -- Dark Hooded Cape
[9420] = 510000, -- Adventurer's Pith Helmet
[10328] = 500000, -- Scarlet Chestpiece
[1204] = 490000, -- The Green Tower
[9431] = 410000, -- Papal Fez
[1980] = 400000, -- Underworld Band
[9396] = 370000, -- Legguards of the Vault
[10332] = 370000, -- Scarlet Boots
[13110] = 360000, -- Wolffear Harness
[1718] = 350000, -- Basilisk Hide Pants
[2277] = 350000, -- Necromancer Leggings
[2951] = 350000, -- Ring of the Underwood
[9375] = 320000, -- Expert Goldminer's Helmet
[10581] = 310000, -- Death's Head Vestment
[13117] = 300000, -- Ogron's Sash
[13084] = 300000, -- Kaleidoscope Chain
}
local minProfit = 20000 -- The minimum amount of profit. Multiply a number by 10,000 to get that number in gold.
local safety = 2 --Safety margin. This number represents the number of times you may have to put it up for auction before it sells.
local pctProfit = .2 -- The percentage (in decimal form) of the price of the item that must be profit
if (watchList[itemID] and buyPrice ~= 0 and buyPrice <= watchList[itemID]) then
action = "buy"
reason = "W-A-T-C-H L-I-S-T"
end
local _,_, quality, level, _, class, _,_, equip = GetItemInfo(itemID)
if ((quality<3 and auctSeen > 30) or (quality >= 3 and auctSeen > 5)) then
safety = (safety*depositCost)
basePrice=Auctioneer.Statistic.GetHSP(auctKey)
basePrice=basePrice * itemCount
if (((basePrice-buyPrice) > (minProfit+safety)) and (((basePrice-buyPrice)-safety) > (buyPrice*pctProfit))) then
action = "buy"
reason = "Buyout - " .. auctSeen .. " times seen."
elseif ((basePrice-bidPrice) > (minProfit+1+safety) and (((basePrice-bidPrice)-safety) > (bidPrice*pctProfit))) then
action ="bid"
reason = "Bid- " .. auctSeen .. " times seen."
else
action = "ignore"
reason = "Bad dealz"
end
else
action = "ignore"
reason = "Less than 20"
endAre these lines the same as "minprofit" and "pctprofit"?"
local getReagentValue = function(itemID, itemCount)
local upperLimit = priceUpperLimit[itemID]
local adjust = priceAdjustment[itemID] or 1
if not upperLimit then return nil end
-- ignore the middle
-- use upperLimit directly
return upperLimit * adjust * itemCount
endPosted By: Desolator
after saved the baserule i reloged and scaned AH, BTM popup me with this deal:
http://img53.imageshack.us/img53/9462/wowscrnshot060607094354st0.jpg

local watchList = {
--[item] = price (copper)
--mine
[24275] = 50000, -- Silver Spellthread
[22829] = 20000, --Super Healing Potion
[22832] = 12000, -- Super Mana Potion
[29425] = 10000, -- Mark of Kil'Hed???
-- 10-19 Weps
[1935] = 1000000, -- Assassin's Blade
[1482] = 900000, -- Shadowfang
[890] = 250000, -- Twisted Chanter's Staff
[2567] = 350000, -- Evocator's Blade
[1318] = 340000, -- Night Reaver
[1484] = 300000, -- Witching Stave
-- 10-19 armor
[2059] = 510000, -- Sentry Cloak
[8350] = 490000, -- The 1 Ring
[1486] = 490000, -- Tree Bark Jacket
[1121] = 400000, -- Feet of the Lynx
[12977] = 300000, -- Magefist Gloves
-- 20-29 weapons
[776] = 920000, -- Vendetta
[4454] = 490000, -- Talon of Vultros
[8226] = 450000, -- The Butcher
[4446] = 410000, -- Blackvenom Blade
[13033] = 400000, -- Zealot Blade
[3413] = 390000, -- Doomspike
[7730] = 300000, -- Cobalt Crusher
-- 20-29 armor
[9491] = 630000, -- Hotshot Pilot's Gloves
[2264] = 780000, -- Mantle of Thieves
[1978] = 530000, -- Wolfclaw Gloves
[2039] = 500000, -- Plains Ring
[9510] = 410000, -- Caverndeep Trudgers
[13108] = 400000, -- Tigerstrike Mantle
[2278] = 390000, -- Forest Tracker Epaulets
[2292] = 390000, -- Necrology Robes
[9509] = 370000, -- Petrolspill Leggings
[1491] = 360000, -- Ring of Precision
[7728] = 320000, -- Beguiler Robes
[12998] = 300000, -- Magician's Mantle
-- 30-39 weapons
[873] = 2300000, -- Staff of Jordan
[2825] = 1200000, -- Bow of Searing Arrows
[870] = 1200000, -- Fiery War Axe
[9425] = 1100000, -- Pendulum of Doom
[869] = 1000000, -- Dazzling Longsword
[1982] = 1000000, -- Nightblade
[9424] = 580000, -- Ginn-su Sword
[868] = 550000, -- Ardent Custodian
[9426] = 430000, -- Monolithic Bow
[9718] = 410000, -- Reforged Blade of Heroes
[8223] = 390000, -- Blade of the Basilisk
[13034] = 380000, -- Speedsteel Rapier
[9384] = 380000, -- Stonevault Shiv
[9392] = 330000, -- Annealed Blade
[10570] = 320000, -- Manslayer
[6327] = 320000, -- The Pacifier
[13064] = 300000, -- Jaina's Firestarter
[5756] = 300000, -- Sliverblade
-- 30-39 armor
[10583] = 1500000, -- Quillward Harness
[2955] = 1400000, -- First Mate Hat
[867] = 1100000, -- Gloves of Holy Might
[9429] = 1100000, -- Miner's Hat of the Deep
[1981] = 930000, -- Icemail Jerkin
[7755] = 740000, -- Flintrock Shoulders
[10574] = 660000, -- Corpseshroud
[5257] = 540000, -- Dark Hooded Cape
[9420] = 510000, -- Adventurer's Pith Helmet
[10328] = 500000, -- Scarlet Chestpiece
[1204] = 490000, -- The Green Tower
[9431] = 410000, -- Papal Fez
[1980] = 400000, -- Underworld Band
[9396] = 370000, -- Legguards of the Vault
[10332] = 370000, -- Scarlet Boots
[13110] = 360000, -- Wolffear Harness
[1718] = 350000, -- Basilisk Hide Pants
[2277] = 350000, -- Necromancer Leggings
[2951] = 350000, -- Ring of the Underwood
[9375] = 320000, -- Expert Goldminer's Helmet
[10581] = 310000, -- Death's Head Vestment
[13117] = 300000, -- Ogron's Sash
[13084] = 300000, -- Kaleidoscope Chain
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Change these variables
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local minProfit = 4.0 -- The minimum amount of profit in gold.
local safety = 2 --Safety margin. This number represents the number of times you may have to put it up for auction before it sells.
local pctProfit = 0.35 -- The percentage (in decimal form) of the price of the item that must be profit
local rareMinSeen = 5 -- Number of times that a rare or higher item should have been seen before considering it
local commonMinSeen = 30 -- Number of times that an uncommon or common item should have been seen before considering it
local maxPrice = 150 -- Maximum amount of gold per purchase
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Nothing else =D
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _,_, quality, level, _, class, _,_, equip = GetItemInfo(itemID)
if ((quality<3 and auctSeen > commonMinSeen) or (quality >= 3 and auctSeen > rareMinSeen)) then
minProfit = (minProfit*10000) -- Turn it into gold
maxPrice = (maxPrice*10000) -- Turn it into gold
safety = (safety*depositCost)
-- BasePrice will be the total amount this purchase will cost to buy
basePrice=Auctioneer.Statistic.GetHSP(auctKey)
basePrice=basePrice * itemCount
local bidProfit = (basePrice-bidPrice)
local buyProfit = (basePrice-buyPrice)
if (basePrice > maxPrice) then -- Cuts this if it would cost too much
action = "ignore"
reason = "Costs too much"
elseif (bidProfit > (minProfit+1+safety) and ((bidProfit-safety) > (bidPrice*pctProfit))) then
action ="bid"
reason = "Bid- " .. auctSeen .. " times seen."
--This checks to see whether it would be more advantageous to buyout rather than bid on an item. Checks if buyout would generate profit after safety.
if ((buyProfit > (minProfit+safety)) and ((buyProfit-safety) > (buyPrice*pctProfit)) and ((bidProfit < buyProfit) or (buyProfit > (bidProfit*0.85)))) then
action = "buy"
reason = "Buyout - " .. auctSeen .. " times seen. CTB." -- Close To Bid
end
elseif ((buyProfit > (minProfit+safety)) and ((buyProfit-safety) > (buyPrice*pctProfit))) then
action = "buy"
reason = "Buyout - " .. auctSeen .. " times seen."
else -- Only way it gets here is if the item doesn't match any of the conditions under which we would buy the item.
action = "ignore"
reason = "Bad dealz"
end
else
action = "ignore"
reason = "Not seen enough."
end
-- The Watchlist code. This ignores everything the goes on before it. If the thing is on the watchlist, it gets it.
if watchList[itemID] then
basePrice = watchList[itemID]
local bidMax = basePrice * 0.85
if buyPrice ~= 0 and (buyPrice / itemCount) <= bidMax then
action = "buy"
reason = "W-A-T-C-H L-I-S-T B-U-Y"
elseif bidPrice ~= 0 and (bidPrice / itemCount) <= bidMax then
action = "bid"
reason = "W-A-T-C-H L-I-S-T B-I-D"
end
basePrice = (basePrice / itemCount) -- Just makes it look right on the report screen
end