Yoko

All sides of Injection
It is currently 2026-01-20 18:51:31

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2008-01-31 07:45:02 
Offline

Joined: 2007-12-30 14:23:05
Posts: 48
ПРоблема в том что нижеприведенный скрипт подбирает любое кол-во руды кроме 1 единицы , пишет что находит, но не подбирает зараза, не могу понять в чем причина

Code:
sub Pickup_ore()

   var a, Exit

   DIM Ore[4]
   Ore[0] = 0x19B9 ## - 4 and more ore
   Ore[1] = 0x19B7 ## - 1 ore
   Ore[2] = 0x19BA ## - 2 ore
   Ore[3] = 0x19B8 ## - 3 ore
   
   UO.Exec('set finddistance 3')
   for a = 0 to 3
      exit=0
      repeat
      uo.FindType(Ore[a], '-1', '1')
      if uo.GetQuantity('finditem') > 0 then
         uo.Grab('0', 'finditem')
         wait(300)
         CheckLag()
      else
         exit=1
      End if
      until Exit==1
   next    
end sub


Top
   
 Post subject:
PostPosted: 2008-01-31 09:24:19 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Попробуй вместо
Code:
uo.Grab('0', 'finditem')

поставить
Code:
uo.moveitem("finditem")

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


Top
   
 Post subject:
PostPosted: 2008-01-31 11:32:13 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
Ошибка в строке
Code:
if uo.GetQuantity('finditem') > 0 then


uo.GetQuantity даст нулевой результат в том случае, если в стопке 1 предмет.

Для проверки результатов работы UO.FindType() используется функция UO.FindCount()


Top
   
 Post subject:
PostPosted: 2008-02-01 05:48:34 
Offline

Joined: 2007-12-30 14:23:05
Posts: 48
Спасибо, помогло


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