So i've started a macro based loosely off other macro's that sort. This does sort. But it sorts each bag individually. It's certainly useful for stackable item compression and pushing empty slots to the last bank bag. It needs to be stored in arrays, sorted, and then pushed back out where each item goes. However I'm shite with array's in MQ2 as I've never used them. Was wondering if someone else wanted to give it a stab. My sorting sub is a bit crazy because I am having trouble getting ${String.Compare[${String}]} to return expected results according to the Wiki (I've opened a bug thread about it). In the mean time I'd like to get my current macro from only sorting each bag separately to converting the entire list of items into an array, storing both the name and the InvSlot.ID and then creating a copy of that array (probably initialize them both at the same time), then sort the array (is there a built in command for this or would I need to create my own sub?). I'm fairly new to array's in general as it is. I was thinking of storing the array as a 2 dimensional array.
int unsorted[][] where it would have ${BankCapacity} x 2 elements {ID, Name} where ID is 1,1 and name is 1,2 then go to next item. Then the sorted array would be the same, but when I sorted it I would sort it only by the name and leave the IDs where they are so that I can get a target ID slot for them, then grab from the unsorted array the current location to get the item from, and then the sorted array the location to send the item to. As it is, I compress the bank, then sort it, if I do that then sort it using a selection sort type thing then when I drop an item it'll pick up another one. Should I then autobank it like I do now...but then I lose track of where it is? Or should I use a linear search to find ${Cursor.Name} in the sorted array and swap with the item in that slot and piggy back the call over and over until !${Cursor.ID}? I'm not really sure, nor am I sure how to sort a 2d array by only 1 dimension of it. If anyone wants to jump on this band wagon and get us a working banksorter again, it'd be much appriciated.

