отход для лечения

General Injection issues

Moderators: Murderator+, Murderator

Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

щас работает до того как хп станет ниже 70 и пишет Line 3:Function not Found-WALKN
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

вру пишет Line 5:Function not Found-WALKN
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

К скрипту на хождние вставь саму ходилку ...........

sub main()
>>>>>>
>>>>>>
end sub

sub walkD()
>>>>>>
>>>>>>
end sub

В скрипте у тебя должно будет выглядеть так.
Все просто.
BETEPAH ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

что это "ходилка" ??
BETEPAH
Expert!
Posts: 838
Joined: 2004-05-31 09:31:51
Contact:

Post by BETEPAH »

Вот как должно все выглядить

Code: Select all

sub main() 
repeat
wait(3000)
if uo.life<70 then
WalkN(1524,1725,"")
wait(3000)
WalkN(1527,1726,"")
end if
until uo.dead()
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()
UO.Print('Left '+STR(dx)+' steps to target. ')
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) 
If StepSucess==-1 Then
StepSucess=Go(7,38,300) 
StepSucess=Go(1,39,300) 
If StepSucess==-1 Then
StepSucess=Go(5,37,300) 
Endif
Endif
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300) 
If StepSucess==-1 Then
StepSucess=Go(5,37,300) 
StepSucess=Go(3,40,300) 
If StepSucess==-1 Then
StepSucess=Go(7,38,300) 
Endif
Endif
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300) 
If StepSucess==-1 Then
StepSucess=Go(1,39,300) 
StepSucess=Go(7,38,300) 
If StepSucess==-1 Then
StepSucess=Go(3,40,300) 
Endif
Endif
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300) 
If StepSucess==-1 Then
StepSucess=Go(3,40,300) 
StepSucess=Go(5,37,300) 
If StepSucess==-1 Then
StepSucess=Go(1,39,300) 
Endif
Endif
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
StepSucess=Go(2,34,300) 
If StepSucess==-1 Then
StepSucess=Go(3,40,300) 
If StepSucess==-1 Then
StepSucess=Go(1,39,300) 
Endif
StepSucess=Go(2,34,300) 
Endif
Endif
If dx<0 Then
StepSucess=Go(6,36,300) 
If StepSucess==-1 Then
StepSucess=Go(7,38,300) 
If StepSucess==-1 Then
StepSucess=Go(5,37,300) 
Endif
StepSucess=Go(6,36,300) 
Endif
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
StepSucess=Go(4,35,300) 
If StepSucess==-1 Then
StepSucess=Go(3,40,300) 
If StepSucess==-1 Then
StepSucess=Go(5,37,300)
Endif
StepSucess=Go(4,35,300)
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300)
If StepSucess==-1 Then
StepSucess=Go(1,39,300)
If StepSucess==-1 Then
StepSucess=Go(7,38,300)
Endif
StepSucess=Go(0,33,300)
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
Endif
Endif
UO.Press(key)
wait(walkwait)
if x==UO.GetX() AND y==UO.GetY() Then
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
Endif
If x==UO.GetX() AND y==UO.GetY() Then
UO.Print("Stuck. Try move else!")
return -1
Else
return 1
Endif
end sub
Все просто.
BETEPAH ™
Profik
Posts: 25
Joined: 2005-02-03 21:58:57

Post by Profik »

во вроде пашет, но сам яб такой скрипт не зделал пока
спасибо за помощ
Post Reply