Yoko

All sides of Injection
It is currently 2025-10-14 17:28:23

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2011-09-01 02:32:22 
Offline

Joined: 2006-10-26 12:29:30
Posts: 9
Шард X-Cellon.
У нас на шарде переплавка проиходит следующим образом... дабл клик на форджу и потом клик на руду.

Вот не знаю как добавить в скрипт клик по руде в паке

sub Smelt()
VAR Ruda1 = '0x19B9' ; Тип руды
VAR Ruda2 = '0x19B8' ; Тип руды - 3 шт.
VAR Ruda3 = '0x19BA' ; Тип руды - 2 шт.
VAR Ruda4 = '0x0E34' ; Тип руды - 1 шт.
VAR Ing1 = '0x1BEF' ; Тип ингов металлов
VAR Ing2 = '0x1BF2' ; Тип ингов строймата

repeat
UO.Findtype( Ruda1, -1, 1 ) ; Ищем руду на земле
If UO.Findcount() == 0 Then
UO.Findtype( Ruda2, -1, 1 )
If UO.Findcount() == 0 Then
UO.Findtype( Ruda3, -1, 1 )
If UO.Findcount() == 0 Then
UO.Findtype( Ruda4, -1, 1 )
If UO.Findcount() == 0 Then
UO.Print( "No more ore for smelt..." )
Return
Endif
Endif
Endif
Endif
UO.Exec( "moveitem finditem 1" ) ; Тащим 1 в пак
Wait( 1000 )
UO.useObject( '0x40001072' ) ; юзаем форджу
Wait( 500 )
UO.click('Ruda4') <-- сюда что поставить чтобы кликал по руде таргетом от форджи
wait( 500 )

until NOT Uo.CountGround( Ruda1 ) AND NOT UO.CountGround( Ruda2 ) AND NOT UO.CountGround( Ruda3 ) AND NOT UO.CountGround( Ruda4 )
UO.Print( "No more ore for smelt..." )
endsub


Top
   
PostPosted: 2011-09-01 06:40:02 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Если плавишь с пака то вот так:
var sund = '0x40B08251' можно сменить на var sund = 'ground' тогда будет брать с земли.
GET(ore, '0x0000', sund, 2, 2) ; вместо 0x0000 вставляешь нужный цвет либо -1 тогда плавить будет любую. Последняя цифра 2 - сколько забирать руды для плавки.

Code:
var ItemM, timemove
sub Smelt()
   var sund    = '0x40B08251'
   var forge   = '0x1996'
   VAR Ing   = '0x1BEF'
   VAR ore   = '0x19B9'
   VAR ore2   = '0x19BA'
   VAR ore3   = '0x19B8'
   uo.Set('finddistance', 3)
   while 1
      GET(ore, '0x0000', sund, 2, 2)
      UO.DeleteJournal()
      If UO.Count( ore ) Then
         uo.waittargettype(ore)
      endif
      If UO.Count( ore2 ) Then
         uo.waittargettype(ore2)
      endif
      If UO.Count( ore3 ) Then
         uo.waittargettype(ore3)
      endif
      UO.UseFromGround(forge)
      while not UO.InJournal('smelt|put|is consumed|fire is not|see the target')
         wait(100)
      wend
      PUT(Ing, sund)
   wend
end sub

Sub GET(item, col, cont, min, max)
   If UO.Count( item, col ) < min Then
      UO.FindType( item, col, cont )
      if UO.FindCount() > 0 Then
         itemM=UO.GetSerial('finditem')
         timemove=UO.Timer()
         while UO.ContainerOf( UO.GetSerial('finditem') )==cont && timemove+20>UO.Timer()
            uo.moveitem('finditem', max, 'backpack')
            wait(100)
         wend
      else
         UO.CancelMenu()
         MyTerminate()
      endif
   Endif
