нуби данж
Moderators: Murderator+, Murderator
нашел скриптик но он что то не пашет, вы бы не могли подправить?
Code: Select all
sub Attack()
uo.set('finddistance','10')
DIM R[5]
R[1] = 0x00EE # Тип зверя.
R[2] = 0x00EE
R[3] = 0x00EE
R[4] = 0x00EE
R[5] = 0x00EE
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
UO.DeleteJournal()
repeat
repeat
wait(100)
until UO.InJournal("Body of")
body = UO.JournalSerial(UO.InJournal("Body of")-1)
UO.DeleteJournal()
if skin then
if UO.GetDistance(body) <= 2 then
UO.WarMode(0)
UO.SetArm('skin')
UO.WaitTargetObject(body)
UO.UseType(dagger)
wait(1000)
else
endif
UO.WarMode(0)
UO.SetArm('skin')
UO.WaitTargetObject(body)
UO.UseType(dagger)
wait(1000)
endif
sub Numb(num)
if num>=0 then
return num
else
return num*(-1)
end if
end sub
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()
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
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300);NE - RightArrow
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300);SW - LeftArrow
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300);WN - UpArrow
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
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
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
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300);N - PgUp
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
Endif
Endif
Endif
Endif
Wend
end sub
sub Go(dir,key,walkwait)
VAR x,y
x=UO.GetX()
y=UO.GetY()
while UO.GetDir()<>dir
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
Endif
wend
UO.Press(key)
wait(walkwait)
If x==UO.GetX() AND y==UO.GetY() Then
Endif
If x==UO.GetX() AND y==UO.GetY() Then
return -1
Else
return 1
Endif
end sub