• Dear Guest,

    You're browsing our forum as a Guest meaning you can only see a portion of the forum in read-only mode.
    To view all forum nodes and be able to create threads/posts please register or log-in with your existing account.

    TwinStar team

[AddOn] cleanup - automatically stacks and sorts your items, extremely fast

Made a quick fork here that allows the user to reverse the sorting order. (So HS is placed topleft, empty space is placed bottom right) as that's how I prefer my bags.

Edit: Do you have ignoring items/bagslots on the planning? Might implement them myself otherwise.
 
Last edited:
I'd considered it before but wasn't sure if anyone would want it reversed. Seems to me getting the new items clearly separated from the old is a big advantage and addOns can't make new items appear at the bottom unlike the retail blizzard client.

Anyway, I've added the option now, thanks.

As for ignoring I'm not sure. For items is there any reason to ignore over just modifying the sort order if they're somehow placed inconveniently?

I think the retail function only allows ignoring whole bags?
 
With your addon I use a sentinel item to differentiate old from new stuff, with MrPlow I just locked all permanent items in place. But MrPlow is, as you said, slow.

Ignoring is useful to differentiate items belonging to different gear sets, as well as seperating items of the same rarity that have a different purpose like BoEs. Could also create a custom weights for those items by hardcoding them, which is what I'm currently doing.

Dunno about retail, I've given up on bag organisation there.

Edit: Didn't know and/or could be used as a ternary operator in lua, that's pretty cool.
 
Last edited:
what do you think a locking mechanism should be like? what does mrplow do? is there any reason you would ever want to lock slots other than the bottom ones? (or top with the order reversed) If not then a simple /lock x command that excludes the lowest/highest x slots would be enough?
 
MrPlow lets you either lock them by slotid ("/mrplow ignore slot 1-12" ignores slot 12, bag 1), or by locking the slot underneath the mouse cursor (if there is one). Ignoring items is done through shift clicking them into the command. ("/mrplow ignore [Arclight Spanner]")

And yeah, I could definitely think of a reason. I myself keep conjured items in specific slots to make a macro work - the same would probably go for some equipswap macros.
 
hm ok, I use supermacro to use items by name.

I guess ideally it would not only ignore the locked items but sort them into the slots they're locked to? Is there any reason to lock a slot independent of items?
 
Thanks :) Glad you like it.

About the button ... probably won't happen soon but maybe I'll make the frame it's attached to configurable.

The newest version now has a locking feature that works like this: you alt-left-click a bag item to assign its slot to the item, alt-right-click to free up the slot again. When a slot has an item assigned to it the highest priority for the sorting will be to put this item in that slot if there are any in your inventory. The remaining items are then sorted like usual, ignoring that slot if it was filled and otherwise using it as usual.
 
Anyone playing retail who would be so kind to run the following two commands and post the result?

Code:
/run for _, v in ipairs({GetAtlasInfo('bags-button-autosort-up')}) do DEFAULT_CHAT_FRAME:AddMessage(tostring(v)) end

Code:
/run for _, v in ipairs({GetAtlasInfo('bags-button-autosort-down')}) do DEFAULT_CHAT_FRAME:AddMessage(tostring(v)) end
 
Code:
969828
28
26
0.12109375
0.23046875
0.7265625
0.9296875
false
false


Code:
969828
28
26
0.00390625
0.11328125
0.7265625
0.9296875
false
false

Also, the locking feature works great, thanks!
 
Thank you aepocalypsa.

can you make a button anchored to Bagnon instead at minimap?
I've now replaced the minimap button with blizzlike buttons.
The buttons are by default displayed on the blizzard backpack frame and bank frame respectively.
The commands /cleanupbags and /cleanupbank are no longer used for sorting but instead take a parameter which is the name of the frame to attach the respective button to. For example, if you're using onebag:
Code:
/cleanupbags OneBagFrame
/cleanupbank OneBankFrame
/reload
To place the buttons where you want them on the frames you can drag them when holding down the alt key.

Also added the blizzlike sound for clicking.

DZgQPaa.png
 
Last edited:
Why? Which frames did you set?

Code:
/cleanupbags Bagnon
/cleanupbank Banknon
/reload

?
 
Last edited:
Anyone using a different bag addon can use

Code:
/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName());

This prints the highest frame underneath the mouse.
 
Hey Bit!
Very nice addon. I was wondering if you could add a feature to lock items to certain bag slots, so that when you put that "locked item" in your bags, it will automatically go to the bag slot its assigned to.

With this feature one would always be able to find specific items easily and such feature would also be VERY helpful for those of us who use macros with "PickupInventoryItem()" function.

Thanks in advance :smile:
 
Well there's already a lock but only when you sort. Those people really should use supermacro though tbh.
 
By the way, you don't even need supermacro for that. Here's a simple macro to use an item by name. Just replace Hearthstone (at the end) by whatever item you want:

Code:
/run (function(n) for b=0,4 do for s=1,GetContainerNumSlots(b) do if strfind(GetContainerItemLink(b,s) or '', '%['..n..'%]') then UseContainerItem(b,s) return end end end end)"Hearthstone"
 
Last edited:
By the way, you don't even need supermacro for that. Here's a simple macro to use an item by name. Just replace Hearthstone (at the end) by whatever item you want:

Code:
/run (function(n) for b=0,4 do for s=1,GetContainerNumSlots(b) do if strfind(GetContainerItemLink(b,s) or '', '%['..n..'%]') then UseContainerItem(b,s) return end end end end)"Hearthstone"

Oh nice, thanks for sharing!

However, what if I want to equip a trinket and place it in the lower trinket slot? (Slot 14)

EDIT: Never mind, I figured it out.
Code:
/run (function(n) for b=0,4 do for s=1,GetContainerNumSlots(b) do if strfind(GetContainerItemLink(b,s) or '', '%['..n..'%]') then PickupContainerItem(b,s); PickupInventoryItem(14) return end end end end)"Nifty Stopwatch"
 
Last edited:
Top Bottom