Yoko

All sides of Injection
It is currently 2025-11-23 23:53:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2004-10-28 00:43:59 
Offline
User avatar

Joined: 2004-09-25 04:16:39
Posts: 22
Code:
sub tinker() 
   VAR Sunduk = '0x4175C949'       ; Сериал сундука
   VAR Ingi = '0x1BF2'             ; Тип ингов
   VAR Instrum = '0x1EBC'          ; Тип инструмента тинкера
   VAR Bottle = '0x0F0E'           ; Тип бутылки
   VAR Kolvo = 3                   ; Брать ингов
   VAR k = 0
   While TRUE
      UO.FindType( Ingi, -1, Sunduk )   ; Ищем инги в сундуке
      If UO.FindCount() == 0 Then
         UO.Print("Iron Ingots not found, script terminated")
         return
      Endif
      UO.Grab( Str( Kolvo ), 'finditem' )
      wait( 2000 )
      While UO.Count( Ingi ) > 0
         ; Пока в паке есть инги
         UO.Print('Ostalos ' + Str( UO.Count( Ingi ) ) + ' ingots' )
         UO.DeleteJournal()
         UO.CancelMenu()
         UO.WaitMenu ('Tinkering', 'Tools', 'Tools', 'empty bottle' )
         UO.UseType( Instrum )
         k = 0
         while NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND ( k < 30 )
            k = k + 1
            wait(500)
         wend
         if UO.Count( Bottle ) > 0 then
            UO.FindType( Bottle, -1, -1 )
            UO.MoveItem( 'finditem', 0, Sunduk )
            wait( 1000 )
            UO.Print( 'Bottle moved' )
         end if
      Wend
   Wend
end sub


Проблема в том что когда у чара остаётся 2 инга и он неможет скрафить бутылку на этом макрос зависает и пытается скафтить из 2х ингов бутылку:) :(
ЕСЛИ ВАМ несложно исправте его чтобы он докладывал ингов когда в паке меньше 2х ингов


Top
   
 Post subject:
PostPosted: 2004-10-28 06:18:04 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
While UO.Count( Ingi ) > 0

-->

While UO.Count( Ingi ) > 2


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 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