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!
Moving bandages from bank to backpack
Moderators: Murderator+, Murderator
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
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
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
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:
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
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