Storage macro is driving me insane!

DragonDragon

Neophyte
Hi, i've been trying to get this macro working for a couple of days and its driving me up the wall

IT SHOULD be storing all my regs/loot in a set of bags and skipping over any bag that is blue (color = 3), but for some reason it just will not skip over the blue bags. it seems to find and identify them fine, but then it still pulls all the regs out and stores them even though it should be getting skipped.


Any thoughts?



Code:
unsetalias 'gem_storage'

unsetalias 'reg_storage'

//Set the default bags at the house

if findobject '0x40db7c8e'

setalias 'gem_storage' '0x40da29ec'

setalias 'reg_storage' '0x40db7c8e'

setalias 'weapon_storage' '0x40a57a63'

setalias 'scroll_storage' '0x40db7c87'

setalias 'gold_storage' '0x40b6db33'

endif

// !! Create Sort lists

if not listexists 'gems'

createlist 'gems'

//Gems

pushlist 'gems' 0xf16 // Amethyst

pushlist 'gems' 0xf15 // Citrine

pushlist 'gems' 0xf19 // Sapphire

pushlist 'gems' 0xf25 // Amber

pushlist 'gems' 0xf21 // Star Sapphire

pushlist 'gems' 0xf10 // Emerald

pushlist 'gems' 0xf26 // Diamond

pushlist 'gems' 0xf2d // Tourmaline

pushlist 'gems' 0xf13 // Ruby

endif

if not listexists 'regs'

createlist 'regs'

//Regents

pushlist 'regs' 0xf7a // Black Pearl

pushlist 'regs' 0xf7b // Blood Moss

pushlist 'regs' 0xf86 // Mandrake Root

pushlist 'regs' 0xf84 // Garlic

pushlist 'regs' 0xf85 // Ginseng

pushlist 'regs' 0xf88 // Nightshade

pushlist 'regs' 0xf8d // Spider's Silk

pushlist 'regs' 0xf8c // Sulphurous Ash

endif

// !! Static Data

if not listexists 'ItemTypes'

createlist 'ItemTypes'

endif

clearlist 'ItemTypes'

//Shields

@pushlist 'ItemTypes' 0x1b72 //BronzeShields

@pushlist 'ItemTypes' 0x1b73 //Buckler

@pushlist 'ItemTypes' 0x1b7b //MetalShield

@pushlist 'ItemTypes' 0x1b74 //Metal Kite Shield

@pushlist 'ItemTypes' 0x1b79 //Tear Kite Shield

@pushlist 'ItemTypes' 0x1b7a //WoodenShield

@pushlist 'ItemTypes' 0x1b76 //HeaterShield

//Bone Armor

@pushlist 'ItemTypes' 0x1451 //Bone Helmet

@pushlist 'ItemTypes' 0x144f //Bone Armor

@pushlist 'ItemTypes' 0x1452 //Bone Leggings

@pushlist 'ItemTypes' 0x144e //Bone Arms

@pushlist 'ItemTypes' 0x1450 //Bone Gloves

//Platemail

@pushlist 'ItemTypes' 0x1408 //Close Helmet

@pushlist 'ItemTypes' 0x1410 //Platemail Arms

@pushlist 'ItemTypes' 0x1411 //Platemail Legs

@pushlist 'ItemTypes' 0x1412 //Plate Helm

@pushlist 'ItemTypes' 0x1413 //Plate Gorget

@pushlist 'ItemTypes' 0x1414 //Platemail Gloves

@pushlist 'ItemTypes' 0x1415 //Plate Chest

@pushlist 'ItemTypes' 0x140a //Helmet

@pushlist 'ItemTypes' 0x140c //Bascinet

@pushlist 'ItemTypes' 0x140e //Norse Helm

//Chainmail

@pushlist 'ItemTypes' 0x13bb //Chainmail Coif

@pushlist 'ItemTypes' 0x13be //Chainmail Leggins

@pushlist 'ItemTypes' 0x13bf //Chainmail Tunic

//Ringmail

@pushlist 'ItemTypes' 0x13ee //Ringmail Sleeves

