Peddler

Peddler simply allows you to flag items that you plan to sell, automatically selling them later when you interact with a vendor. It automatically flags gray items you loot to be sold, but you're free to un-flag them.

While going back to complete low-level quests with regards to getting a few quest achievements, I found my bags full of green quest rewards that I would try to sell whenever I could. However, after leaving a vendor I would notice that I'd missed one or two items; I made this addon so that I could immediately mark the newly received items without having to scour my bags for them later on!

Usage

CTRL+Right-click on an item in your inventory and it will be flagged for peddling at your next trip to a vendor! A small set of coins appears in the item's icon to highlight that it will be automatically sold.

/peddler displays the interface's options:

Modifier Key - allows the user to change the marking modifier from the CTRL-key.

Sell Limit - toggles whether or not Peddler should sell items in sets of 12, allowing the user to buyback any mistakenly marked items.

Silent Mode - toggles whether or not Peddler will print anything to the chat-log when selling items.

4.7:

- No longer attempts to use remaining unsold items if you leave the merchant before all items are sold!

4.6:

- Inventorian support added.
- LiteBag support added.
- Attempt to account for the new item-usage limit to alleviate "This Item is in Use" errors when selling lots of items at once.

4.5:

- Updated to work with ArkInventory's new scrolling frame.
- Slight adjustment to Adibag's bag-count.

4.4:

- ElvUI bag support implemented!

4.3:

- Just updating the version number...

4.2:

- Added support for DerpyStuffing bags!

4.1:

- Extra support for cargBags_naviya MoP update.
- The sale summary can now be toggled independently of the Silent Mode.

