Yoko

All sides of Injection
It is currently 2024-03-28 15:41:13

All times are UTC+02:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 2012-09-05 18:59:33 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
вот это скриптик на рыбалку, он очень хороший - ловит с корабля. Ловит, ловит, а потом дает команду штурману - back, forward, stop. Корабль джижется, но бывает, что не останавливаетца! То есть вообще не останавливаетца! В чем может быть трабла? подскажите пожалуйста!
Code:
sub main()
   var x
   while 1
      submain()
      x=uo.getx()
      uo.msg('Back')
      checklag()
      repeat
         wait(100)
      until uo.getx() > x+8
      uo.msg('Stop')
      submain()
      x=uo.getx()
      uo.msg('Forward')
      checklag()
      repeat
         wait(100)
      until uo.getx() < x-8
      uo.msg('Stop')
   wend
end sub
sub submain()
   var mx, my, mz, i, j
   mx = UO.GetX('self')
   my = UO.GetY('self')
   mz = UO.GetZ('self')   
   for i = mx-4 to mx+4
      for j = my-4 to my+4
         Tohide()
         UO.Print('Ловим в координатах: '+str(mx-i)+' '+str(my-j))
         fishing(i,j,mz)
      next
   next
endsub
sub fishing(mx,my,mz)
   var n
   for n=0 to 10
      checklag()
      uo.waittargettile('1341',mx,my,mz)
      uo.usetype('0x0DC0')
      if waitforfish()==1 then
         return
      endif
   next
endsub
sub waitforfish()
   var n
   for n=0 to 100
      if uo.injournal('no fish here|fishing in water|You pull out') then
         return 1
      endif
      if uo.injournal('but fail') then
         return
      endif
      wait(1000)     
   next
endsub
sub Tohide()
   while not uo.Hidden()
      uo.warmode(0)
      uo.Print('Пытаемся уйти в хайд...')
      uo.UseSkill('Hiding')
      wait(4000)
   wend
end sub
sub CheckLag()
   repeat
      UO.DeleteJournal()
      UO.Click('backpack')
   until backpack()==1
endsub
sub backpack()
   var n
   for n=0 to 200
      if uo.injournal('a backpack') then
         return 1
      endif
      wait(200)
   next
endsub


Top
   
PostPosted: 2012-09-05 19:26:28 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
попробуй добавить проверку по Y

Code:
      x=uo.getx()
      y=uo.gety()
      uo.msg('Back')


      repeat
         wait(100)
      until uo.getx() > x+8 or uo.getx() > x-8 or uo.gety() > y-8 or uo.gety() > y+8

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


Top
   
PostPosted: 2012-09-05 22:15:10 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
сейчас вот такое получилось (я может не правильно вставил!) :
Code:
sub main()
   var x
   while 1
      submain()
      x=uo.getx()
      y=uo.gety()
      uo.msg('Back')


      repeat
         wait(100)
      until uo.getx() > x+8 or uo.getx() > x-8 or uo.gety() > y-8 or uo.gety() > y+8
      uo.msg('Stop')
      submain()
      x=uo.getx()
      uo.msg('Forward')
      checklag()
      repeat
         wait(100)
      until uo.getx() < x-8
      uo.msg('Stop')
   wend


Line 12: Variable undefined - Y


Top
   
PostPosted: 2012-09-06 06:59:14 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Code:
   var x, y

:roll:

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


Top
   
PostPosted: 2012-09-06 11:42:15 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
Мираж спс, эт работает, тока шлюпка не останавливаетца! Может докучи проплыть, пока не упретца во штонибудь. Сори что на мозг влияю - может это как то исправить можно?


Top
   
PostPosted: 2012-09-06 13:36:21 
Offline

Joined: 2011-06-11 19:54:23
Posts: 820
Mirage wrote:
попробуй добавить проверку по Y

Code:
      x=uo.getx()
      y=uo.gety()
      uo.msg('Back')


      repeat
         wait(100)
      until uo.getx() > x+8 or uo.getx() > x-8 or uo.gety() > y-8 or uo.gety() > y+8

Code:
uo.getx()>x+8 or uo.getx()<x–8
с у тоже самое, думаю прокатит)


Top
   
PostPosted: 2012-09-06 16:13:48 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
вот, сейчас у меня так, но корбаль не останавливается!
Code:
sub main()
   var x, y
   while 1
      submain()
      x=uo.getx()
      y=uo.gety()
      uo.msg('Back')
вот, сейчас у меня так, но пасудина не останавливается!

      repeat
         wait(100)
      [color=#0000FF]until uo.getx() > x+8 or uo.getx() < x-8 or uo.gety() > y-8 or uo.gety() > y+8[/color]
      uo.msg('Stop')
      submain()
      x=uo.getx()
      uo.msg('Forward')
      checklag()
      repeat
         wait(100)
      until uo.getx() < x-8
      uo.msg('Stop')
   wend


Top
   
PostPosted: 2012-09-06 17:25:54 
Offline

Joined: 2011-06-11 19:54:23
Posts: 820
Code:
sub main()
   var x=0, y=0
   while 1
      submain()
      x=uo.getx()
      y=uo.gety()
      uo.msg('Back')
      repeat
         wait(100)
      until uo.getx() > x+8 or uo.getx() < x-8 or uo.gety() < y-8 or uo.gety() > y+8
      uo.msg('Stop')
      submain()
      x=uo.getx()
      y=uo.gety()
      uo.msg('Forward')
      checklag()
      repeat
         wait(100)
      until uo.getx() > x+8 or uo.getx() < x-8 or uo.gety() < y-8 or uo.gety() > y+8
      uo.msg('Stop')
   wend
end sub


А так попробуй


Top
   
PostPosted: 2012-09-06 19:07:40 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
до чего не внимательные и не логичные пользователи бывают... :D

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


Top
   
PostPosted: 2012-09-06 20:38:43 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
:lol: даа ну спасииб Джуси и Мираж! надо мне учебник читать по скриптам. это очень хорошо, што вы помагаете!


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 20 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