Yoko
http://forum.yoko.com.ua/

Fishing
http://forum.yoko.com.ua/viewtopic.php?f=17&t=45057
Page 1 of 1

Author:  Нубецкий [ 2019-06-28 12:44:47 ]
Post subject:  Fishing

Доброго времени суток. Использую этот скрипт на фишинг, но после того как чар выловит рыбу, она падает на пол, и он ее кладет к себе в бек пак, а не в трюм.
Code:
var Bag='0x40448CB8'
var Bag1='0x40103312'
var Bag2='0x40104999'
var Bag3='0x4010442A'
sub main()
   var x
   while 1
      submain()
      x=uo.getx()
      uo.msg('Forward')
      checklag()
      repeat
           wait(100)
      until uo.getx() > x+12
      uo.msg('Stop')
      submain()
      x=uo.getx()
      uo.msg('back')
      checklag()
      repeat
           wait(100)
      until uo.getx() < x-12
      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-6 to mx+6
       for j = my-6 to my+6
            Tohide()
            UO.Print('Ловим в координатах: '+str(mx-i)+' '+str(my-j))
            fishing(i,j,mz)
       next
   next
end sub

sub fishing(mx,my,mz)
   var n
   for n=0 to 10
       checklag()
       uo.waittargettile('1341',mx,my,mz)
       uo.usetype('0x0DBF')
       if waitforfish()==1 then
          return
       endif
   next
end sub

sub waitforfish()
   var n
   for n=0 to 100
       if uo.injournal('no fish here|fishing in water|You pull out') then
           if UO.InJournal("You pull") then
               UO.SetReceivingContainer('Bag')
               UO.findtype('0x09CC','0x0000','ground') ;fish
               UO.grab ('3','finditem')
               wait (500)
               UO.findtype('0x09CD','0x0000','ground') ;fish
               UO.grab ('3','finditem')
               wait (500)
               UO.findtype('0x09CE','0x0000','ground') ;fish
               UO.grab ('3','finditem')
               wait (500)
               UO.findtype('0x09CF','0x0000','ground') ;fish
               UO.grab ('3','finditem')
               wait (500)
               UO.UnSetReceivingContainer()
               UO.SetReceivingContainer('Bag1')
               UO.findtype('0x14EB','0x0000','ground') ;tattered map
               UO.grab ('1','finditem')
               wait (500)
               UO.UnSetReceivingContainer()
               UO.SetReceivingContainer('Bag3')
               UO.findtype('0x0DD6','0x05F6','ground') ;Truly rare fish
               UO.grab ('1','finditem')
               wait (500)
               UO.UnSetReceivingContainer()
               UO.SetReceivingContainer('Bag2')
               UO.findtype('0x0DD6','0x01BB','ground') ;Prize fish
               UO.grab ('1','finditem')
               wait (500)
               UO.UnSetReceivingContainer()
           end if
           return 1
       endif
           if uo.injournal('but fail') then
               return
            endif
       wait(1000)
   next       
end sub

sub Tohide()
   while uo.Hidden()
       uo.warmode(0)
       uo.Print('Пытаемся уйти в хайд...')
       uo.Say('Hiding')
       wait(4000)
   wend
end sub

sub CheckLag()
   repeat
        UO.DeleteJournal()
        UO.Click('backpack')
   until backpack()==1
end sub

sub backpack()
   var n
   for n=0 to 200
       if uo.injournal('a backpack') then
           return 1
       endif
       wait(200)
   next
end sub


Attachments:
fvtj9nd_FB0.jpg
fvtj9nd_FB0.jpg [ 245.24 KiB | Viewed 15505 times ]

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/