Yoko

All sides of Injection
It is currently 2025-12-28 00:34:08

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2005-06-17 07:14:38 
Offline

Joined: 2005-06-12 09:14:09
Posts: 52
Location: Moscow, Russia
Вот этот скрипт время от времени выдает ошибку парсера и повисает. При попытке перезапустить выполнение скрипта - та же ошибка. Помогает только перезапуск инжекта. Что тут не так?
Code:
sub Tinkering()

uo.exec('addobject sunduk')
while uo.targeting()
  wait(100)
wend
while not uo.Dead() or UO.SkillVal('Tinkering')==1000
  uo.FindType('0x1BF2','0x0000','backpack')
  if uo.GetQuantity('finditem')<=10 then
    uo.FindType('0x0F0E','0x0000','backpack')
    if uo.GetQuantity('finditem')>25 then
      uo.SetReceivingContainer('sunduk')
      wait(100)
      uo.Grab('all','finditem')
      wait(100)
      uo.UnSetReceivingContainer()
    end if
    uo.FindType('0x1BF2','0x0000','sunduk')
    wait(100)
    uo.Grab('100','finditem')
    wait(100)
  end if
  CheckLag()
  uo.Waitmenu('Tinkering','Tools','Tools','empty bottle (2 Iron Ingot)')
  uo.UseType('0x1EBC')
  while not uo.InJournal("You put") and not uo.InJournal("failed")
    wait(300)
  wend
wend
end sub

Sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
  wait(50)
until uo.InJournal('backpack')
end sub


Top
   
 Post subject:
PostPosted: 2005-06-17 07:41:56 
Offline
User avatar

Joined: 2005-05-21 07:12:12
Posts: 163
Location: DRW
Странный какой-то while. Должно быть, скорее всего, так:

while not uo.Dead() and not UO.SkillVal('Tinkering')==1000


Top
   
 Post subject:
PostPosted: 2005-06-17 08:18:09 
Offline
Sphere expert
User avatar

Joined: 2004-10-01 08:27:38
Posts: 1143
Location: Уфа
Code:
sub Tinkering() 

uo.exec('addobject sunduk')
while uo.targeting()
  wait(100)
wend
while not uo.Dead() or UO.SkillVal('Tinkering',1)<1000
  uo.FindType('0x1BF2','0x0000','backpack')
  wait(100)
  if uo.GetQuantity('finditem')<=10 then
    uo.FindType('0x0F0E','0x0000','backpack')
    wait(100)
    if uo.GetQuantity('finditem')>25 then
      CheckLag()
      uo.moveitem('finditem','-1','sunduk')
      wait(700)
    end if
    uo.FindType('0x1BF2','0x0000','sunduk')
    wait(100)
    CheckLag()
    uo.moveitem('finditem','100','backpack')
    wait(700)
  end if
  CheckLag()
  uo.Waitmenu('Tinkering','Tools','Tools','empty bottle (2 Iron Ingot)')
  uo.UseType('0x1EBC')
  while not uo.InJournal("You put") and not uo.InJournal("failed")
    wait(300)
  wend
wend
end sub

Sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
  wait(50)
until uo.InJournal('backpack')
end sub

_________________
Сделал дело - флуди смело !!!


Top
   
 Post subject:
PostPosted: 2005-06-17 11:45:18 
Offline

Joined: 2005-06-12 09:14:09
Posts: 52
Location: Moscow, Russia
Эмм... А по пунктам? Чтоб на будущее таких ошибок не допускать...


Top
   
 Post subject:
PostPosted: 2005-06-17 13:22:20 
Offline
Sphere expert
User avatar

Joined: 2004-10-01 08:27:38
Posts: 1143
Location: Уфа
Tergos wrote:
Эмм... А по пунктам? Чтоб на будущее таких ошибок не допускать...

Grab заменил на MoveItem ибо так посовременее.
Задержки увеличил на перемещение итемов, ибо ты слишком быстро всё пытался делать.
Проверку на лаги и ВС поставил перед перемещением итемов.

_________________
Сделал дело - флуди смело !!!


Top
   
 Post subject:
PostPosted: 2005-06-17 20:46:50 
Offline

Joined: 2005-06-12 09:14:09
Posts: 52
Location: Moscow, Russia
А из-за чего мог виснуть?


Top
   
 Post subject:
PostPosted: 2005-06-17 21:05:38 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Из-за слишком малых задержок после Мувов.


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

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 4 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