Yoko

All sides of Injection
It is currently 2024-03-28 12:28:49

All times are UTC+02:00




Post new topic  Reply to topic  [ 22 posts ]  Go to page Previous 1 2
Author Message
 Post subject: Re: Veterinary
PostPosted: 2016-06-25 12:31:55 
Offline

Joined: 2011-05-23 00:33:30
Posts: 949
Я не пойму что ты делаешь

if uo.getquantity('0x0E21') < 10 then - значение вписывается как ID а не type, я же сразу вписал "finditem"
If UO.FindCount() > 0 Then
UO.MoveItem( 'finditem', '200' ) - не указан контейнер куда кидать

_________________
CodeSweeper


Top
   
 Post subject: Re: Veterinary
PostPosted: 2016-06-25 12:45:41 
Offline

Joined: 2016-06-12 20:36:28
Posts: 34
Да, я чета не то написал там.
Во так работает вроде как надо:
Code:
#####################################################################
; Veterinary. v.1.08b (c) Edred
;
sub Veterinar()
   ; Ставим рядом двух чаров, у каждого по лошади. Рядом с чарами
   ; сундук. В сундук чистые бинты. Сериалы лошадей каждому в скрипт.
   ; Стравливаем лошадей (можно использовать скрипт provocat2.sc) и
   ; качаемся. Внимание! При низком скилле за работой скрипта надо
   ; следить (одним чаром, вытащив на экран статусы обоих лошадей) и
   ; периодически садиться на лошадь и отъезжать в сторону, слезать с нее
   ; и давать обоим чарам вылечить лошадей полностью. После 40-45 скилла
   ; нужда в этом отпадает (скилл растет быстро).
   ;
   VAR Sunduk = '0x40EA5CD6'       ; Сериал сундука с бинтами и медом
   VAR Bandag = '0x0E21'          ; Тип бинтов
   VAR BlBandag = '0x0E20'   ; Тип грязных бинтов
   VAR Refresh = '0x0F0B' ; Тип банки рефреш
   VAR Horse1 = '0x00C9442F'      ; Сериал лошади ЭТОГО чара
   VAR fizzle = 'You apply bandages to a horse but fail'
   VAR Success = 'You apply the bandages to a horse'
   VAR mustwait = 'You must wait to use bandages again'
   VAR k
   UO.UseObject( Sunduk )
   wait(1000)
   While UO.SkillVal( 'Veterinary' ) < 1000
         uo.findtype("0x0E21")
         if uo.getquantity("finditem") < 10 then
         UO.FindType( Bandag, '-1', Sunduk )
         If UO.FindCount() > 0 Then
            UO.MoveItem( 'finditem', '200', 'backpack' )
            wait(500)
         Endif
         Endif
         else
      UO.Print( 'Bandage not found! Script terminated!' )
         return
      Endif
      UO.FindType( BlBandag )
      If UO.FindCount() > 0 Then
         UO.MoveItem( 'finditem', '0', sunduk )
         wait(500)
      Endif
      If UO.Count( Refresh ) < 1 Then
        UO.FindType( Refresh, '-1', Sunduk )
        If UO.FindCount() > 0 Then
           UO.MoveItem( 'finditem', '1' )
          wait(500)
        Endif
      Endif
      If UO.GetHP( Horse1 ) < UO.GetMaxHP( Horse1 ) Then
         uo.DeleteJournal( fizzle )
         uo.DeleteJournal( success )
         uo.DeleteJournal( mustwait )
         UO.WaitTargetObject( Horse1 )
         UO.UseType( Bandag )
         k = 0
         repeat
            wait(100)
            k = k + 1
         until UO.InJournal( fizzle ) OR UO.InJournal( success ) OR UO.InJournal( mustwait ) OR k > 30
         If UO.InJournal( success ) Then
            wait(2500)
         Endif
         If UO.InJournal( mustwait ) Then
            wait(500)
         Endif
         wait(1500)
      Else
         wait(500)   
      Endif
      if uo.stamina < 30 then
         uo.usetype('0x0F0B')
      end if
   Wend
endsub


Только кажется вот это еще лишнее, хотя и не мешает:
Code:
uo.findtype("0x0E21")


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 22 posts ]  Go to page Previous 1 2

All times are UTC+02:00


Who is online

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