Code: #============================================================== #  Autoheal() - Запускаем первым делом, мало ли бычков убивать будем? :] #-------------------------------------------------------------- sub autoheal() while NOT UO.Dead() wait(300) if UO.Life <= 100 then ; Если количество хп равно или меньше 100 хп, персонаж бинтуется UO.SetArm('Weapon') UO.bandageself() wait(2000) UO.Arm('Weapon') Endif wend end sub
 
 
  #============================================================== #  Taming() - Вот сам скрипт тайминга и ниже ходилка, спасибо zAmbEz за помощь, пользуйтесь. Galen Marek #-------------------------------------------------------------- sub roundTaMiNg() var J, serial, finded var ALL_NAMES_BUTTON = 90 ; Ставим в клиенте игры показывать все имена, 90 - кнопка 'Z' while 1 uo.warmode(0) uo.ignorereset() uo.exec("ignore self") findbody() wait(100) UO.Press(ALL_NAMES_BUTTON) wait(200) if UO.InJournal('a') OR UO.InJournal('e') OR UO.InJournal("i") OR UO.InJournal("o") OR UO.InJournal("u") then uo.print("Found something?") J = UO.Journal("You see") uo.print("J is" +UO.GetName(UO.JournalSerial(J))) ;Serial = UO.JournalSerial(J) serial = uo.JournalSerial(uo.Journal('You see')) uo.print("walking to " + UO.GetName(UO.JournalSerial(J))) GotoXY(UO.GetX(serial),UO.GetY(serial),1) TameAnimal(Serial) endif wend end sub
  sub TameAnimal(Animal) UO.Print('Taming '+UO.GetName(Animal)+'...') repeat UO.DeleteJournal() GotoXY(UO.GetX(Animal),UO.GetY(Animal),1) Wait(100) UO.WaitTargetObject(Animal) wait(200) UO.UseSkill('Animal Taming') wait(200) While not UO.InJournal("seems to accept") 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") AND NOT UO.InJournal("taming ability") AND NOT UO.InJournal("can not see") AND NOT Uo.InJournal("already") AND NOT Uo.InJournal("You attempt to tame Body") AND NOT UO.InJournal("too far") and NOT UO.InJournal("cannot be tamed") 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("creature very hungry") or not uo.GetDistance(Animal) OR UO.InJournal("taming ability") OR Uo.InJournal("You attempt to tame Body") OR UO.InJournal("cannot be tamed") UO.Print('Aminal tamed successfuly') if not UO.InJournal("has be removed") and UO.GetDistance(Animal) OR UO.InJournal("already") OR UO.InJournal("taming ability") then UO.Print('Kill '+UO.GetName(Animal)+'...'); UO.Attack(Animal) while not UO.Countground("0x2006") GotoXY(UO.GetX(Animal),UO.GetY(Animal),1) Wait(1000) wend findbody() UO.WarMode(0) uo.deletejournal() endif end sub
  sub findbody() while 1 UO.set('finddistance','20') ; Дистанция вокруг, которой ищет uo.deletejournal() uo.exec("findtype 0x2006 -1 ground") while UO.findcount() uo.exec("findtype 0x2006 -1 ground") wait(20) UO.hide("finditem") uo.ignore('finditem') wait(20) wend end sub
 
 
 
  sub GotoXY(x,y,prec) ;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
   Не хватало ходилки, и кое кокой коррекции.
  Теперь возникла проблема что рядом с загоном для овец рядом ходят нпц, которые зацикливают скрипт на них, может какой нибудь тип нпц добавить?  И еще чтобы если нету кого таймить перс шел по заданым координатам глобальным к центру загона.    Или если не может в 10 секунд добраться до цели выбирает другую.
		
		 |