Yoko

All sides of Injection
It is currently 2024-03-29 17:01:34

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: добор стрел
PostPosted: 2015-07-12 12:50:56 
Offline

Joined: 2015-07-12 12:38:31
Posts: 2
всем привет! слепил вот такой на арчери.
я стреляю в манекен, потом его же и лечу;
манекен перекладывает стрелы из-под себя и из себя в склад.
я добираю стрелы со склада. Почему-то он добирает по 100 стрел на каждом круге, хотелось бы чтобы он добирал только когда меньше 100. в чем моя ошибка?


Code:
while UO.SkillVal( 'Archery' ) < 1000



uo.warmode(true)
uo.attack('opponent')
repeat
  if uo.getHP() < uo.getMaxHP()/4 || uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then 
    uo.warmode(false)
    repeat
      uo.waittargetobject('self')
      uo.usetype(uo.getGraphic('bandages'))
      wait(350)
    until uo.getHP() == uo.getMaxHP()
    repeat
      uo.waittargetobject('opponent')
      uo.usetype(uo.getGraphic('bandages'))
      wait(350)
    until uo.getHP('opponent') == uo.getMaxHP('opponent')
    wait(250)
    uo.UseObject('shield') 
    wait(500)
    uo.UseObject('weapon')
    wait(500)
   UO.canceltarget()
   
If UO.Count( 'strela' ) < 100 Then
UO.Findtype( 'strela', -1, 'sklad')
UO.Grab( '100', 'finditem')
wait(1000)
CheckLag()
Endif
     

    uo.warmode(true)
    uo.attack('opponent')
   

  endif
  wait(700)
until uo.dead()
wend
endsub


sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
while uo.injournal('backpack')
uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!')
wend
end sub


Top
   
PostPosted: 2015-07-13 11:58:04 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Code:
If UO.Count( 'strela' ) < 100 Then ; если стрел в паке меньше 100 тогда
UO.Findtype( 'strela', -1, 'sklad')
UO.Grab( '100', 'finditem') ; берем 100 стрел
wait(1000)
CheckLag()
Endif

Если нужно добрать до 100 то будет вот такая строка:
Code:
If UO.Count( 'strela' ) < 100 Then ; если стрел в паке меньше 100 тогда
UO.Findtype( 'strela', -1, 'sklad')
UO.Grab( str(100-UO.Count( 'strela' )), 'finditem') ; ДОБИРАЕМ до 100 стрел
wait(1000)
CheckLag()
Endif

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2015-07-14 00:02:45 
Offline

Joined: 2015-07-12 12:38:31
Posts: 2
Mirage wrote:
Code:
If UO.Count( 'strela' ) < 100 Then ; если стрел в паке меньше 100 тогда
UO.Findtype( 'strela', -1, 'sklad')
UO.Grab( '100', 'finditem') ; берем 100 стрел
wait(1000)
CheckLag()
Endif

Если нужно добрать до 100 то будет вот такая строка:
Code:
If UO.Count( 'strela' ) < 100 Then ; если стрел в паке меньше 100 тогда
UO.Findtype( 'strela', -1, 'sklad')
UO.Grab( str(100-UO.Count( 'strela' )), 'finditem') ; ДОБИРАЕМ до 100 стрел
wait(1000)
CheckLag()
Endif



так же добирает на каждом круге по 100 стрел, надо чтобы добирал ЕСЛИ ИХ МЕНЬШЕ 100


Top
   
PostPosted: 2015-07-14 14:04:39 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
:roll: какое то странное цитирование

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 26 guests


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:  
cron
Powered by phpBB® Forum Software © phpBB Limited