All items existed at the time of the test. When I run the listed script I get the following errors.
Non-working versionErrorMessages wrote:Unparsable in Calculation: 'S'
Could not calculate Summoned: Black Bread
Summoned: Black Bread is in slot 0
0 should be zero
opening Dimensional Pocket in Inventory packslot 8
my count is 1
I have NULL
closing bag with food
Summoned: Black Bread before
Summoned: Glob of Water after
Unparsable in Calculation: 'S'
Could not calculate Summoned: Globe of Water
Summoned: Globe of Water is in slot 0
0 should be zero
opening Dimensional Pocket in Inventory packslot 8
my count is 2
i have NULL
closing bag with food
Summoned: Globe of Water before
Summoned: Glob of Water after
done moving food and drink
Code: Select all
function main()
{
declare SearchItem string
declare PickItUp int
declare ThisBag int
variable int Count=1
do
{
if ${Count}==1
{
PickItUp:Set[${FindItem[=Summoned: Black Bread]}]
SearchItem:Set[Summoned: Black Bread]
}
else
{
PickItUp:Set[${FindItem[=Summoned: Globe of Water]}]
SearchItem:Set[Summoned: Globe of Water]
}
echo ${SearchItem} is in slot ${PickItUp}
if ${PickItUp}>29
{
if ${PickItUp}>321
{
ThisBag:Set[29]
echo ${ThisBag} set bag 8 food
}
elseif ${PickItUp}>311
{
ThisBag:Set[28]
echo ${ThisBag} set bag 7 food
}
elseif ${PickItUp}>301
{
ThisBag:Set[27]
echo ${ThisBag} set bag 6 food
}
elseif ${PickItUp}>291
{
ThisBag:Set[26]
echo ${ThisBag} set bag 5 food
}
elseif ${PickItUp}>281
{
ThisBag:Set[25]
echo ${ThisBag} set bag 4 food
}
elseif ${PickItUp}>271
{
ThisBag:Set[24]
echo ${ThisBag} set bag 3 food
}
elseif ${PickItUp}>261
{
ThisBag:Set[23]
echo ${ThisBag} set bag 2 food
}
elseif ${PickItUp}>250
{
ThisBag:Set[22]
echo ${ThisBag} set bag 1 food
}
echo ${ThisBag} holds it
waitframe
echo opening bag#${Math.Calc[${ThisBag}-21].Int} with ${SearchItem} in it
NoModKey EQItemNotify ${ThisBag} RightMouseUp
wait 5 ${Window[pack${ThisBag}].Open}
NoModKey shift EQItemNotify ${PickItUp} LeftMouseUp
wait 5
echo closing bag with food
NoModKey EQItemNotify ${ThisBag} RightMouseUp
}
else
{
echo ${ThisBag} should be zero
shift EQItemNotify ${PickItUp} LeftMouseUp
}
echo opening Dimensional Pocket in Inventory packslot 8
NoModKey EQItemNotify 29 RightMouseUp
wait 5 ${Window[pack8].Open}
if ${Count}==1
{
echo my count is ${Count}
echo I have ${Cursor.Name}
NoModKey shift EQItemNotify 321 LeftMouseUp
}
else
{
echo my count is ${Count}
echo i have ${Cursor.Name}
NoModKey shift EQItemNotify 322 LeftMouseUp
}
wait 5
echo closing bag with food
NoModKey EQItemNotify 29 RightMouseUp
echo ${SearchItem} before
SearchItem:Set[Summoned: Glob of Water]
echo ${SearchItem} after
}
while ${Count:Inc}<=2
endscript bagtest
}
function atexit()
{
echo done moving food and drink
}Code: Select all
function main()
{
variable int PickItUp
variable int ThisBag
echo ${FindItem[=Summoned: Black Bread].InvSlot}
PickItUp:Set[${FindItem[=Summoned: Black Bread].InvSlot}]
echo ${PickItUp} Black Bread
if ${PickItUp}>29
{
if ${PickItUp}>321
{
ThisBag:Set[29]
echo ${ThisBag} set bag 8 food
}
elseif ${PickItUp}>311
{
ThisBag:Set[28]
echo ${ThisBag} set bag 7 food
}
elseif ${PickItUp}>301
{
ThisBag:Set[27]
echo ${ThisBag} set bag 6 food
}
elseif ${PickItUp}>291
{
ThisBag:Set[26]
echo ${ThisBag} set bag 5 food
}
elseif ${PickItUp}>281
{
ThisBag:Set[25]
echo ${ThisBag} set bag 4 food
}
elseif ${PickItUp}>271
{
ThisBag:Set[24]
echo ${ThisBag} set bag 3 food
}
elseif ${PickItUp}>261
{
ThisBag:Set[23]
echo ${ThisBag} set bag 2 food
}
elseif ${PickItUp}>250
{
ThisBag:Set[22]
echo ${ThisBag} set bag 1 food
}
echo ${ThisBag} holds it
waitframe
echo opening bag with food
NoModKey EQItemNotify ${ThisBag} RightMouseUp
wait 5 ${Window[pack${ThisBag}].Open}
NoModKey shift EQItemNotify ${PickItUp} LeftMouseUp
wait 5
echo closing bag with food
NoModKey EQItemNotify ${ThisBag} RightMouseUp
}
else
{
echo ${ThisBag} should be zero
shift EQItemNotify ${PickItUp} LeftMouseUp
}
wait 5
echo opening dimensional pocket in slot 8
NoModKey EQItemNotify 29 RightMouseUp
wait 5
NoModKey EQItemNotify 321 LeftMouseUp
wait 5
echo closing dimensional pocket in slot 8
NoModKey EQItemNotify 29 RightMouseUp
echo ${FindItem[=Summoned: Globe of Water].InvSlot}
PickItUp:Set[${FindItem[=Summoned: Globe of Water].InvSlot}]
echo ${PickItUp} globe of water
if ${PickItUp}>29
{
if ${PickItUp}>321
{
ThisBag:Set[29]
echo ${ThisBag} set bag 8 drink
}
elseif ${PickItUp}>311
{
ThisBag:Set[28]
echo ${ThisBag} set bag 7 drink
}
elseif ${PickItUp}>301
{
ThisBag:Set[27]
echo ${ThisBag} set bag 6 drink
}
elseif ${PickItUp}>291
{
ThisBag:Set[26]
echo ${ThisBag} set bag 5 drink
}
elseif ${PickItUp}>281
{
ThisBag:Set[25]
echo ${ThisBag} set bag 4 drink
}
elseif ${PickItUp}>271
{
ThisBag:Set[24]
echo ${ThisBag} set bag 3 drink
}
elseif ${PickItUp}>261
{
ThisBag:Set[23]
echo ${ThisBag} set bag 2 drink
}
elseif ${PickItUp}>250
{
ThisBag:Set[22]
echo ${ThisBag} set bag 1 drink
}
echo ${ThisBag} holds it
waitframe
echo opening bag
NoModKey EQItemNotify ${ThisBag} RightMouseUp
wait 5 ${Window[pack${ThisBag}].Open}
NoModKey shift EQItemNotify ${PickItUp} LeftMouseUp
wait 5
NoModKey EQItemNotify ${ThisBag} RightMouseUp
}
else
{
echo ${ThisBag} should be zero
shift EQItemNotify ${PickItUp} LeftMouseUp
}
wait 5
NoModKey EQItemNotify 29 RightMouseUp
wait 5
NoModKey EQItemNotify 322 LeftMouseUp
wait 5
NoModKey EQItemNotify 29 RightMouseUp
}
function atexit()
{
;SearchItem:Set[]
ThisBag:Set[]
PickItUp:Set[]
}

