Yoko

All sides of Injection
It is currently 2025-10-15 17:17:44

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2010-12-08 18:30:41 
Offline

Joined: 2010-11-15 06:54:09
Posts: 5
Есть следующий скрипт.
идея: на полу два мешка from_bag и to_bag. в фром баг, куча неидентифицированных вещей. мы берем одну, идентифицируем, и кладем в то баг.
проблема: иногда идентифицирует вещь по нескольку раз, перемещает тоже рандомно.
скрипт переделан из скрипта для протравки оружия, написанный Destruction 'ом

Code:
var from_bag=0x7F5A7520    #Power
var to_bag=0x7F5A7500      #Dragon
sub main()
   var item
   while (true)
      uo.findtype(-1,-1,from_bag)
      item=uo.getserial('finditem')
      #no items
      if (UO.FindCount() == 0) then
         uo.sayu('Закончил!')
         return
      endif
      DeleteJournalLine('It appears to be') 
      DeleteJournalLine('normal') 
      while not uo.injournal('It appears to be|normal')
         uo.moveitem(item)
         uo.waittargetobject(item)
         wait(300)
         uo.useskill('Item')
         wait(10000)
      wend
      uo.moveitem(item,0,to_bag)
   wend
end sub

Sub DeleteJournalLine(msg)
   while uo.injournal(msg)
      uo.setjournalline(uo.injournal(msg)-1,"")
   wend
end sub


Top
   
PostPosted: 2010-12-08 23:09:23 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Пробуй.
Code:
var from_bag='0x7F5A7520'    #Power
var to_bag='0x7F5A7500'      #Dragon
var msg ='t is made|t appears to be|normal'
var item, LastTimer
sub main()
WHILE NOT UO.Dead()
   uo.findtype(-1,-1,from_bag)
   if UO.FindCount() > 0 then
      item=uo.getserial('finditem')
      uo.moveitem(item, 0, 'backpack')
      wait(500)
      UO.DeleteJournal()
      LastTimer=UO.Timer()
      uo.Useskill('Item',item)
      repeat
         wait( 300 )
      until UO.InJournal( msg ) or UO.Timer()>LastTimer+150
      uo.moveitem(item,0,to_bag)
      wait(500)
   else
      uo.sayu('Закончил!')
      return
   endif
wend
end sub

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


Top
   
PostPosted: 2010-12-09 15:34:48 
Offline

Joined: 2010-11-15 06:54:09
Posts: 5
Если у него не получаеться идентифицировать с первого раза, он просто игнорирует эту вещь, и переходит на следующую. +задержка в районе 9 секунд повторного использования скилла.


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: Bing [Bot] and 2 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