переделал целиком и получилась такая штука:
Code: Select all
sub feather_bot()
while not uo.dead()
while uo.Count('0x1bd1')<=2000
if find_harpy()==1 then
kill_harpy()
loot_harpy()
else
waiting_for_respawn()
wait(10000)
endif
wend
toHome()
atHome()
tofeather()
wend
end sub
sub find_harpy()
uo.set('finddistance', '30')
uo.findtype('0x001E', -1, 'ground') ##Находим Гарпию
if uo.findcount()>0 then
uo.print('Есть контакт!')
return 1
else
uo.print('Нэту никто!')
return 0
endif
end sub
sub kill_harpy()
var x, y
uo.addobject('harpy', 'finditem')
x = uo.getx('harpy')
y = uo.gety('harpy')
gotoXY(x,y,20)
uo.deletejournal()
uo.arm(2)
uo.attack('harpy')
uo.press(37)
while not uo.injournal('You gain')
wait(100)
wend
uo.print('Сдохли сЦуки!')
wait(1000)
end sub
sub loot_harpy()
var x, y, i
uo.addobject('harpy_corpse', 'lastcorpse')
if uo.getname('harpy_corpse') == 'A corpse of a harpy' then
x=uo.getX('harpy_corpse')
y=uo.getY('harpy_corpse')
gotoXY(x,y,1)
uo.deletejournal()
while not uo.injournal('You place the items on the corpse.')
uo.waittargetobject('harpy_corpse')
uo.usetype('0x0f51') ## режем труп гарпии
wait(5000)
wend
for i=1 to 10
uo.emptycontainer('100', 'harpy_corpse') ## лутим начисто
wait(500)
next
else
uo.ignore('harpy_corpse')
endif
wait(1000)
end sub
sub toHome()
var last_x, last_y
last_x = uo.getx()
last_y = uo.gety()
uo.disarm()
uo.recall('0x603D144C', '601') ## здесь прописываем серийник рунбуки с руной домой и номер руны от 601 - 1ая до 621 - 20ая
while uo.getx()==last_x and uo.gety()==last_y
wait(100)
wend
end sub
sub atHome()
var i, j
dim DropItem[4]
DropItem[1] = '0x1bd1' ## Feather
DropItem[2] = '0x09F1' ## Cuts of raw ribs
DropItem[3] = '0x0F09' ## NotID potion
DropItem[4] = '0x0E20' ## Bloody bandage
dim RuneBooks[2]
RuneBooks[1] = '0x603D144C' ## ToHome
RuneBooks[2] = '0x6091468E' ## ToFeather
for i=1 to 4
uo.findtype(dropitem[i], -1, 'my')
while uo.findcount()>0
uo.findtype(dropitem[i], -1, 'my')
uo.moveitem('finditem', 0, '0x6043FEDE') ## здесь вставляем серийник контейнера в который будут сыпаться перья и прочий мусор
wait(100)
wend
next
uo.useobject('0x6043FEDE') ## Открываем контейнер, тоже необходимо вставить нужный, кстати в нём должна быть хавка, рекаллы, бинты и стрелы
uo.findtype('0x1F4C', -1, 'lastcontainer') ## Находим рекаллы
for j=1 to 2
uo.waittargetobject('finditem')
uo.recall(RuneBooks[j], '800') ## Перезарядка рунбуки
wait(10000)
next
uo.findtype('0x097B',-1,'lastcontainer') ## Находим рыбку и кушаем пока не наелись
uo.deletejournal()
while not uo.injournal('You are full')
uo.useobject('finditem')
wait(1000)
wend
uo.findtype('0x0F3F', -1, 'lastcontainer') ## Находим и добавляем стрелы
if uo.count('0x0F3F')<300 then
uo.grab(200-uo.count('0x0F3F'), 'finditem')
endif
uo.findtype('0x0E21', -1, 'lastcontainer') ## Находим и добавляем бинты
if uo.count('0x0E21')<180 then
uo.grab(100-uo.count('0x0E21'), 'finditem')
endif
end sub
sub toFeather()
var last_x, last_y
last_x = uo.getx()
last_y = uo.gety()
uo.disarm()
uo.recall('0x6091468E', '603') ## А здесь прописываем серийник рунбуки к перьям и номерок рунки
while uo.getx()==last_x and uo.gety()==last_y
wait(100)
wend
end sub
sub waiting_for_respawn()
uo.warmode(0)
while not uo.Hidden()
uo.useskill('Hiding')
wait(1000)
wend
end sub
sub abs(num)
if num>=0 then
return num
else
return num*(-1)
end if
end sub
sub autoheal() ## Этот макрос необходимо запускать параллельно, если жить охота :)
while not uo.dead()
wait(1000)
if uo.life<uo.str-10 then
while uo.life<uo.str
uo.exec("bandageself")
wait(3000)
wend
endif
wait(1000)
wend
end sub
sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if
ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>100 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if
if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub
маленькое уточнение... скрипт заточен по шард Destiny of Middle Earth
не судите слишом строго

Твоими пастырями будем мы. Во имя Твоё Господи. Сила снизошла из Твоих рук, наши ноги быстро Твоё слово несут. И прямо к Тебе пусть потёчёт река, наполним душами её. Да будет так!
(с) "Святые из трущоб" перевод камрада Гоблина