CSORT - Sort items inside bags

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Hydryad
decaying skeleton
decaying skeleton
Posts: 7
Joined: Wed Jan 18, 2006 7:50 pm

Post by Hydryad » Fri Mar 24, 2006 11:29 pm

The latest version, like a few minutes before post.
*edit* yea definitely was latest version.

ebs2002
a lesser mummy
a lesser mummy
Posts: 72
Joined: Mon Apr 18, 2005 7:17 pm

Post by ebs2002 » Mon Apr 03, 2006 5:41 am

BankWnd is now Pre-PoR
BigBankWnd is now Post-PoR

To fix:

Code: Select all

   /if ( ${aStart}>=2500 && ${aStart}<=2501 && ${aEnd}>=2500 && ${aEnd}<=2501 && ${aStart}<=${aEnd} && ${Window[BankWnd].Open} ) {
becomes

Code: Select all

   /if ( ${aStart}>=2500 && ${aStart}<=2501 && ${aEnd}>=2500 && ${aEnd}<=2501 && ${aStart}<=${aEnd} && (${Window[BankWnd].Open}||${Window[BigBankWnd].Open) ) {
Now, this is a hack. There's a better way to do this and prevent oddities, but I just did this to make it work for PoR.

Farendal
a lesser mummy
a lesser mummy
Posts: 52
Joined: Thu Nov 17, 2005 4:17 am
Contact:

Post by Farendal » Fri Apr 07, 2006 3:54 pm

Tried running this with my custom UI default and default_old and only thing it will sort is the packs that are on the toon do not do anything with the bank any ideas why??

Agripa
a ghoul
a ghoul
Posts: 97
Joined: Tue Nov 23, 2004 10:16 pm

Post by Agripa » Mon Apr 10, 2006 12:45 am

Try using ebs2002's change. There are some issues with PoR.

Bigguy70
a ghoul
a ghoul
Posts: 85
Joined: Tue Sep 27, 2005 9:08 am

Post by Bigguy70 » Thu Apr 13, 2006 11:39 pm

Anyone with PoR have a working version of this mac?

NFC
a hill giant
a hill giant
Posts: 151
Joined: Mon Dec 19, 2005 2:16 pm

Post by NFC » Fri Apr 14, 2006 8:41 am

If I use the macro as posted in the top thread it just opens my inventory and sorts that, not my bank.

I tried creating a second macro, replacing BankWnd with BigBankWnd and using it for my PoR enabled accts. It runs error free but it still doesn't see the 8 new slots.

When I have more time this afternoon I'm going to play around with the PoR version and see if changing any of the bag slot numbers will help.

Agripa
a ghoul
a ghoul
Posts: 97
Joined: Tue Nov 23, 2004 10:16 pm

Post by Agripa » Fri Apr 14, 2006 3:34 pm

I do not have any PoR accounts so I have no way to verify the PoR bank slot numbers or the slot numbers inside bags in the PoR slots. I already changed the numbers so it should work IF the slot numbers are continuous but without a PoR account I can not verify it. The BankWnd and BigBankWnd changes are pretty straight forward.

vanemon
a lesser mummy
a lesser mummy
Posts: 58
Joined: Fri Aug 20, 2004 7:22 am

Post by vanemon » Wed Apr 26, 2006 5:28 am

sadly version1.1 doesnt work for me (por installed)

"/mac csort bank1 bank24"

results in error message:

csort: (bank1,bank24,NULL)
csort: Parameter error (bank1,bank24,NULL) 2000 to 2023.

and macro ends....

Jastur
a lesser mummy
a lesser mummy
Posts: 39
Joined: Sun Apr 23, 2006 4:55 pm
Location: Rhode Island

Post by Jastur » Mon May 15, 2006 7:27 pm

One thing I noticed that was slightly odd with this code was the commenting.

| Single Line Comment.
|*
Multiple line commenting
*|

Anyhow, thought I'd mention that.

Agripa
a ghoul
a ghoul
Posts: 97
Joined: Tue Nov 23, 2004 10:16 pm

Post by Agripa » Mon May 15, 2006 10:44 pm

I have had issues with comments causing problems in mq2 so once I found something that worked I kept using it. It also makes it easier for my editor to assign color.

achra
decaying skeleton
decaying skeleton
Posts: 5
Joined: Thu Jul 06, 2006 8:23 pm

Sort items into stacks?

Post by achra » Thu Jul 06, 2006 8:30 pm

This macro is awesome.. But it doesn't seem to sort items into stacks.
If I have 3 or 4 singles around, they don't get sorted into stacks (even with the stack option). Should it?
Also, assuming that it should.. Does it know how to deal with the new 100 stacks for ammo?

Agripa
a ghoul
a ghoul
Posts: 97
Joined: Tue Nov 23, 2004 10:16 pm

Re: Sort items into stacks?

Post by Agripa » Thu Jul 06, 2006 10:55 pm

achra wrote:This macro is awesome.. But it doesn't seem to sort items into stacks.
If I have 3 or 4 singles around, they don't get sorted into stacks (even with the stack option). Should it?
Also, assuming that it should.. Does it know how to deal with the new 100 stacks for ammo?
It keeps all stacks seperate and nothing is ever combined. The options Stacks is for sorting by quantity instead of name. I use it to move full stacks to the end of my inventory so I know to move them to the bank or to a different mule.

Hmmmm. Just off the top of my head it will probably get the order wrong if you have a stack of 100 items. I could fix this but I would need to find something that stacks that high to test it.

It would not be difficult to add an option to have it combine stacks when appropriate but since stacks now come in more then size 20, there may be difficulties.

achra
decaying skeleton
decaying skeleton
Posts: 5
Joined: Thu Jul 06, 2006 8:23 pm

Stacks

Post by achra » Thu Jul 06, 2006 11:39 pm

It would be awesome if you could find the time to add this feature. I might have a look at it, but sort algorythms aren't my specialty.. and I'm really new to this scripting language.
As far as I know, all "ammo" will stack to 100. So, arrows, shurikens, fishbone darts, etc.. So, if it's stackable and goes in an ammo slot, I think it's safe to assume that it goes to 100.

Agripa
a ghoul
a ghoul
Posts: 97
Joined: Tue Nov 23, 2004 10:16 pm

Post by Agripa » Fri Jul 07, 2006 12:49 am

CSORT uses a comb sort so there is no guaranty that every item is compaired to every other item. Any combine function would probably work best before the sort routine itself and after the item slot array is created so it knows what items to work with and where they are.

What exactly would you want it to do? There are limits to the FindItem function which preclude using it to find stacks that are not full. Luckily, StackSize is now available so detecting how many items can be added to a specific stack will be easy.

achra
decaying skeleton
decaying skeleton
Posts: 5
Joined: Thu Jul 06, 2006 8:23 pm

Stacks

Post by achra » Fri Jul 07, 2006 1:16 am

Hmm. I only just started using MQ2 this morning, so please forgive my ignorance of the strengths/weaknesses of the language.. Could the script use StackSize to determine which stacks could use more and how much more?.. I have no idea how big of a problem this is, to tear through the bags and combine any stacks that could be possibly combined - before the actual sort happens.