Skip to content

Instantly share code, notes, and snippets.

@Industrial
Created May 7, 2016 10:09
Show Gist options
  • Save Industrial/e999295370b38bb72e87007568fa91a6 to your computer and use it in GitHub Desktop.
Save Industrial/e999295370b38bb72e87007568fa91a6 to your computer and use it in GitHub Desktop.
local idTweaks = LibStub('AceAddon-3.0'):GetAddon('idTweaks')
local Automation = idTweaks:GetModule('Automation')
local SellGreyItemsModule = Automation:NewModule('SellGreyItems', 'AceConsole-3.0', 'AceEvent-3.0')
function SellGreyItemsModule:MERCHANT_SHOW()
ChatFrame1:AddMessage('MERCHANT_SHOW')
local link
for bag = 0, 4 do
for slot = 0, GetContainerNumSlots(bag) do
link = GetContainerItemLink(bag, slot)
if link and select(3, GetItemInfo(link)) == 0 then
ShowMerchantSellCursor(1)
UseContainerItem(bag, slot)
end
end
end
end
function SellGreyItemsModule:OnInitialize()
SellGreyItemsModule:RegisterEvent('MERHANT_SHOW')
end
function SellGreyItemsModule:OnEnable()
end
function SellGreyItemsModule:OnDisable()
end
Automation.SellGreyItems = SellGreyItemsModule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment