Page 1 of 1
Moving bandages from bank to backpack
Posted: 2008-02-27 15:23:39
by utternoob
Hello,
Can anyone give me a script that moves some bandages from bank to my backpack if theres only a few left in my backpack?
Thanks!
Posted: 2008-02-27 16:16:04
by Destruction
Code: Select all
sub getBandagesFromBank()
var bandages = "0x0000" ; graphical type of bandages
if uo.count( bandages ) > 100 then
uo.print( "I already have more than 100 bandages." )
return false
endif
uo.findtype( bandages, "-1", uo.objAtLayer( "Bank" ) )
if not uo.findcount() then
uo.print( "Bandages was not found in bankbox." )
return false
endif
uo.moveitem( "finditem", "100" )
uo.print( "Bandages was be moved." )
endsub
Posted: 2008-02-27 17:48:21
by utternoob
Thank you very much!!! This worked!

Posted: 2008-02-27 18:49:04
by utternoob
hmmm how do i make this script loop forever, atm it stops if i have more than 500 bandages, i currently have it like this:
Code: Select all
sub getBandagesFromBank()
repeat
if uo.count('bandage') > 500 then
uo.print( "I already have more than 500 bandages." )
return false
endif
uo.findtype('bandage', "-1", uo.objAtLayer( "Bank" ) )
if not uo.findcount() then
uo.print( "Bandages was not found in bankbox." )
return false
endif
uo.moveitem( "finditem", "500" )
uo.print( "Bandages has been moved." )
wait(300000)
until UO.life<2
end sub
i just want it to loop forever, and check if i have enough bandages every 5mins. i thought if i add repeat..until it will loop forever, but it doesnt :S