Yoko

All sides of Injection
It is currently 2024-03-28 14:23:34

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2006-12-25 18:37:17 
Offline

Joined: 2005-05-02 17:37:12
Posts: 46
Делает до упора вещи, если нет молотков и тонгов, изготавливает и далее делает, как обычно сетуп
Code:
var INSTR = '0x1EB8'       ; инструмент тинкера
var Metal = '0x1BF2'
var kol_met = '2000'       ;  по сколько хапаем металла
VAR MaxWeight= ((uo.STR*3.5)+39)
var Izd

sub setup()
   uo.Exec('addobject Box1')
   while uo.Targeting()
   wait(100)
   wend
   uo.Exec('addobject Bagpak')
   while uo.Targeting()
   wait(100)
   wend
   uo.Exec('addobject Musorka')
   while uo.Targeting()
   wait(100)
   wend
   uo.Exec('addobject obj')
   while uo.Targeting()
   wait(100)
   wend
    Izd = uo.GetGraphic('obj')
    Uo.addtype('Izdelie',Izd)
end sub

sub main()                      ; Так как сначала изготавливаем инструмент, то эта процедура делает инструмент
uo.setreceivingcontainer('Bagpak')    ; Бакпак по умолчанию приемный контейнер
while not uo.dead() ; нет то берем
   wait(2000)
   uo.useobject('Box1')              ; открываем бокс с металлом
   wait(1000)
   if uo.count(INSTR) < 2  then
       uo.findtype(INSTR,'-1','Box1')
       wait(500)
       UO.grab('1','finditem')
       Wait(2000)
   end if
   if uo.count(Metal) < 20  then             ; ----   Если ингов мало берем
       uo.findtype(Metal,'-1','Box1')
       wait(500)
       UO.grab(Kol_met,'finditem')
      Wait(1000)
   end if
   while uo.count('0x13E3') < 2      ;   если молотков мало то делаем
       uo.print('delaem molot')
      UO.usetype(INSTR)  ;  ---------- Делаем молотки
      wait(3000)
      UO.LClick(422,311)   ; перелистываем на страницу
      wait(2000)
      UO.LClick(273,170)   ;  делаем молоток
      wait(6000)
   wend

   while uo.count('0x0FBB') < 2      ;   если тонгов мало то делаем
      UO.usetype(INSTR)  ;  ---------- Делаем тонги
      wait(3000)
      UO.LClick(422,311)   ; перелистываем на страницу
      wait(2000)
      UO.LClick(275,148)   ;  делаем тонг
      wait(6000)
   wend
   proizv()
wend
end sub

sub proizv()
   while uo.count(Metal) > 20 and  UO.Weight < MaxWeight and uo.count('0x13E3') > 0
   UO.usetype('0x13E3')  ;  ---------- Используем молоток
   wait(1500)
   UO.LClick(323,454)
   wait(5000)             ; Изготовим последнюю вещь   
   wend
   ; sell()
   sbros()
end sub

sub sbros()
   repeat
   uo.findtype('Izdelie')
   uo.moveitem('finditem','0','Musorka')      ; Сбросим изделия в сундук
   wait(600)
   uo.print('naideno -' + str(uo.count('Izdelie')))
   until not uo.count('Izdelie')
end sub


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

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