@pushlist 'ItemTypes' 0x13eb //Ringmail Gloves

@pushlist 'ItemTypes' 0x13ec //Ringmail Tunic

@pushlist 'ItemTypes' 0x13f0 //Ringmail Leggins

//Studded

@pushlist 'ItemTypes' 0x13da //Studded Leggings

@pushlist 'ItemTypes' 0x13db //Studded Tunic

@pushlist 'ItemTypes' 0x13d5 //Studded Gloves

@pushlist 'ItemTypes' 0x13d6 //Studded Gorget

@pushlist 'ItemTypes' 0x13dc //Studded Sleeves

//Leather

@pushlist 'ItemTypes' 0x13c6 //Leather Gloves

@pushlist 'ItemTypes' 0x13cd //Leather Sleeves

@pushlist 'ItemTypes' 0x13cc //Leather Tunic

@pushlist 'ItemTypes' 0x13cb //Leather Pants

@pushlist 'ItemTypes' 0x13c7 //Leather Gorget

@pushlist 'ItemTypes' 0x1db9 //Leather Cap

//Female Armor

@pushlist 'ItemTypes' 0x1c04 //Female Plate

@pushlist 'ItemTypes' 0x1c0c //Female Studded Bustier

@pushlist 'ItemTypes' 0x1c02 //Female Studded Armor

@pushlist 'ItemTypes' 0x1c00 //Female Leather Shorts

@pushlist 'ItemTypes' 0x1c08 //Female Leather Skirt

@pushlist 'ItemTypes' 0x1c06 //Female Leather Armor

@pushlist 'ItemTypes' 0x1c0a //Female Leather Bustier

//Fencing

@pushlist 'ItemTypes' 0xf62 //Spear

@pushlist 'ItemTypes' 0x1403 //Short Spear

@pushlist 'ItemTypes' 0xe87 //Pitchfork

@pushlist 'ItemTypes' 0x1405 //Warfork

@pushlist 'ItemTypes' 0x1401 //Kryss

//@pushlist 'ItemTypes' 0xf52 //Dagger

//dagger is removed to prevent the loss of bound new player dagger

//Macing

@pushlist 'ItemTypes' 0x13b0 //War axe

@pushlist 'ItemTypes' 0xdf0 //Black Staff

@pushlist 'ItemTypes' 0x1439 //War Hammer

@pushlist 'ItemTypes' 0x1407 //War Mace

@pushlist 'ItemTypes' 0xe89 //Quarter Staff

@pushlist 'ItemTypes' 0x143d //Hammer Pick

@pushlist 'ItemTypes' 0x13b4 //Club

@pushlist 'ItemTypes' 0xe81 //Shepherds Crook

@pushlist 'ItemTypes' 0x13f8 //Gnarled Staff

@pushlist 'ItemTypes' 0xf5c //Mace

@pushlist 'ItemTypes' 0x143b //Maul

//Swords

@pushlist 'ItemTypes' 0x13b9 //Viking Sword

@pushlist 'ItemTypes' 0xf61 //Longsword

@pushlist 'ItemTypes' 0x1441 //Cutlass

@pushlist 'ItemTypes' 0x13b6 //Scimitar

@pushlist 'ItemTypes' 0xec4 //Skinning Knife

@pushlist 'ItemTypes' 0x13f6 //Butcher Knife

@pushlist 'ItemTypes' 0xf5e //Broadsword

@pushlist 'ItemTypes' 0x13ff //Katana

@pushlist 'ItemTypes' 0xec3 //Cleaver

//Axes

@pushlist 'ItemTypes' 0xf43 //Hatchet

@pushlist 'ItemTypes' 0xf45 //Executioner's Axe

@pushlist 'ItemTypes' 0xf4d //Bardiche

@pushlist 'ItemTypes' 0xf4b //Double Axe

@pushlist 'ItemTypes' 0x143e //Halberd

@pushlist 'ItemTypes' 0x13fb //Large Battle Axe

@pushlist 'ItemTypes' 0x1443 //Two Handed Axe

@pushlist 'ItemTypes' 0xf47 //Battle Axe