- An option for toggling unwanted items for your class has been added. As per usual, items which are automatically marked via this option CAN be unmarked with CTRL-Rightclick (or whichever modifier key you're using).

- Improved default WoW bag support, with regards to only opening a few bags at a time.
- Improved AdiBags support.

2.6:

- Added an options panel.
- Removed command-line options.
- Peddler's options are now account-wide, rather than character specific. This probably means you'll need to go into the options and configure them to your liking again, sorry! At least you won't need to do that on every character anymore. :)

2.5:

- Fixed AdiBags support (now correctly displays coins on all (?) items).
- A 'sellLimit' command has been added, allowing the user to limit sales to 12, meaning one can safely use the addon and buyback anything they may have accidentally sold.

2.4:

- The modifier key can now be changed from the CTRL default via the command "/peddler modifier CTRL/Shift/ALT".

- Chat output when peddling wares will no longer be larger than the chat log!

1.8:

- Now automatically marks gray items for sale!

1.7:

- Baggins: Should now correctly draw all coins in the correct places, even while looting items with the bags closed.

1.6:

- Baggins: Coin textures now redraw correctly on the correct items when new items are added to the inventory.
- All bag addons now correctly remember your marked items after relogging.

1.5:

- Phew! Fixed the bug where coins wouldn't move when moving a tagged item.
- Tagged items are now remembered even after relogging!
- All items of a given type are sold at once (e.g. choosing to sell one stack of linen cloth will mark and sell them all)
- The above changes mean that I have to write bag addon-specific code, and I took some of the most popular ones to begin with: Baggins, Bagnon, Combuctor, OneBag3, as well as the default WoW bags are all supported.

1.4:

- Errors are no longer caused by CTRL-Rightclicking an empty bag slot.
- Items that cannot be sold cannot be peddled!
- Tried to remember flagged items after relogging, but failed completely. :(

1.3:

- Added item-count and currency colours to the output.

1.2:

- Tried to make the coin icon a bit more recognisable.
- Added an output of what Peddler has been selling and for how much.

1.1:

- Moved Peddler into a folder to make 'installation' all that much sweeter!

It seems that a lot of these 'nice-to-have' features are all currently "impossible" for me to implement simply due to the complexity of having to draw a small icon on the items that would be automatically sold... is the visual reminder a necessity? Then the items to be automatically sold could be remembered through re-logging, items could be moved in the bags without the error of the icon staying behind, I wouldn't have to add additional implementation for every bag addon around, and I could focus a lot more on getting various automatic features such as marking all gray items and low-level green quest-rewards, etc.

How important is that stack of coins on each item in the bags vs. less bugs and more features?

In my opinion the visual aid on each icon is what makes this stand out.

I currently use an addon called Scrap from Curse, it does things similar to what you want to do.
It has a keybind that you can use to mark items for vendoring, HOWEVER, it has no visual aid for it.

After a long day of leveling I have maybe 90 slots of stuff, I've marked items for vendoring while I play, but at the end of the day I have no way to see what is marked and what is not. (Atleast I haven't found it.)

This is where I see the huge potential of your addon, open my bags and voilą, easy to spot what is marked and what is not.

Is manipulating the border the same hazzle as manipulating the icon?
If not, maybe a certain border color could indicate an item marked.

Or a list of items, wouldn't be as easy to match with items in the bags, but maybe more simple to implement.

This sounds like a great addon and something I have often wished for when doing my leveling.

Perhaps it would be easier to use Blizzards already coded ability to "highlight" an item (box) in a particular color.

Here is my wish list:

1. Any item I want to sell would be highlighted in Gold.
2. Any item I did not want to sell, for any reason, would be highlighted in neon Blue (and locked if possible). This would be for items like "gear" or weapons or some other sentimental value. Some of us who have played for years have made that horrible mistake of selling something accidentally which was a drop from a heroic dungeon or a seldom played raid and cursed ourselves forever after.
3. Any item I wanted to disenchant in a group disenchant (if you can do this enchanters would love you f o r e v e r) would be highlighted in dark Green.

I would rather have a highlighted "box" than a tiny symbol to try to decipher any day.

As for gray items I would simply have a check box in the configuration to either sell automatically (like Scrap) or not when they come in contact with a vendor. When you want to sell gray items, then they are automatically NOT selectable in your bags as they will be sold anyway (though they can still be sorted and stacked by the awesome addon Genie). When you don't want to indiscriminately sell them...then you can select them based on the selectable coding already established.

As for the colors, I am one of those color blind individuals who has a rough time with any color close to others, which Blizzard unfortunately uses a lot. So blue next to purple is bad, orange next to yellow is bad, red next to green is bad, etc. If you create your color coding with "us" in mind, then you never have to recode as a special exception later.

When you refer to highlighting, you're meaning the changing of the texture's colour, right? Or do you mean colouring the border?

With regards to both points #1 and #2, does this mean every single item in your inventory would be highlighted? Either with Gold to be sold, or Blue to not be? Wouldn't one miss the original colours then? Or perhaps 'tis not an issue...

As for #3, I've never really been big on enchanting, so I'm not entirely sure what this 'group disenchant' you're referring to is? I guess to implement this option I'd have to either come up with another way to flag items, as CTRL+Right-click is one of the only available mouse-button + modifiers available. I suppose either this would have to cause a drop-down menu to appear or I'll just have to have key-bindings which lets you decide what a key does while hovering over an item.

I'll have a look at adding an options page and having a toggle for automatically tagging gray items!

With regards to colours, I presume that the three options you provided would thus be suitable enough (gold, neon blue & dark green)? If they look good enough, I'll happily go ahead with those choices!

Great addon! The little icon is a nice touch. If you end up doing some border highlighting, please keep the icon also! Perhaps allow the choice to be made by the user in the settings?

Originally Posted by GreatStalin

With regards to both points #1 and #2, does this mean every single item in your inventory would be highlighted? Either with Gold to be sold, or Blue to not be?

From my understanding of the post, he is suggesting that someone can mark an item as "Never sell", and it means that it won't be sellable at a vendor - via your addon or otherwise (i.e. right-clicking it).

When you get around to it, instead of a simple confirmation why not use a checklist? That way you can write up a table of items to always sell when at a vendor. And even go for a whitelist and blacklist, mentioned before, allowing selected items to never be sold and other selected items to always be sold.

As for a solution to your modifier dilemma, what about using two modifiers?

I like reading good code, keep it up.

__________________
"I have not failed, I simply found 10,000 ways that did not work." - Thomas Edison