17 - Sell junk :)

First, I just want to express my great thanks for this add'on and I like to help as much as possible

not long ago installed this add'on on my wow (3.1) but there re some errors which forced me to modify the source code but after the server I play on upgraded to version 3.3.5a, I just want to give some help to enhance this add'on

Note: those my modification for 3.1 version it should work well for 3.3.5a

-- Declaration for var
local StartMoney = GetMoney() or 0

-- register close event  [ addon:OnEnable() ]

-- get current money [  addon:MERCHANT_SHOW()  ]
StartMoney = GetMoney() = 0

-- get final money and print message [ addon:MERCHANT_CLOSED() ]
function addon:MERCHANT_CLOSED() = GetMoney() - StartMoney
  self:PrintGold() = 0

--enhance gary (poor) item searching by using WoW Api
-- local found = string_find(item,"|cff9d9d9d")
local itemQuality = select(3, GetItemInfo(item))
local found = ( itemQuality == 0 )

I also recode [ addon:PrintGold() ] to print Lose or Gain message and color the money instead of words (gold, silver, copper)
function addon:PrintGold()
    local gained = true
    if == 0 then
    if ( < 0 ) then = 0 -
        gained = false

    local ret = ""
    local gold = floor( / (COPPER_PER_SILVER * SILVER_PER_GOLD));
    local silver = floor(( - (gold * COPPER_PER_SILVER * SILVER_PER_GOLD)) / COPPER_PER_SILVER);
    local copper = mod( COPPER_PER_SILVER);
    if gold > 0 then
        ret = gold.."|cffffd700g|r "
    if silver > 0 or gold > 0 then
        ret = ret..silver.."|cffc7c7cfs|r "
    ret = ret..copper.."|cffeda55fc|r."

    if gained == true then
        self:Print("SellJunk |cff00ff00GAINED|r : "..ret)
        self:Print("SellJunk |cffff0000LOST|r : "..ret)

Well; there are some lines I deleted but this is most of things; I'm looking forward to a new release

Wishes (currently trying to code it)
1- when calling destroy it destroys the lowest priced items
2- when calling destroy it shows a list of what will destroy first (can be disabled)
3- whenever action done related to money it will display message in chat window (like money spent for deposits in auction house, in flight ...)
4- track a history for incoming and outgoing money daily and weekly ... (just wanted to know everything about my money ^^ )

User When Change
CrazyBenny Aug 17, 2010 at 15:06 UTC Changed status from New to Declined
shobits1 Jul 22, 2010 at 10:35 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of CrazyBenny CrazyBenny Aug 17, 2010 at 15:06 UTC - 0 likes

    Thanks for the suggestions, but unfortunately I don't plan on implementing any of it for various reasons:

    1) Main function of this addon is to sell stuff, the 'destroy' option is only for emergency reasons and should be treated like that. I want to keep it as simple as possible. For your needs there is already alternative addon, maybe more than one (DropTheCheapestThing).
    2) ^
    3) For detailed cash flow, there are several addons already (Auditor) and prolly many more.
    4) ^

    And this addon is working fine without any modifications in latest WoW.

  • 1 comment


Last updated
Aug 17, 2010
Jul 22, 2010
Declined - We decided not to take action on this ticket.
Enhancement - A change which is intended to better the project in some way
Medium - Normal priority.

Reported by

Possible assignees