@pushlist 'ItemTypes' 0xf49 //Axe

@pushlist 'ItemTypes' 0xe85 //Pickaxe

@pushlist 'ItemTypes' 0xe86 //Pickaxe

//Bows

@pushlist 'ItemTypes' 0x13fd //HeavyXbow

@pushlist 'ItemTypes' 0xf50 //Xbow

@pushlist 'ItemTypes' 0x13b2 //bow

// !!*** End of Data Init ***!!

//

//

// !! User Input set Target Gem storage

if not findalias 'gem_storage'

headmsg 'Please Select Gem Storage' '2124'

promptalias 'gem_storage'

endif

// !! User Input set Target Reg storage

if not findalias 'reg_storage'

headmsg 'Please Select Regent Storage' '2124'

promptalias 'reg_storage'

endif

clearignorelist

// !! Start sorting !!

clearlist 'containers'

if not listexists 'containers'

@createlist 'containers'

endif

if list 'containers' == 0

@pushlist 'containers' 0xe76

@pushlist 'containers' 0xe75

@pushlist 'containers' 0xe74

@pushlist 'containers' 0xe78

@pushlist 'containers' 0xe7d

@pushlist 'containers' 0xe77

endif

@createlist 'bags'

clearlist 'bags'


for 0 to 'containers'


while @findtype containers[] 'any' 'backpack'

pause 400

setalias 'current_bag' 'found'

if color 'current_bag' == 3

headmsg 'found a blue bag'

ignoreobject 'current_bag'

unsetalias 'current_bag'

else

useobject! 'current_bag'

pause 600

for 0 to 'regs'

while @findtype 'regs[]' 'current_bag'

moveitem 'found' 'reg_storage'

pause 600

endwhile

endfor

for 0 to 'gems'

while @findtype 'gems[]' 'current_bag'

moveitem 'found' 'gem_storage'

pause 600

endwhile

endfor

ignoreobject 'currentbag'

pause 600

endif

ignoreobject 'current_bag'

endwhile

endfor

clearignorelist

headmsg 'Done Sorting' '89'

//

// !! cycle all items listed in var ItemTypes

for 0 to 'ItemTypes'

// !! Process all items found of current cyucled ItemType

while @findtype 'ItemTypes[]' 'any' 'backpack'

@clearjournal

moveitem found 'weapon_storage'

endwhile

endfor

while @findtype '0xeed' 'any' 'backpack'

moveitem found 'gold_storage'

endwhile

while @findtype '0x2260' 'any' 'backpack'

moveitem found 'scroll_storage'

endwhile
 

severus

Grandmaster
You can do this with a uosteam organizer rather then a macro just add all you wanna drop, gems, gold etc set to hotkey agents > organizer
 

DragonDragon

Neophyte
I guess the problem i'm having is that I show up back from balrons with a bunch of bags of regs + loot, and I want to quickly drop it all off, an organizer does not seem to want to sort through the 5 or 6 bags in my backpack pulling out all the regs. Its not the end of the world if there is no solution, its just making me crazy that I cant figure out how to make this work :)
 

Bromista

Grandmaster
Personally I've found it much better to sort reg bags while I'm farming "by hand" with the context menu, then hit the bank and dump all regs/pull a fresh stack. Added bonus: don't have to worry about running low on your main stock bag when you go back out. And you're already mousing near your kegs and bandages so it's easy and efficient.

Still use an automated macro or organizer to drop all your other lewtz, just keep your reg bag managed as you go.
 

severus

Grandmaster
I guess the problem i'm having is that I show up back from balrons with a bunch of bags of regs + loot, and I want to quickly drop it all off, an organizer does not seem to want to sort through the 5 or 6 bags in my backpack pulling out all the regs. Its not the end of the world if there is no solution, its just making me crazy that I cant figure out how to make this work :)
Do not put them into bags, and dont use organize me, have everything in your big main pack, or everything in 1 bag
 

DragonDragon

Neophyte
Do not put them into bags, and dont use organize me, have everything in your big main pack, or everything in 1 bag
Still working on it, but that is not the problem -- the issue is when you get back from doing balrons you have a whole bunch of reg bags, and i want to quickly unload them at my house without having to unload all the regs im using for farming as well, but for some reason in steam when you do something like this:

where 'current_bag' is obtained from

while @findtype 0xe76





Code:
for 0 to 'regs'

while @findtype 'regs[]' 'current_bag'

moveitem 'found' 'reg_storage'

pause 600

endwhile

endfor

Seems to actually search all of your bags for regs, not just the current bag.
 

Bromista

Grandmaster
Why not just let it do that and have it pull a fresh stack at the end? Shouldn't slow you down too much.
 

DragonDragon

Neophyte
Why not just let it do that and have it pull a fresh stack at the end? Shouldn't slow you down too much.
That's what I do now -- and its pretty fast at a bank automating the context menu's to pull all regs at once, but it does not work great at a house. At this point its more of a programmers dilemma where I don't want to let the problem win ;p
 

Lady Macbeth

Grandmaster
Work around - sort all reg within ur backpack, dump all empty bags to trash and finally grab 50 each reg back in ur self reg bag. This will surely work. Good luck!


Sent from my iPhone using Tapatalk
 

Bromista

Grandmaster
Looks like that is what he is doing now, not sure if he automated it and worked it into his macro or not as a quick workaround but he just really wants to fix what's broke.
 

Lady Macbeth

Grandmaster
Ok. That's good if that's what he has been doing. Fairly easy to put everything together in one script.

I'm not sure if his script is broken. When UO steam sorts reg stacks r in first in first out order. At least that's what I notice. I tried to mark reg inside a certain bag to be ignored but in the end when I looped through my backpack to sort reg, all reg still got picked out.

Will need to spend some time to really look into how UO steam work with reg before he can figure out. However, with extra 20 seconds using the work around I suggested will still able to do what he wanted


Sent from my iPhone using Tapatalk
 

Young Star

Grandmaster
Just thinking off the top of my head. You could take the script that you are using now to off load all the loot and regs then runs an organizer that restocks the regs.
 

DragonDragon

Neophyte
Turns out I figured out a round about way to get everything working just like i wanted too. The trick was using a combination of Bromista's context reg back movment, and an organizer called in the macro.


You iterate through all the balron pouches and pull the regs out into your main backpack, then run an organizer with all the regs targeted, to pull out everything in your top level backpack. Its not 100% perfect, but it runs fast and works well.

Code:
//Set the default bags at the house

if findobject '0x40db7c8e'

setalias 'gem_storage' '0x40da29ec'

setalias 'reg_storage' '0x40db7c8e'

setalias 'weapon_storage' '0x40a57a63'

setalias 'scroll_storage' '0x40db7c87'

setalias 'gold_storage' '0x40b6db33'

endif

//set aliases to sort stuff

if not findalias 'characterBackpack'

headmsg 'Select your characters backpack'

promptalias 'characterBackpack'

endif

// !! User Input set Target Gem storage

if not findalias 'gem_storage'

headmsg 'Please Select Gem Storage' '2124'

promptalias 'gem_storage'

endif

// !! User Input set Target Reg storage

if not findalias 'reg_storage'

headmsg 'Please Select Regent Storage' '2124'

promptalias 'reg_storage'

endif

// !! Create Sort lists

if not listexists 'gems'

createlist 'gems'

//Gems

pushlist 'gems' 0xf16 // Amethyst

pushlist 'gems' 0xf15 // Citrine

pushlist 'gems' 0xf19 // Sapphire

pushlist 'gems' 0xf25 // Amber

pushlist 'gems' 0xf21 // Star Sapphire

pushlist 'gems' 0xf10 // Emerald

pushlist 'gems' 0xf26 // Diamond

pushlist 'gems' 0xf2d // Tourmaline

pushlist 'gems' 0xf13 // Ruby

endif

if not listexists 'regs'

createlist 'regs'

//Regents

pushlist 'regs' 0xf7a // Black Pearl

pushlist 'regs' 0xf7b // Blood Moss

