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?
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