Yoko

All sides of Injection
It is currently 2024-03-28 22:07:51

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2016-04-25 06:05:22 
Offline

Joined: 2016-04-25 05:57:32
Posts: 3
Берёт инги только если сундук открыт, делает одну бутылку и замирает, если два раза тыкнуть на инструмент , то делает ещё одну бутылку ;(
Помогите пожалуйста разобраться, если я тут разберусь то смогу переделывать етот скрипт и под другие крафтовые скиллы.
Спасибо.
Code:
sub TinkerBottle()
VAR LastTimer
VAR Bottle   = '0x0F0E'
VAR Ing      = '0x1BEF'     
VAR Instrum  = '0x1EBC'
VAR delay1   =  200
VAR sunduk1  = '0x4046353A'
WHILE NOT UO.Dead()

       If UO.Count( Ing ) < 10 Then
     UO.Print("Iron not found")
      UO.FindType( Ing, '-1', sunduk1)
       If UO.FindCount() > 0 Then
    uo.moveitem('finditem',100,'backpack')
         wait( delay1 )
        Else
         UO.Print( 'Iron not found' )
            return
        Endif
    Endif
   Repeat
     UO.DeleteJournal()
      LastTimer=UO.Timer()
       UO.WaitMenu ('Tinkering', 'Miscellaneous', 'Miscellaneous', 'Empty Bottle' )
       UO.Usetype( Instrum )
      repeat
        wait( delay1 )
      until UO.InJournal("You make|fail|You broke") or UO.Timer()>LastTimer+150
   Until UO.Count( Bottle ) > 0
checklag()
;    wait( delay1 )
      while UO.Count( Bottle ) > 0
       UO.FindType( Bottle, -1, -1 )
       UO.MoveItem( 'finditem', 0, sunduk1 )
checklag()
      wend
   wait( delay1 )
UO.FindType( Bottle, -1, sunduk1 )
UO.Print('Bottle in sunduk: '+Str(UO.GetQuantity('finditem')))
WEND
end sub

   

Sub CheckLag()
   DeleteJournal( 'Backpack' )
   UO.Click( 'Backpack' )
   repeat
      wait(100)
   until UO.InJournal( 'Backpack' )
   return
end sub


Sub DeleteJournal(msg)
var nom=UO.InJournal(msg)
  if nom>0 then
     UO.SetJournalLine(Nom - 1," ----- 8< ----- ")
     DeleteJournal(msg)
  endif
endsub



Top
   
PostPosted: 2016-04-25 07:15:40 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Не срабатывает ловушка
Code:
      repeat
        wait( delay1 )
      until UO.InJournal("You make|fail|You broke") or UO.Timer()>LastTimer+150

Попробуй прописать вот так:
Code:
      repeat
        wait( delay1 )
      until UO.InJournal("You make|fail|You broke|the item") or UO.Timer()>LastTimer+150


И проверяй меню. Оно меняется от скилла и количества элементов.

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


Top
   
PostPosted: 2016-04-25 07:56:23 
Offline

Joined: 2016-04-25 05:57:32
Posts: 3
Всё так же , берёт 100 ингов, делает одну бутылку и всё
получается тут где то
Endif
Repeat
UO.DeleteJournal()
LastTimer=UO.Timer()
UO.WaitMenu ('Tinkering', 'Miscellaneous', 'Miscellaneous', 'Empty Bottle' )
UO.Usetype( Instrum )
repeat
вот ета часть норм,он делает
wait( delay1 )
until UO.InJournal("You make|fail|You broke|the item") or UO.Timer()>LastTimer+150
Until UO.Count( Bottle ) > 0
вот ету я не могу понять,сообщение не всегда выводится.
checklag()
; wait( delay1 )
while UO.Count( Bottle ) > 0
UO.FindType( Bottle, -1, -1 )
UO.MoveItem( 'finditem', 0, sunduk1 )
checklag()
вот тут он выжидает,если бутылок больше одной, он находит её и найденный предмет перемещает в сундук.

я незнаю что такое венд, и зачем нужен тут lastTimer ? первый раз с ним сталкиваюсь


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 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