pushlist 'regs' 0xf86 // Mandrake Root

pushlist 'regs' 0xf84 // Garlic

pushlist 'regs' 0xf85 // Ginseng

pushlist 'regs' 0xf88 // Nightshade

pushlist 'regs' 0xf8d // Spider's Silk

pushlist 'regs' 0xf8c // Sulphurous Ash

endif

// !! Static Data

if not listexists 'ItemTypes'

createlist 'ItemTypes'

endif

clearlist 'ItemTypes'

//Shields

@pushlist 'ItemTypes' 0x1b72 //BronzeShields

@pushlist 'ItemTypes' 0x1b73 //Buckler

@pushlist 'ItemTypes' 0x1b7b //MetalShield

@pushlist 'ItemTypes' 0x1b74 //Metal Kite Shield

@pushlist 'ItemTypes' 0x1b79 //Tear Kite Shield

@pushlist 'ItemTypes' 0x1b7a //WoodenShield

@pushlist 'ItemTypes' 0x1b76 //HeaterShield

//Bone Armor

@pushlist 'ItemTypes' 0x1451 //Bone Helmet

@pushlist 'ItemTypes' 0x144f //Bone Armor

@pushlist 'ItemTypes' 0x1452 //Bone Leggings

@pushlist 'ItemTypes' 0x144e //Bone Arms

@pushlist 'ItemTypes' 0x1450 //Bone Gloves

//Platemail

@pushlist 'ItemTypes' 0x1408 //Close Helmet

@pushlist 'ItemTypes' 0x1410 //Platemail Arms

@pushlist 'ItemTypes' 0x1411 //Platemail Legs

@pushlist 'ItemTypes' 0x1412 //Plate Helm

@pushlist 'ItemTypes' 0x1413 //Plate Gorget

@pushlist 'ItemTypes' 0x1414 //Platemail Gloves

@pushlist 'ItemTypes' 0x1415 //Plate Chest

@pushlist 'ItemTypes' 0x140a //Helmet

@pushlist 'ItemTypes' 0x140c //Bascinet

@pushlist 'ItemTypes' 0x140e //Norse Helm

//Chainmail

@pushlist 'ItemTypes' 0x13bb //Chainmail Coif

@pushlist 'ItemTypes' 0x13be //Chainmail Leggins

@pushlist 'ItemTypes' 0x13bf //Chainmail Tunic

//Ringmail

@pushlist 'ItemTypes' 0x13ee //Ringmail Sleeves

@pushlist 'ItemTypes' 0x13eb //Ringmail Gloves

@pushlist 'ItemTypes' 0x13ec //Ringmail Tunic

@pushlist 'ItemTypes' 0x13f0 //Ringmail Leggins

//Studded

@pushlist 'ItemTypes' 0x13da //Studded Leggings

@pushlist 'ItemTypes' 0x13db //Studded Tunic

@pushlist 'ItemTypes' 0x13d5 //Studded Gloves

@pushlist 'ItemTypes' 0x13d6 //Studded Gorget

@pushlist 'ItemTypes' 0x13dc //Studded Sleeves

//Leather

@pushlist 'ItemTypes' 0x13c6 //Leather Gloves

@pushlist 'ItemTypes' 0x13cd //Leather Sleeves

@pushlist 'ItemTypes' 0x13cc //Leather Tunic

@pushlist 'ItemTypes' 0x13cb //Leather Pants

@pushlist 'ItemTypes' 0x13c7 //Leather Gorget

@pushlist 'ItemTypes' 0x1db9 //Leather Cap

//Female Armor

@pushlist 'ItemTypes' 0x1c04 //Female Plate

@pushlist 'ItemTypes' 0x1c0c //Female Studded Bustier

@pushlist 'ItemTypes' 0x1c02 //Female Studded Armor

@pushlist 'ItemTypes' 0x1c00 //Female Leather Shorts

@pushlist 'ItemTypes' 0x1c08 //Female Leather Skirt

@pushlist 'ItemTypes' 0x1c06 //Female Leather Armor

@pushlist 'ItemTypes' 0x1c0a //Female Leather Bustier

