Yoko

All sides of Injection
It is currently 2026-01-17 04:02:09

All times are UTC+02:00




Post new topic  Reply to topic  [ 26 posts ]  Go to page Previous 1 2
Author Message
 Post subject:
PostPosted: 2005-02-25 15:45:20 
Offline

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


Top
   
 Post subject:
PostPosted: 2005-02-25 15:47:16 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
вру пишет Line 5:Function not Found-WALKN


Top
   
 Post subject:
PostPosted: 2005-02-25 16:03:06 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
К скрипту на хождние вставь саму ходилку ...........

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

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

В скрипте у тебя должно будет выглядеть так.

_________________
Все просто.
BETEPAH ™


Top
   
 Post subject:
PostPosted: 2005-02-25 16:06:12 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
что это "ходилка" ??


Top
   
 Post subject:
PostPosted: 2005-02-25 16:11:56 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
Вот как должно все выглядить

Code:
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 ™


Top
   
 Post subject:
PostPosted: 2005-02-25 16:28:45 
Offline

Joined: 2005-02-03 21:58:57
Posts: 25
во вроде пашет, но сам яб такой скрипт не зделал пока
спасибо за помощ


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 26 posts ]  Go to page Previous 1 2

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited