Сделал только автомат, убрал кормление добавил проверку на "память" у животного. (специфика моего шарда

)
теперь просто добавляете типы и впиред в загоны...
Как то так:
Code:
# Автоматический поиск (Авто) - для загонов. #
# Постоянно ищет животное из массива. При нахождении #
# сам подходит к нему и пытается приручить. При удачном #
# исходе отпускает или убивает (см. Настройки). #
# При неудачном (если мал скилл или уже притамлено) убивает. #
# Режим кормления не предусмотрен. #
# #
# НОВЫХ животных добавляем по типу и не забываем смеенить n #
# НАСТРОЙКИ #
# #
#####################################
# Настройки режима. #
#####################################################
# Что делать с прирученным животным #
var Release = 0 # 1 - Отпустить cказать All Release #
# 0 - Убить #
#####################################################################
var n=2 #количество животных в массиве
#####################################################################
#ДЛЯ СТАРТА ЗАПУСТИТЬ start()!!!
#####################################################################
sub start()
UO.WarMode(1)
wait(100)
UO.WarMode(0)
wait(100)
UO.exec("terminate main;exec main")
end sub
Sub main()
var a, j
var gl=''
dim Animal[n]
Animal[0]="0x0006"
Animal[1]="0x00D0"
UO.exec("terminate Reconnect;exec Reconnect")
UO.Set('finddistance', '4')
UO.IgnoreReset()
while (UO.SkillVal('Animal Taming','1') < 1000)
j = 0
For a = 0 to n-1
uo.FindType(Animal[a], -1, 'ground')
if uo.FindCount()>0 then
j = UO.GetSerial('finditem')
uo.click(j)
if UO.GetName(j) == gl then
UO.Print('ГЛЮКИ!!!')
else
TameAnimal(j,Release)
endif
endif
next
UO.Print('Анализ NPC закончин.')
if (j == 0) then
UO.Print('NPC Нет')
endif
wait(2000)
wend
endif
endsub
Sub TameAnimal(Animal, Rel)
var msg1 = "It seems to accept you"
var msg2 = "You fail to tame the"
var msg3 = "I am too far away"
var msg4 = "already"
var msg5 = "quantity"; taming skill"
UO.Print('Приручаем '+UO.GetName(Animal)+'...')
GotoXY(UO.GetX(Animal),UO.GetY(Animal),2)
DeleteJournal(msg1)
DeleteJournal(msg2)
DeleteJournal(msg3)
DeleteJournal(msg4)
DeleteJournal(msg5)
While not UO.InJournal(msg1) and not UO.InJournal(msg4) and not UO.InJournal(msg5)
UO.WarMode(0)
UO.WaitTargetObject(Animal)
UO.UseSkill('Animal Taming')
While not UO.InJournal(msg1) and not UO.InJournal(msg2) and not UO.InJournal(msg3) and not UO.InJournal(msg4) and not UO.InJournal(msg5)
wait(100)
wend
if UO.InJournal(msg2) or UO.InJournal(msg3) then
GotoXY(UO.GetX(Animal),UO.GetY(Animal),2)
endif
DeleteJournal(msg2)
DeleteJournal(msg3)
wend
if UO.InJournal(msg4) or UO.InJournal(msg5) then
UO.Print(UO.GetName(Animal)+' Не хочет приручатсья.')
KillAnim(Animal)
endif
if UO.InJournal(msg1) then
UO.Print(UO.GetName(Animal)+' Приручен!!!')
if not (UO.GetName(Animal) == '') then
if (Rel == 1) then
UO.msg('All Release')
UO.msg('GuArDs')
else
UO.sayu('All Come')
UO.Attack(Animal)
wait(500)
KillAnim(Animal)
endif
endif
endif
endsub
Sub DeleteJournal(msg)
While UO.InJournal(msg)
UO.SetJournalLine(UO.InJournal(msg) - 1,'')
wend
endsub
Sub KillAnim(Anim)
UO.Print('Идём убивать '+UO.GetName(Anim)+'...')
UO.Attack(Anim)
GotoXY(UO.GetX(Anim),UO.GetY(Anim),1)
UO.DeleteJournal()
repeat
if uo.GetDistance(Anim) > 1 then
GotoXY(UO.GetX(Anim),UO.GetY(Anim),1)
end if
wait(100)
until uo.dead() or uo.GetX(Anim)==0
UO.Ignore(Anim)
endsub
Sub Reconnect()
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (UO.ObjAtLayer('Bpack')=='')
if rFlag then
ReconnectTime=MakeTime()
rFlag=0
end if
wait(20000)
UO.Lclick(316,270)
wait(3000)
UO.Say('')
wait(3000)
UO.Say('')
wait(3000)
UO.Say('')
wait(3000)
UO.LdblClick(357,164)
UO.Lclick(616,459)
wait(3000)
wend
wait(3000)
if (rFlag==0) and (ReconnectTime<>'0') then
UO.TextOpen()
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
UO.exec("terminate main;exec start")
rFlag=1
ReconnectTime='0'
end if
until false
end sub
Sub MakeTime()
var d,t,ret,i
ret=str(UO.Time())
t=""
for i=0 to Len(ret)
t=ret[Len(ret)-i]+t
if (i==2) or (i==4) then
t=":"+t
end if
next
ret=str(UO.Date())
d=""
for i=0 to Len(ret)
d=ret[Len(ret)-i] + d
if (i==2) or (i==4) then
d="."+d
end if
next
ret=t+" @ "+d
return ret
end sub
Sub GotoXY(x,y,prec)
var myX,myY,LastX=0,LastY=0,i,halt=0,z,r=0
for i=1 to 60
myX=uo.GetX()
myY=uo.GetY()
if LastX==myX and LastY==myY then
halt=halt+1
else
halt=0
end if
if halt>=10 then
if uo.GetDir()==1 then
for z=0 to 8
uo.Press(40)
next
end if
if uo.GetDir()==3 then
for z=0 to 8
uo.Press(37)
next
end if
if uo.GetDir()==5 then
for z=0 to 8
uo.Press(38)
next
end if
if uo.GetDir()==7 then
for z=0 to 8
uo.Press(39)
next
end if
halt=15
end if
if Numb(x-myX) <= prec and Numb(y-myY) <= prec then
return 1
end if
if x<=myX then
if y<=myY then
for z=0 to 3
uo.Press(38)
next
else
for z=0 to 3
uo.Press(37)
next
end if
else
if y<=myY then
for z=0 to 3
uo.Press(39)
next
else
for z=0 to 3
uo.Press(40)
next
end if
end if
LastX=myX
LastY=myY
wait(200)
next
return 0
end sub
Sub Numb(num)
if num>=0 then
return num
else
return num*(-1)
end if
end sub
проверяйте, пишите замечания...