I've gotten about 30 junk mules loaded with stuff, and it's time to unload them. However, I want to keep stuff that's within a certain level. So before I broke the dump into different files, I wanted to just dump all mules into 1 file, then worry about things later.
First mule has 383 items in bags and bank (including containers). When I run the code below, the text file only puts out about 20-25. The echo command before the /ini does echo the right item, and regardless of delay, I'm not getting any more items dumped. HELP!
First mule has 383 items in bags and bank (including containers). When I run the code below, the text file only puts out about 20-25. The echo command before the /ini does echo the right item, and regardless of delay, I'm not getting any more items dumped. HELP!
Code:
#turbo 40
Sub Main
/declare index int local
/declare y int local
/declare x int outer 1
/declare ItemLevel[1360] int outer
/declare ItemName[1360] string outer
/declare MuleName string outer ${Me.CleanName}
/for index 1 to 10
/if (${Me.Inventory[pack${index}].Container}) /call MainPack ${index}
/next index
/for index 1 to 24
/if (${Me.Bank[${index}].Container}) /call BankPack ${index}
/next index
/varcalc x ${x}-1
/for y 1 to ${x}
/echo ${ItemName[${y}]} - ${ItemLevel[${y}]}
/ini "Mules-${Me.CleanName}.txt" ${ItemLevel[${y}]} ${MuleName} "${ItemName[${y}]}"
/delay 5
/next y
/return
Sub MainPack(int PackSlot)
/declare index int local
/for index 1 to ${Me.Inventory[pack${PackSlot}].Container}
/if (${Me.Inventory[pack${PackSlot}].Item[${index}].ID}) {
/varset ItemLevel[${x}] ${Me.Inventory[pack${PackSlot}].Item[${index}].RequiredLevel}
/varset ItemName[${x}] ${Me.Inventory[pack${PackSlot}].Item[${index}].Name}
}
/varcalc x ${x}+1
/next index
/return
Sub BankPack(int PackSlot)
/declare index int local
/if (${Me.Bank[${PackSlot}].ID}) {
/for index 1 to ${Me.Bank[${PackSlot}].Container}
/if (${Me.Bank[${PackSlot}].Item[${index}].ID}) {
/varset ItemLevel[${x}] ${Me.Bank[${PackSlot}].Item[${index}].RequiredLevel}
/varset ItemName[${x}] ${Me.Bank[${PackSlot}].Item[${index}].Name}
}
/varcalc x ${x}+1
/next index
}
/return