end sub
Sub PUT(item, cont)
   while UO.Count( item ) > 0
      UO.FindType( item, -1, -1 )
      itemM=UO.GetSerial('finditem')
      timemove=UO.Timer()
      UO.MoveItem( 'finditem', 0, cont )
      while UO.ContainerOf(itemM)=='my' && timemove+20>UO.Timer()
         wait(100)
      wend
   wend
end sub
Sub MyTerminate()
   UO.Set('quiet','1')
   UO.CancelMenu()
   UO.IgnoreReset()
   UO.Set('quiet','0')
   UO.Exec('terminate all')
end sub


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


Top
   
PostPosted: 2011-09-01 08:00:01 
Offline

Joined: 2006-10-26 12:29:30
Posts: 9
Спасибо!


Top
   
PostPosted: 2011-09-01 10:26:50 
Offline

Joined: 2006-10-26 12:29:30
Posts: 9
Ругается вот сюда --> MyTerminate()

Исправил скрипт © Mirage


Top
   
PostPosted: 2011-09-01 11:27:39 
Offline

Joined: 2006-10-26 12:29:30
Posts: 9
Пишет "no menu to cancel"


Top
   
PostPosted: 2011-09-01 11:28:38 
Offline

Joined: 2006-10-26 12:29:30
Posts: 9
вроде как сработало, но один раз положил 2 руды в пак из ящика, переплавил и все


Top
   
PostPosted: 2011-09-01 12:26:34 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
То что что то там пишется - отключи все галки в окне инжекта.
Если 2 рудинки одного цвета то какой то глюк - хз не ловил.
Если две разные руды то такое бывает. Скрипт простенький без всяких дополнительных проверок. Я им плавил в основном железо - качал мининг.
Аа может быть с журналом проблема. Внимательно просмотри сообщения которые пишутся при плавке.

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


Top
   
PostPosted: 2011-09-01 13:19:23 
Offline

Joined: 2006-10-26 12:29:30
Posts: 9
var ItemM, timemove
sub Smelt()
var sund = '0x400165BB'
var forge = '0x0FB1'
VAR Ing = '0x1BEF'
VAR ore = '0x19B9'
VAR ore2 = '0x19BA'
VAR ore3 = '0x19B8'
uo.Set('finddistance', 3)
while 1
GET(ore, -1, sund, 2, 1)
UO.DeleteJournal()
If UO.Count( ore ) Then
uo.waittargettype(ore)
endif
If UO.Count( ore2 ) Then
uo.waittargettype(ore2)
endif
If UO.Count( ore3 ) Then
uo.waittargettype(ore3)
endif
UO.UseFromGround(forge)
while not UO.InJournal('smelt|put|is consumed|fire is not|see the target') <-- здесь должно быть сообщение при использовании форджи?
wait(100)
wend
PUT(Ing, sund)
wend
end sub

Sub GET(item, col, cont, min, max)
If UO.Count( item, col ) < min Then
UO.FindType( item, col, cont )
if UO.FindCount() > 0 Then
itemM=UO.GetSerial('finditem')
timemove=UO.Timer()
while UO.ContainerOf( UO.GetSerial('finditem') )==cont && timemove+20>UO.Timer()
uo.moveitem('finditem', max, 'backpack')
wait(100)
wend
else
UO.CancelMenu()
MyTerminate()
endif
Endif
end sub
Sub PUT(item, cont)
while UO.Count( item ) > 0
UO.FindType( item, -1, -1 )
itemM=UO.GetSerial('finditem')
timemove=UO.Timer()
UO.MoveItem( 'finditem', 0, cont )
while UO.ContainerOf(itemM)=='my' && timemove+20>UO.Timer()
wait(100)
wend
wend
end sub
Sub MyTerminate()
UO.Set('quiet','1')
UO.CancelMenu()
UO.IgnoreReset()
UO.Set('quiet','0')
UO.Exec('terminate all')
end sub


кстати иногда выскакивает ошибка "что то типа не могу перетащить за 0 сек" что-то в этом роде


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 0 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:  
Powered by phpBB® Forum Software © phpBB Limited