Yoko

All sides of Injection
It is currently 2024-03-28 11:38:03

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2019-05-08 13:15:58 
Offline

Joined: 2019-05-08 12:55:49
Posts: 3
Доброго времени суток. Столкнулся с проблемой в скрипте на скупку. Если в магазине 2 и более вендоров, то зачастую чар не успевает купить у одного и бежит к следующему вендору. Я не особо силен в скриптах, пытался поставить паузу перед репитом, но эта пауза работает перед покупкой только у первого вендора, далее чар сразу бежит к следующему вендору так и не сделав первоначальную закупку. Если кто может, подскажите где воткнуть паузу, заранее спасибо)

Code:
sub Buy()
   DIM Vens[2]
   Vens[1]='0x0190'
   Vens[2]='0x0191'
   var mx, my, mz, g, d
   mx = UO.GetX('self')
   my = UO.GetY('self')
   mz = UO.GetZ('self')
   uo.ignorereset()
   uo.ignore('self')
   UO.print('Начанаем Закупку!')
   for d=1 to distance
      uo.set('finddistance',d)   
      for g=1 to 2
         repeat
            wait(100)
            UO.FindType(Vens[g],-1,'ground')
            If uo.FindCount()> 0 then
               if uo.getz('finditem')<uo.getz('self')+3 and uo.getz('finditem')>uo.getz('self')-3 then
                  UO.Print(uo.GetName('finditem')+ ' Иди сюда')
                  WalkN(0,0,'finditem') 
                  If UO.GetDistance('finditem')<=2 then
                     UO.Print('Закупаю....') 
                     uo.Buy(BuyListName,UO.GetName('finditem'))
                     checklag()
                     uo.msg(uo.GetName('finditem')+ ' bye guards')
                  else
                     UO.Print(uo.GetName('finditem')+ 'Спрятался.')
                  end if
               endif
               uo.ignore('finditem')
            end if
         until uo.FindCount()==0
      next
   next
end sub


Top
   
PostPosted: 2019-05-11 16:13:01 
Offline

Joined: 2019-05-08 12:55:49
Posts: 3
Нубецкий wrote:
Доброго времени суток. Столкнулся с проблемой в скрипте на скупку. Если в магазине 2 и более вендоров, то зачастую чар не успевает купить у одного и бежит к следующему вендору. Я не особо силен в скриптах, пытался поставить паузу перед репитом, но эта пауза работает перед покупкой только у первого вендора, далее чар сразу бежит к следующему вендору так и не сделав первоначальную закупку. Если кто может, подскажите где воткнуть паузу, заранее спасибо)

Code:
sub Buy()
   DIM Vens[2]
   Vens[1]='0x0190'
   Vens[2]='0x0191'
   var mx, my, mz, g, d
   mx = UO.GetX('self')
   my = UO.GetY('self')
   mz = UO.GetZ('self')
   uo.ignorereset()
   uo.ignore('self')
   UO.print('Начанаем Закупку!')
   for d=1 to distance
      uo.set('finddistance',d)   
      for g=1 to 2
         repeat
            wait(100)
            UO.FindType(Vens[g],-1,'ground')
            If uo.FindCount()> 0 then
               if uo.getz('finditem')<uo.getz('self')+3 and uo.getz('finditem')>uo.getz('self')-3 then
                  UO.Print(uo.GetName('finditem')+ ' Иди сюда')
                  WalkN(0,0,'finditem') 
                  If UO.GetDistance('finditem')<=2 then
                     UO.Print('Закупаю....') 
                     uo.Buy(BuyListName,UO.GetName('finditem'))
                     checklag()
                     uo.msg(uo.GetName('finditem')+ ' bye guards')
                  else
                     UO.Print(uo.GetName('finditem')+ 'Спрятался.')
                  end if
               endif
               uo.ignore('finditem')
            end if
         until uo.FindCount()==0
      next
   next
end sub

Проблему решил, поставил паузу перед checklag() 2000, стало норм, чар успевает купить у первого и пойти ко второму.


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 14 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