addon that adds only auction house messages to a chat pane :
to use it do the following
first put this in AuctionHouseMessages.toc
## Interface: 100260
## Title: AuctionHouseMessages
code.lua
and put this in code.lua
local function getAuctionTab()
local tabName = "AH"
for _,name in pairs(CHAT_FRAMES) do
local frame = _G[name]
if frame.name == tabName then
return frame
end
end
end
local function OnEvent(self, event, ...) -- self and event are always the first 2 arguments of OnEvent handler
local color = ChatTypeInfo["SYSTEM"]
local auctionTab = getAuctionTab()
if event == "AUCTION_HOUSE_SHOW_COMMODITY_WON_NOTIFICATION" then
local commodityName, commodityQuantity = ...
local message = "You won an auction for "..commodityName.." (x"..commodityQuantity..")"
auctionTab:AddMessage(message, color.r, color.g, color.b, color.id)
--print(message)
end
if event == "AUCTION_HOUSE_AUCTION_CREATED" then
auctionTab:AddMessage(ERR_AUCTION_STARTED, color.r, color.g, color.b, color.id)
--print("Create Fired")
end
if event == "AUCTION_HOUSE_SHOW_FORMATTED_NOTIFICATION" then
local auctionHouseNotification, formatArg = ...
auctionTab:AddMessage(ChatFrameUtil.GetAuctionHouseNotificationText(auctionHouseNotification, formatArg), color.r, color.g, color.b, color.id)
--print("Notify Fired", auctionHouseNotification, formatArg)
end
--print("Onevent Fired")
end
local f = CreateFrame("Frame")
f:RegisterEvent("AUCTION_HOUSE_SHOW_FORMATTED_NOTIFICATION")
f:RegisterEvent("AUCTION_HOUSE_AUCTION_CREATED")
f:RegisterEvent("AUCTION_HOUSE_SHOW_COMMODITY_WON_NOTIFICATION")
f:SetScript("OnEvent", OnEvent)
place them both ina folder named AuctionHouseMessages in wow
interface\addons\
lastly, make a chat pane called “AH”,and select it to show nothing
walla,now it will only have auction messages in chat panel “AH”