Hello windbot community. Today I decided to release a few sorting scripts I've been working on.

The list includes the following scripts:
  1. Sorty empty backpacks
  2. Sort backpacks into same colored backpacks
  3. Drop sorted backpacks to ground
  4. Sort items into backpacks


1. Sort empty backpacks
Let's say one day you have a lot of empty backpacks laying around and you want to sort them. What do you do?. Well... the answer is right here!.

Run the following script while having your backpack with the backpacks mess and wait until it's sorted!
Here's an example:
7MB WebM
http://webmup.com/4UgMp/

Extra details:
If the script gets stuck it's probably because of two reasons:
  • You ran out of screen space
  • There's items other than backpacks inside the backpacks


In any case all you have to do is reopen the main backpack and restart the script or remove the items that aren't backpacks.

Here's the script:
Code:
init start
lastopen = 0
prevopen = 0
Items = {"Brown backpack","Orange backpack","Red backpack","Yellow backpack","Purple backpack","Blue backpack","Brocade backpack","Camouflage backpack","Golden backpack","Beach backpack","Fur backpack","Grey backpack","Pirate backpack","Green backpack"}
closed = {}
init end

auto(200)
bp = getcontainer(lastopen)
bpL = getcontainer(prevopen)

if bpL.itemcount == 1 and bp.itemcount == 0 then
	prevopen = prevopen - 1
	return
end

if bp.itemcount > 1 then
	openitem(0, lastopen, true, bp.itemcount)	waitping()
	resizewindows() 	waitping()
	prevopen = lastopen
	lastopen = lastopen + 1
	return
end

if bp.itemcount == 1 then
	openitem(0, lastopen)
	return
end

if bp.itemcount == 0 then
	for i = 0, #Items do
		moveitems(Items[i], lastopen, prevopen, 1) 	waitping()
		if bp.itemcount > 0 then
			return
		end
	end
end
**Post still in construction