Code: Select all
program animal_taming;
var time_begin : TDateTime;
animal_type : array [1..35] of Byte;
count, i : Integer;
Begin
animal_type[1] := $00C8 // Horse (light brown)
animal_type[2] := $00C9 // Cat / Hell Cat
animal_type[3] := $00CA // Aligator
animal_type[4] := $00CB // Pig
animal_type[5] := $00CC // Horse (dark brown)
animal_type[6] := $00CD // Bunny
animal_type[7] := $00CE // Lava Lizard
animal_type[8] := $00CF // Sheep (unsheered)
animal_type[9] := $00D0 // Chicken
animal_type[10] := $00D1 // Goat
animal_type[11] := $00D2 // Desert Ostard / Oclock
animal_type[12] := $00D3 // Bear (dark brown)
animal_type[13] := $00D4 // Bear (light brown)
animal_type[14] := $00D5 // Bear (polar)
animal_type[15] := $00D6 // Panther
animal_type[16] := $00D7 // Rat (giant)
animal_type[17] := $00D8 // Cow (black and white)
animal_type[18] := $00D9 // Dog
animal_type[19] := $00DA // Frenzied Ostard / Zostrich
animal_type[20] := $00DB // Forest Ostard / Orn
animal_type[21] := $00DC // Llama
animal_type[22] := $00DD // Walrus
animal_type[23] := $00DF // Sheep (sheered)
animal_type[24] := $00E1 // Wolf / Hell Hound
animal_type[25] := $00E2 // Horse (light gray)
animal_type[26] := $00E4 // Horse (gray-brown)
animal_type[27] := $00E7 // Cow (brown)
animal_type[28] := $00E8 // Bull (brown)
animal_type[29] := $00E9 // Bull (black and white)
animal_type[30] := $00EA // Great Hart
animal_type[31] := $00ED // Deer
animal_type[32] := $00EE // Rat
animal_type[33] := $0122 // Boar
animal_type[34] := $0123 // Horse (pack)
animal_type[35] := $0124 // Llama (pack)
FindDistance := 10
FindVertical := 20
ClearJournal
SetARStatus(true)
if not connected then connect
while not connected do wait(100)
SetWarMode(false)
repeat
while (dead = false) and (connected = true) do
begin
if (i > 0) and (i <= 35) then
begin
while FindTypeEx(animal_type[i], $FFFF, ground, false) <> 0 do
begin
time_begin := Now
while InJournalBetweenTimes('accept|already|далеко', time_begin, Now) = -1 do
begin
if TargetPresent then
begin
CancelTarget
wait(1000)
end
WaitTargetObject(FindItem)
UseSkill('Animal Taming')
WaitJournalLine(Now, 'accept|fail|already|battle|далеко|action', 30000)
if InJournalBetweenTimes('action|already', time_begin, Now) <> -1 then wait(1500)
if InJournalBetweenTimes('battle', time_begin, Now) <> -1 then
begin
SetWarMode(false)
wait(1000)
end
end
if InJournalBetweenTimes('accept', time_begin, Now) <> -1 then count := count + 1
Ignore(FindItem)
UOSay('all release')
end
i := i + 1
end
else
begin
AddToSystemJournal('Кол-во затамленной живности: '+IntToStr(count)+' шт.')
count := 0
IgnoreReset
UOSay('all release')
WaitJournalLine(Now, CharName+': all release', 30000)
wait(1000)
i := 1
end
end
wait(500)
if dead then
begin
AddToSystemJournal('Умерли')
SetARStatus(false)
Disconnect
Exit
end
until false
End.