Code:
;<=-------------------------------------------------------------------------------=>
; ********************************* Animal Taming *********************************
;<=-------------------------------------------------------------------------------=>
sub Taming()
   var n, j, AllNames_Key, Finded, Serial
;<=-------------------------------------------------------------------------------=>
;************************************ Настройки ***********************************
;<=-------------------------------------------------------------------------------=>
   AllNames_Key = 90        ; Клавиша вызываемая фенкцию allnames - по умолчанию 'Z'
   dim Animal[10]           ; Количество NPC в списке приручаемых для поиска +1
   Animal[1]="Bull [npc]"   ; Сам список животных...
   Animal[2]="Llama [npc]"
   Animal[3]="Dog [npc]"
   Animal[4]="Cow [npc]"
   Animal[5]="sheep [npc]"
   Animal[6]="Chicken [npc]"
   Animal[7]="Rat [npc]"
   Animal[8]="Pig [npc]"
   Animal[9]="Snake [npc]"
   Animal[10]=""
;***********************************************************************************  
   UO.DeleteJournal()
   repeat 
SearchStart:
    UO.Print('Searching NPC...')
    UO.DeleteJournal()
    UO.Press(AllNames_Key);
    Wait(100)
SearchNext:
    Finded = ''
    if (UO.InJournal('[npc]')==0) then ; Если нету не одного NPC 
       GOTO SearchEnd 
    endif   
    J = UO.InJournal('[npc]')-1 ; Ищем NPC по журналу
    n=1
    while not Animal[n]==''
     if (UO.GetName(UO.JournalSerial(J)) == Animal[n]) then
        Finded = UO.GetName(UO.JournalSerial(J))
     endif
     n=n+1
    wend
    if Finded == '' then
       UO.SetJournalLine(J,'')
;       UO.ShowJournal('100') ; для отладки....
       GOTO SearchNext
    endif   
; конец цыкла SearchNext
    Finded = UO.GetName(UO.JournalSerial(J))
    Serial = UO.JournalSerial(J)
    TimeAnimal(Serial)
    GOTO SearchStart
SearchEnd:    
    Wait(5000)
   Until UO.SkillVal('Animal Taming','1') >= 1000
   UO.Print('Навык Animal Taming прокачен...')
end sub
sub TimeAnimal(Animal)
    UO.Print('Taming '+UO.GetName(Animal)+'...')
   repeat
    GotoXY(UO.GetX(Animal),UO.GetY(Animal))
    if (UO.GetName(Animal)=='sheep [npc]') then
       UO.WaitTargetObject(Animal)
       UO.usetype('0x0F51')
       Wait(250)
    endif
    UO.DeleteJournal()
    Wait(100)
    UO.WaitTargetObject(Animal)
    UO.UseSkill('Animal Taming')
    While not UO.InJournal("accept you as its master") and not UO.InJournal("You fail to tame the") and not UO.InJournal("I am too far away") and not UO.InJournal("You are your own master") and not UO.InJournal("already tame") and not UO.InJournal("quantity taming skill") and not UO.InJournal("can't") and not UO.InJournal("creature very hungry")
     Wait(100)
    Wend   
   Until UO.InJournal("accept you as its master") or UO.InJournal("You are your own master") or UO.InJournal("already tame") or UO.InJournal("quantity taming skill") or UO.InJournal("can't") or UO.InJournal("creature very hungry") or not uo.GetDistance(Animal)
    UO.Print('Aminal tamed successfuly')
    if not UO.InJournal("has be removed") and UO.GetDistance(Animal) then
       UO.Print('Kill '+UO.GetName(Animal)+'...');
       UO.Attack(Animal)
       GotoXY(UO.GetX(Animal),UO.GetY(Animal))
       while not UO.InJournal("Body of")
         Wait(100)
       wend
       UO.WarMode(0)
    endif   
end sub