//Fencing

@pushlist 'ItemTypes' 0xf62 //Spear

@pushlist 'ItemTypes' 0x1403 //Short Spear

@pushlist 'ItemTypes' 0xe87 //Pitchfork

@pushlist 'ItemTypes' 0x1405 //Warfork

@pushlist 'ItemTypes' 0x1401 //Kryss

//@pushlist 'ItemTypes' 0xf52 //Dagger

//dagger is removed to prevent the loss of bound new player dagger

//Macing

@pushlist 'ItemTypes' 0x13b0 //War axe

@pushlist 'ItemTypes' 0xdf0 //Black Staff

@pushlist 'ItemTypes' 0x1439 //War Hammer

@pushlist 'ItemTypes' 0x1407 //War Mace

@pushlist 'ItemTypes' 0xe89 //Quarter Staff

@pushlist 'ItemTypes' 0x143d //Hammer Pick

@pushlist 'ItemTypes' 0x13b4 //Club

@pushlist 'ItemTypes' 0xe81 //Shepherds Crook

@pushlist 'ItemTypes' 0x13f8 //Gnarled Staff

@pushlist 'ItemTypes' 0xf5c //Mace

@pushlist 'ItemTypes' 0x143b //Maul

//Swords

@pushlist 'ItemTypes' 0x13b9 //Viking Sword

@pushlist 'ItemTypes' 0xf61 //Longsword

@pushlist 'ItemTypes' 0x1441 //Cutlass

@pushlist 'ItemTypes' 0x13b6 //Scimitar

@pushlist 'ItemTypes' 0xec4 //Skinning Knife

@pushlist 'ItemTypes' 0x13f6 //Butcher Knife

@pushlist 'ItemTypes' 0xf5e //Broadsword

@pushlist 'ItemTypes' 0x13ff //Katana

@pushlist 'ItemTypes' 0xec3 //Cleaver

//Axes

@pushlist 'ItemTypes' 0xf43 //Hatchet

@pushlist 'ItemTypes' 0xf45 //Executioner's Axe

@pushlist 'ItemTypes' 0xf4d //Bardiche

@pushlist 'ItemTypes' 0xf4b //Double Axe

@pushlist 'ItemTypes' 0x143e //Halberd

@pushlist 'ItemTypes' 0x13fb //Large Battle Axe

@pushlist 'ItemTypes' 0x1443 //Two Handed Axe

@pushlist 'ItemTypes' 0xf47 //Battle Axe

@pushlist 'ItemTypes' 0xf49 //Axe

@pushlist 'ItemTypes' 0xe85 //Pickaxe

@pushlist 'ItemTypes' 0xe86 //Pickaxe

//Bows

@pushlist 'ItemTypes' 0x13fd //HeavyXbow

@pushlist 'ItemTypes' 0xf50 //Xbow

@pushlist 'ItemTypes' 0x13b2 //bow

// !!*** End of Data Init ***!!

//

//

clearignorelist

// !! Start sorting !!

while @findtype 0xe76 'any' 'backpack'

setalias 'current_bag' 'found'

waitforcontext 'characterBackpack' 0 15000

waitforprompt 15000

promptmsg '999'

waitfortarget 15000

target! 'current_bag'

ignoreobject 'current_bag'

endwhile

if not organizing

organizer 'PutRegsAway' 'backpack''reg_storage'

endif

for 0 to 'gems'

while @findtype 'gems[]' 'backpack'

moveitem 'found' 'gem_storage'

pause 600

endwhile

endfor

//

// !! cycle all items listed in var ItemTypes

for 0 to 'ItemTypes'

// !! Process all items found of current cyucled ItemType

while @findtype 'ItemTypes[]' 'any' 'backpack'

@clearjournal

moveitem found 'weapon_storage'

endwhile

endfor

while @findtype '0xeed' 'any' 'backpack'

moveitem found 'gold_storage'

endwhile

while @findtype '0x2260' 'any' 'backpack'

moveitem found 'scroll_storage'

endwhile

clearignorelist

headmsg 'Done Sorting' '89'
 
Top