Yoko

All sides of Injection
It is currently 2025-12-18 10:36:26

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2009-03-24 20:54:40 
Offline

Joined: 2008-05-29 15:28:56
Posts: 16
Code:
var MaxFailure=2 # Через сколько подряд безрезультатных попыток переходить к другой клетке.

sub FishingAround()
var iX,iY
for var iStep=0 to 1000
   for iX=-6 to 6
     for iY=-6 to 6
       GetAllFish(UO.GetX()+iX,UO.GetY()+iY)
     next
   next
next
end sub

Sub GetAllFish(iX,iY)
var counter=0
repeat
   counter=counter+1
   UO.DeleteJournal()
   UO.WaitTargetTile(0,iX,iY,0)
   UO.UseType('0x097B') # кушаем рыбку
   UO.UseType('0x0DBF') # удочка
   while not UO.InJournal('You pull') and not UO.InJournal('but fail') and not UO.InJournal('no fish') and not UO.InJournal('location') and not UO.InJournal('That is too far away')
     wait(100)
   wend
   if UO.InJournal('no fish') OR UO.InJournal('Try fishing elsewhere') OR UO.InJournal('That is too far away') then
     return
   end if
   if UO.InJournal('You pull') then
     counter=0
    GetFish()
   end if
until UO.Injournal('no fish') OR UO.InJournal('Try fishing elsewhere') OR UO.InJournal('That is too far away') OR counter>MaxFailure
end sub

Sub GetFish()
UO.set('finddistance',0)
UO.IgnoreReset()
UO.Ignore('self')
UO.FindType('0x352D',-1,'ground')
UO.Ignore('finditem')
UO.FindType(-1,-1,'ground')
while UO.FindCount()>0
   UO.WaitTargetObject('finditem')
   UO.UseType('0x0F51')
   UO.Ignore('finditem')
   wait(500)
   UO.FindType(-1,-1,'ground')
wend
UO.Ignorereset()
UO.Ignore('self')
UO.FindType('0x352D',-1,'ground')
UO.Ignore('finditem')
UO.FindType(-1,-1,'ground')
while UO.FindCount()>0
   UO.Grab(0,'finditem')
   wait(100)
   UO.FindType(-1,-1,'ground')
wend
UO.Ignorereset()
end sub


вот скрипт но он как обловит все вокруг не выключается и не переходит на начальную точку лова

подскажите где что дописать чтобы он ловил покругу не останавливаясь


Top
   
 Post subject:
PostPosted: 2009-03-24 23:38:31 
Offline

Joined: 2008-12-13 00:00:15
Posts: 174
Code:
for var iStep=0 to 1000 

на
Code:
var i
for i=1 to 1000


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 1 guest


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