Вот сам скрипт.
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
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 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
Мне нужно что бы чар не снимал меч с щитом ...
А вот еще скрипт ... тут то же не понятно ..но наверно хадилка полутче.
DIM R[5]
R[1] = 0x0018 # Oei Lich.
R[2] = 0x0018
R[3] = 0x0018
R[4] = 0x0018
R[5] = 0x0018
VAR LastTimer, Attack
var a
repeat
for a=1 to 5
UO.DeleteJournal()
UO.FindType(R[a],-1,'ground')
if UO.FindCount("finditem")>0 then
Attack=UO.GetSerial('finditem')
UO.Exec('warmode 1')
UO.Attack(Attack)
WalkN(0,0,Attack)
LastTimer=UO.Timer()
repeat
wait(2000)
until uo.dead(Attack) or UO.InJournal('Body') OR LastTimer+150<UO.Timer()
endif
wait(500)
next
wait(200)
until uo.dead()
end sub
#==============================================================
# WalkN(X,Y,Serial) - char is walking by dX and dY step
# sub using Home, End, PgUp, PgDown keys
# d'not rebind this key from default action!
# serial - Serial of target or "" - string
# walkwait - delay after keypress
# Example:
# WalkN(5134,1086,'') - go to coordinates
# WalkN(0,0,'0x12345678') - go to target position
#--------------------------------------------------------------
Sub WalkN(x,y,Target)
VAR i,StepSucess
VAR dx,dy,Exit=0
While Exit<>1
If Target<>"" Then
dx=UO.GetX(Target)-UO.GetX()
dy=UO.GetY(Target)-UO.GetY()
UO.Print("Target locked!")
If UO.GetDistance(Target)<2 Then
Exit=1
Endif
Else
dx=x-UO.GetX()
dy=y-UO.GetY()
If dx==0 AND dy==0 Then
Exit=1
Endif
Endif
If dx<>0 AND dy<>0 Then
If dx>0 AND dy>0 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
Endif
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
Endif
Endif
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
Endif
Endif
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
StepSucess=Go(5,37,300) ;SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
Endif
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
StepSucess=Go(2,34,300) ;E - PgDown
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
StepSucess=Go(2,34,300) ;E - PgDown
Endif
Endif
If dx<0 Then
StepSucess=Go(6,36,300) ;W - Home
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
StepSucess=Go(6,36,300) ;W - Home
Endif
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
StepSucess=Go(4,35,300) ;S - End
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
StepSucess=Go(4,35,300) ;S - End
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300) ;N - PgUp
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
Endif
StepSucess=Go(0,33,300) ;N - PgUp
Endif
Endif
Endif
Wend
end sub
Sub Go(dir,key,walkwait)
VAR x,y, OldDir
x=UO.GetX()
y=UO.GetY()
OldDir=UO.GetDir()
If UO.GetDir()<>dir Then
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
CheckLag()
Endif
Endif
UO.Press(key)
wait(walkwait)
If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif
If x==UO.GetX() AND y==UO.GetY() AND OldDir<>UO.GetDir() Then
UO.Press(key)
wait(walkwait)
Endif
If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif
If x==UO.GetX() AND y==UO.GetY() Then
UO.Print("Zasada!")
return -1
Else
return 1
Endif
end sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(500)
until UO.InJournal('backpack')
end sub
Только здесь он не хилится и не лутает .