Yoko
http://forum.yoko.com.ua/

Moving bandages from bank to backpack
http://forum.yoko.com.ua/viewtopic.php?f=17&t=13305
Page 1 of 1

Author:  utternoob [ 2008-02-27 15:23:39 ]
Post subject:  Moving bandages from bank to backpack

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!

Author:  Destruction [ 2008-02-27 16:16:04 ]
Post subject: 

Code:
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

Author:  utternoob [ 2008-02-27 17:48:21 ]
Post subject: 

Thank you very much!!! This worked! :D

Author:  utternoob [ 2008-02-27 18:49:04 ]
Post subject: 

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

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/