Yoko

All sides of Injection
It is currently 2025-12-24 06:25:14

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2008-02-27 19:49:11 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
hello,

i want to loop this script forever-> viewtopic.php?p=71971#71971
script forever but it stops if i have more than 500 bandages. i just want it to loop and check if i have more 500 bandages, if i have less it should take 500 bandages from my bank and continue. help please :)[/url]


Top
   
PostPosted: 2008-02-27 20:13:32 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
utternoob wrote:
hello,

i want to loop this script forever-> viewtopic.php?p=71971#71971
script forever but it stops if i have more than 500 bandages. i just want it to loop and check if i have more 500 bandages, if i have less it should take 500 bandages from my bank and continue. help please :)[/url]


Code:
sub getBandagesFromBank()
while 1
   var bandages = "0x0000" ; graphical type of bandages
   if uo.count( bandages ) < 500 then
   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", "500" )
   uo.print( "Bandages was be moved." )
   endif
 wait(5000)
wend
endsub

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2008-02-27 20:17:38 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
nothing changes, it will stop if i have more than 500 bandages.

what does "return false" command mean?


Top
   
 Post subject:
PostPosted: 2008-02-27 21:40:56 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Code:
while  
   var bandages = "0x0000" ; graphical type of bandages


Mr Nmy, а перед sub начало цикла втыкать не пробовал?

utternoob
Try it:

Code:
sub getBandagesFromBank() 
   var bandages = "0x0000" ; graphical type of bandages
   while NOT UO.Dead()
      if uo.count( bandages ) < 500 then
           uo.findtype( bandages, "-1", uo.objAtLayer( "Bank" ) )
           if not uo.findcount() then
              uo.print( "Bandages was not found in bankbox." )
              return
           endif
           uo.moveitem( "finditem", "500" )
           uo.print( "Bandages was be moved." )
      endif
      wait(5000)
   wend
endsub

_________________
Ни один скрипт не работает? Пора обновить Инжект...
Все работает, но хочется большего? Пора переходить на стелс...


Last edited by Edred on 2008-02-27 23:31:42, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2008-02-27 21:59:10 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Эээ, шо за бред пишем?

учимсо закрывать ифы.. Дать сцылку на урок? :roll:

_________________
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.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2008-02-27 22:13:14 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Я тут писал, ошыбся :))

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2008-02-27 22:13:57 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
thanks all, now its working how i wanted it to work :D

thats all i needed

Code:
sub getBandagesFromBank2()
   while NOT UO.Dead()
      if uo.count('bandage') < 100 then
           uo.findtype('bandage', "-1", uo.objAtLayer( "Bank" ) )
      endif
      uo.moveitem( "finditem", "100")
      wait(5000)
   wend
endsub


Top
   
 Post subject:
PostPosted: 2008-02-27 23:32:52 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Destruction
Потерял при копировании, спасибо. Поправил код...

_________________
Ни один скрипт не работает? Пора обновить Инжект...

Все работает, но хочется большего? Пора переходить на стелс...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited