Register
Results 1 to 3 of 3
  1. #1
    Buttah's Avatar
    Posts
    14
    Reputation
    3
    Tagged in
    0 Posts
    Add to this user's reputation

    [code fix] Auctioneer ilevel + gear level fix.

    When Cataclysm came out Auctioneer, like any other add on, had its bugs.

    The newest version of Auctioneer has a few small issues but the biggest one in my opinion has to do with the general searching functionalities. With general search you can put filters to find what you're looking for. However, the current iteration of Auctioneer doesn't have items with ilvl higher then 300 or with level requirements higher then level 80. This is as easy as changing a few numbers in the LUA to have this fixed.

    First go to your world of warcraft directory

    Interface -> AddOns -> Auc-Advanced -> Modules -> Auc-Util-SearchUI -> FilterItemLevel.lua

    Open this file with notepad and search for the number 300. (ctrl+f) and every time you see the number 300 replace it with 475 or whatever ilvl number you'd like to use.

    If you'd prefer you can also copy and paste my directory. If you elect to use my code please verify that the version numbers are the same.

    Code:
    --[[
    	Auctioneer - Search UI - Filter IgnoreItemQuality
    	Version: 5.9.4960 (WhackyWallaby)
    	Revision: $Id: FilterItemLevel.lua 4432 2009-08-29 14:55:35Z dinesh $
    	URL: http://auctioneeraddon.com/
    
    	This is a plugin module for the SearchUI that assists in searching by refined parameters
    
    	License:
    		This program is free software; you can redistribute it and/or
    		modify it under the terms of the GNU General Public License
    		as published by the Free Software Foundation; either version 2
    		of the License, or (at your option) any later version.
    
    		This program is distributed in the hope that it will be useful,
    		but WITHOUT ANY WARRANTY; without even the implied warranty of
    		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    		GNU General Public License for more details.
    
    		You should have received a copy of the GNU General Public License
    		along with this program(see GPL.txt); if not, write to the Free Software
    		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    
    	Note:
    		This AddOn's source code is specifically designed to work with
    		World of Warcraft's interpreted AddOn system.
    		You have an implicit license to use this AddOn with these facilities
    		since that is its designated purpose as per:
    		http://www.fsf.org/licensing/license...preterIncompat
    --]]
    -- Create a new instance of our lib with our parent
    local lib, parent, private = AucSearchUI.NewFilter("ItemLevel")
    if not lib then return end
    local print,decode,_,_,replicate,empty,_,_,_,debugPrint,fill = AucAdvanced.GetModuleLocals()
    local get,set,default,Const = AucSearchUI.GetSearchLocals()
    lib.tabname = "ItemLevel"
    -- Set our defaults
    default("ignoreitemlevel.enable", false)
    
    local typename
    
    -- This function is automatically called when we need to create our search parameters
    function lib:MakeGuiConfig(gui)
    	if not typename then
    		typename = {GetAuctionItemClasses()}
    	end
    	-- Get our tab and populate it with our controls
    	local id = gui:AddTab(lib.tabname, "Filters")
    	gui:MakeScrollable(id)
    
    	-- Add the help
    	gui:AddSearcher("Item Level", "Filter out items based on their level and type", 600)
    	gui:AddHelp(id, "itemlevel filter",
    		"What does this filter do?",
    		"This filter provides the ability to filter out specific item types which are below a preset level threshold. It can selectively apply it's filters only for certain types of searches.")
    
    	gui:AddControl(id, "Header",     0,      "ItemLevel Filter Criteria")
    
    	gui:AddControl(id, "Checkbox",    0, 1,  "ignoreitemlevel.enable", "Enable ItemLevel filtering")
    	gui:AddControl(id, "Subhead",     0, "Filter for:")
    	for name, searcher in pairs(AucSearchUI.Searchers) do
    		if searcher and searcher.Search then
    			gui:AddControl(id, "Checkbox", 0, 1, "ignoreitemlevel.filter."..name, name)
    			gui:AddTip(id, "Filter Item Level when searching with "..name)
    			default("ignoreitemlevel.filter."..name, false)
    		end
    	end
    
    -- Assume valid minimum item level is 0 and valid max item level is 475.
    -- Configure slider controls to reflect this range of values.
    -- See norganna.org JIRA ASER-106 and ASER-132 for additional info about this value range.
    	gui:AddControl(id, "Subhead",     0,  "Minimum itemLevels by Type")
    	for i = 1, #typename do
    		default("ignoreitemlevel.minlevel."..typename[i], 61)
    		gui:AddControl(id, "WideSlider",   0, 1, "ignoreitemlevel.minlevel."..typename[i], 0, 475, 1, "Min iLevel for "..typename[i]..": %s")
    	end
    end
    
    --lib.Filter(item, searcher)
    --This function will return true if the item is to be filtered
    --Item is the itemtable, and searcher is the name of the searcher being called. If searcher is not given, it will assume you want it active.
    function lib.Filter(item, searcher)
    	if not typename then
    		typename = {GetAuctionItemClasses()}
    	end
    
    	if (not get("ignoreitemlevel.enable"))
    			or (searcher and (not get("ignoreitemlevel.filter."..searcher))) then
    		return
    	end
    
    	local itype = item[Const.ITYPE]
    	local ilevel = item[Const.ILEVEL]
    
    	local minlevel = get("ignoreitemlevel.minlevel."..itype)
    	if not ilevel then
    		return true, "Error: no ilevel"
    	elseif not minlevel then
    		return true, "Error: no min level set for "..itype
    	elseif ilevel < minlevel then
    		return true, "ItemLevel too low"
    	end
    end
    
    AucAdvanced.RegisterRevision("$URL: http://svn.norganna.org/auctioneer/b...rItemLevel.lua $", "$Rev: 4432 $")
    Once you are finished with this one save the changes and exit the file. Next you're going to need to navigate to

    Interface -> AddOns -> Auc-Advanced -> Modules -> Auc-Util-SearchUI -> SearcherGeneral.lua

    Once here do the same as above. Search (ctrl+f) for the number 300 and change every instance to 475 or whatever you'd like. You should have to change the number 300 twice.

    When finished with the 300 go back to the start and this time search for 80. You should again find two times the number 80, simply change that to 85 and save the file. Again, if you'd like to use my code please verify that you have the same version number.

    Code:
    --[[
    	Auctioneer - Search UI - Searcher General
    	Version: 5.9.4960 (WhackyWallaby)
    	Revision: $Id: SearcherGeneral.lua 4446 2009-09-13 09:33:34Z brykrys $
    	URL: http://auctioneeraddon.com/
    
    	This is a plugin module for the SearchUI that assists in searching by refined paramaters
    
    	License:
    		This program is free software; you can redistribute it and/or
    		modify it under the terms of the GNU General Public License
    		as published by the Free Software Foundation; either version 2
    		of the License, or (at your option) any later version.
    
    		This program is distributed in the hope that it will be useful,
    		but WITHOUT ANY WARRANTY; without even the implied warranty of
    		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    		GNU General Public License for more details.
    
    		You should have received a copy of the GNU General Public License
    		along with this program(see GPL.txt); if not, write to the Free Software
    		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    
    	Note:
    		This AddOn's source code is specifically designed to work with
    		World of Warcraft's interpreted AddOn system.
    		You have an implicit license to use this AddOn with these facilities
    		since that is its designated purpose as per:
    		http://www.fsf.org/licensing/licenses/gpl-faq.html#InterpreterIncompat
    --]]
    -- Create a new instance of our lib with our parent
    local lib, parent, private = AucSearchUI.NewSearcher("General")
    if not lib then return end
    local print,decode,_,_,replicate,empty,_,_,_,debugPrint,fill = AucAdvanced.GetModuleLocals()
    local get,set,default,Const = AucSearchUI.GetSearchLocals()
    lib.tabname = "General"
    
    function private.getTypes()
    	if not private.typetable then
    		private.typetable = {GetAuctionItemClasses()}
    		table.insert(private.typetable,1, "All")
    	end
    	return private.typetable
    end
    
    function private.getSubTypes()
    	local subtypetable, typenumber
    	local typename = get("general.type")
    	local typetable = private.getTypes()
    	if typename ~= "All" then
    		for i, j in pairs(typetable) do
    			if j == typename then
    				typenumber = i
    				break
    			end
    		end
    	end
    	if typenumber then
    		subtypetable = {GetAuctionItemSubClasses(typenumber-1)}-- subtract 1 because 1 is the "All" category
    		table.insert(subtypetable, 1, "All")
    	else
    		subtypetable = {[1]="All"}
    	end
    	return subtypetable
    end
    
    function private.getQuality()
    	return {
    			{-1, "All"},
    			{0, "Poor"},
    			{1, "Common"},
    			{2, "Uncommon"},
    			{3, "Rare"},
    			{4, "Epic"},
    			{5, "Legendary"},
    			{6, "Artifact"},
    		}
    end
    
    function private.getTimeLeft()
    	return {
    			{0, "Any"},
    			{1, "less than 30 min"},
    			{2, "2 hours"},
    			{3, "12 hours"},
    			{4, "48 hours"},
    		}
    end
    
    -- Set our defaults
    default("general.name", "")
    default("general.name.exact", false)
    default("general.name.regexp", false)
    default("general.name.invert", false)
    default("general.type", "All")
    default("general.subtype", "All")
    default("general.quality", -1)
    default("general.timeleft", 0)
    default("general.ilevel.min", 0)
    default("general.ilevel.max", 475)
    default("general.ulevel.min", 0)
    default("general.ulevel.max", 85)
    default("general.seller", "")
    default("general.seller.exact", false)
    default("general.seller.regexp", false)
    default("general.seller.invert", false)
    default("general.minbid", 0)
    default("general.minbuy", 0)
    default("general.maxbid", 999999999)
    default("general.maxbuy", 999999999)
    
    -- This function is automatically called when we need to create our search generals
    function lib:MakeGuiConfig(gui)
    	-- Get our tab and populate it with our controls
    	local id = gui:AddTab(lib.tabname, "Searchers")
    
    	-- Add the help
    	gui:AddSearcher("General", "Search for items by general properties such as name, level etc", 100)
    	gui:AddHelp(id, "general searcher",
    		"What does this searcher do?",
    		"This searcher provides the ability to search for specific items that are in the scan database by name, level, type, subtype, seller, price, timeleft and other similar generals.")
    
    	gui:MakeScrollable(id)
    	gui:AddControl(id, "Header",     0,      "Search criteria")
    
    	local last = gui:GetLast(id)
    	gui:SetControlWidth(0.35)
    	gui:AddControl(id, "Text",       0,   1, "general.name", "Item name")
    	local cont = gui:GetLast(id)
    	gui:SetLast(id, last)
    	gui:AddControl(id, "Checkbox",   0.11, 0, "general.name.exact", "Exact")
    	gui:SetLast(id, last)
    	gui:AddControl(id, "Checkbox",   0.21, 0, "general.name.regexp", "Regexp")
    	gui:SetLast(id, last)
    	gui:AddControl(id, "Checkbox",   0.35, 0, "general.name.invert", "Invert")
    
    	gui:SetLast(id, cont)
    	last = cont
    
    	gui:AddControl(id, "Note",       0.0, 1, 100, 14, "Type:")
    	gui:AddControl(id, "Selectbox",   0.0, 1, private.getTypes, "general.type", "ItemType")
    	gui:SetLast(id, last)
    	gui:AddControl(id, "Note",       0.3, 1, 100, 14, "SubType:")
    	gui:AddControl(id, "Selectbox",   0.3, 1, private.getSubTypes, "general.subtype", "ItemSubType")
    	gui:SetLast(id, last)
    	gui:AddControl(id, "Note",       0.7, 1, 100, 14, "TimeLeft:")
    	gui:AddControl(id, "Selectbox",  0.7, 1, private.getTimeLeft(), "general.timeleft", "TimeLeft")
    
    	gui:AddControl(id, "Note",       0.0, 1, 100, 14, "Quality:")
    	gui:AddControl(id, "Selectbox",   0.0, 1, private.getQuality(), "general.quality", "ItemQuality")
    
    	last = gui:GetLast(id)
    	gui:SetControlWidth(0.37)
    	gui:AddControl(id, "NumeriSlider",     0,   1, "general.ilevel.min", 0, 475, 1, "Min item level")
    	gui:SetControlWidth(0.37)
    	gui:AddControl(id, "NumeriSlider",     0,   1, "general.ilevel.max", 0, 475, 1, "Max item level")
    	cont = gui:GetLast(id)
    
    	gui:SetLast(id, last)
    	gui:SetControlWidth(0.17)
    	gui:AddControl(id, "NumeriSlider",     0.6, 0, "general.ulevel.min", 0, 85, 1, "Min user level")
    	gui:SetControlWidth(0.17)
    	gui:AddControl(id, "NumeriSlider",     0.6, 0, "general.ulevel.max", 0, 85, 1, "Max user level")
    
    	gui:SetLast(id, cont)
    
    	last = gui:GetLast(id)
    	gui:SetControlWidth(0.35)
    	gui:AddControl(id, "Text",       0,   1, "general.seller", "Seller name")
    	cont = gui:GetLast(id)
    	gui:SetLast(id, last)
    	gui:AddControl(id, "Checkbox",   0.13, 0, "general.seller.exact", "Exact")
    	gui:SetLast(id, last)
    	gui:AddControl(id, "Checkbox",   0.23, 0, "general.seller.regexp", "Regexp")
    	gui:SetLast(id, last)
    	gui:AddControl(id, "Checkbox",   0.37, 0, "general.seller.invert", "Invert")
    
    	gui:SetLast(id, cont)
    	gui:AddControl(id, "MoneyFramePinned", 0, 1, "general.minbid", 0, 999999999, "Minimum Bid")
    	gui:SetLast(id, cont)
    	gui:AddControl(id, "MoneyFramePinned", 0.5, 1, "general.minbuy", 0, 999999999, "Minimum Buyout")
    	last = gui:GetLast(id)
    	gui:AddControl(id, "MoneyFramePinned", 0, 1, "general.maxbid", 0, 999999999, "Maximum Bid")
    	gui:SetLast(id, last)
    	gui:AddControl(id, "MoneyFramePinned", 0.5, 1, "general.maxbuy", 0, 999999999, "Maximum Buyout")
    end
    
    function lib.Search(item)
    	private.debug = ""
    	if private.NameSearch("name", item[Const.NAME])
    			and private.TypeSearch(item[Const.ITYPE], item[Const.ISUB])
    			and private.TimeSearch(item[Const.TLEFT])
    			and private.QualitySearch(item[Const.QUALITY])
    			and private.LevelSearch("ilevel", item[Const.ILEVEL])
    			and private.LevelSearch("ulevel", item[Const.ULEVEL])
    			and private.NameSearch("seller", item[Const.SELLER])
    			and private.PriceSearch("Bid", item[Const.PRICE])
    			and private.PriceSearch("Buy", item[Const.BUYOUT]) then
    		return true
    	else
    		return false, private.debug
    	end
    end
    
    function private.LevelSearch(levelType, itemLevel)
    	local min = get("general."..levelType..".min")
    	local max = get("general."..levelType..".max")
    
    	if itemLevel < min then
    		private.debug = levelType.." too low"
    		return false
    	end
    	if itemLevel > max then
    		private.debug = levelType.." too high"
    		return false
    	end
    	return true
    end
    
    function private.NameSearch(nametype,itemName)
    	local name = get("general."..nametype)
    
    	-- If there's no name, then this matches
    	if not name or name == "" then
    		return true
    	end
    
    	-- Lowercase the input
    	name = name:lower()
    	itemName = itemName:lower()
    
    	-- Get the matching options
    	local nameExact = get("general."..nametype..".exact")
    	local nameRegexp = get("general."..nametype..".regexp")
    	local nameInvert = get("general."..nametype..".invert")
    
    	-- if we need to make a non-regexp, exact match:
    	if nameExact and not nameRegexp then
    		-- If the name matches or we are inverted
    		if name == itemName and not nameInvert then
    			return true
    		elseif name ~= itemName and nameInvert then
    			return true
    		end
    		private.debug = nametype.." is not exact match"
    		return false
    	end
    
    	local plain, text
    	text = name
    	if not nameRegexp then
    		plain = 1
    	elseif nameExact then
    		text = "^"..name.."$"
    	end
    
    	local matches = itemName:find(text, 1, plain)
    	if matches and not nameInvert then
    		return true
    	elseif not matches and nameInvert then
    		return true
    	end
    	private.debug = nametype.." does not match critia"
    	return false
    end
    
    function private.TypeSearch(itype, isubtype)
    	local searchtype = get("general.type")
    	if searchtype == "All" then
    		return true
    	elseif searchtype == itype then
    		local searchsubtype = get("general.subtype")
    		if searchsubtype == "All" then
    			return true
    		elseif searchsubtype == isubtype then
    			return true
    		else
    			private.debug = "Wrong Subtype"
    			return false
    		end
    	else
    		private.debug = "Wrong Type"
    		return false
    	end
    end
    
    function private.TimeSearch(iTleft)
    	local tleft = get("general.timeleft")
    	if tleft == 0 then
    		return true
    	elseif tleft == iTleft then
    		return true
    	else
    		private.debug = "Time left wrong"
    		return false
    	end
    end
    
    function private.QualitySearch(iqual)
    	local quality = get("general.quality")
    	if quality == -1 then
    		return true
    	elseif quality == iqual then
    		return true
    	else
    		private.debug = "Wrong Quality"
    		return false
    	end
    end
    
    function private.PriceSearch(buybid, price)
    	local minprice, maxprice
    	if buybid == "Bid" then
    		minprice = get("general.minbid")
    		maxprice = get("general.maxbid")
    	else
    		minprice = get("general.minbuy")
    		maxprice = get("general.maxbuy")
    	end
    	if (price <= maxprice) and (price >= minprice) then
    		return true
    	elseif price < minprice then
    		private.debug = buybid.." price too low"
    	else
    		private.debug = buybid.." price too high"
    	end
    	return false
    end
    AucAdvanced.RegisterRevision("$URL: http://svn.norganna.org/auctioneer/branches/5.9/Auc-Util-SearchUI/SearcherGeneral.lua $", "$Rev: 4446 $")

    Once you've changed these few numbers Auctioneer will show in game the changes.

    There are several great things that general search can be used for. To name a few, searching for a specific persons sells ( competition ) or looking for a specific item that is in more than one name ( look up uncut jasper instead of the huge amount of cut ones.)

    This has made me close to 150k gold since cataclysm has launched. I have the options preset to search for all weapons / armor that is level 85 and epic. As soon as I do my search I go to the general search option and search. I've found several 85 epics that sell for 30,000 gold posted for unbelievable prices with out having to worry about having any of them on my snatch list.
    "I'm a leaf in the wind - Watch how I soar!"

    A million cool / nerd points for whomever knows where this quote originated with out Google.

  2. #2
    Namssob's Avatar
    Posts
    1,485
    Reputation
    123
    Blog Entries
    1
    Tagged in
    454 Posts
    Add to this user's reputation
    Won't they just put this into the next release? And are you sure the code changes you made, above, don't send my login ID and password to you via the internet? LOL - ok that last part was my attempt at being funny.... ;-)
    How To: Create And Sell Profession Kits ---- MoP Shuffle Flowchart ---- Article: A Case For Dual Gathering
    "Never underestimate the sheer amount of derp the majority of WOW's playerbase possesses." -- Belrandir
    "They could have offered me free ERPing in Goldshire with real women over Skype for the next year and I would have passed." -- Zerohour
    "Scissors are OP. Rock is fine." --Paper

  3. #3
    Buttah's Avatar
    Posts
    14
    Reputation
    3
    Tagged in
    0 Posts
    Add to this user's reputation
    It will most likely be in the next release but isn't currently available, which is why I posted this now. I've been using this since cataclysm release and it's a really nice feature to have.
    "I'm a leaf in the wind - Watch how I soar!"

    A million cool / nerd points for whomever knows where this quote originated with out Google.

 

 

Similar Threads

  1. Game client isn't asking for authenticator code?
    By Honestmoney in forum Archive (General)
    Replies: 21
    Last Post: June 19th, 2011, 12:28 AM
  2. High Level View of Mats for New 4.2 Crafted Gear
    By Drrwho in forum Archive (Speculation)
    Replies: 5
    Last Post: May 23rd, 2011, 04:16 PM