Yoko

All sides of Injection
It is currently 2025-12-02 01:49:00

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2006-06-16 09:32:51 
Offline

Joined: 2006-06-16 09:29:26
Posts: 4
Вобщем маза в том она точно не подходит хелп не допираю чего не хватает )
Code:

Sub go()
GotoXY(x,y)
end sub


Sub Numb(num)
if num>=0 then
return num
else
return num*(-1)
end if
end sub



Sub GotoXY(x,y)
var myX,myY,lastX=0,lastY=0,i,halt=0,z,r=0
for i=1 to 60
myX=uo.getX();
myY=uo.getY();
if LastX==myX and LastY==myY then
halt=halt+1
else
halt=0
end if
if halt>=10 then
if uo.GetDir()==1 then
for z=0 to 8
uo.Press(40)
next
end if
if uo.GetDir()==3 then
for z=0 to 8
uo.Press(37)
next
end if
if uo.GetDir()==5 then
for z=0 to 8
uo.Press(38)
next
end if
if uo.GetDir()==7 then
for z=0 to 8
uo.Press(39)
next
end if
halt=15
end if
if Numb(x-myX)<=1 and Numb(y-myY)<=2 then
return 1
end if
if x<=myX then
if y<=myY then
for z=0 to 3
uo.Press(38)
next
else
for z=0 to 3
uo.Press(37)
next
end if
else
if y<=myY then
for z=0 to 3
uo.Press(39)
next
else
for z=0 to 3
uo.Press(40)
next
end if
end if
lastX=myX
lastY=myY
wait(200)
next
return 0
end sub


Top
   
 Post subject:
PostPosted: 2006-06-16 16:58:55 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Телепаты в отпуске.

Сложно назвать это ходилкой.

Code:
Sub GotoXY(x,y) 
var myX,myY,lastX=0,lastY=0,i,halt=0,z,r=0
for i=1 to 60
myX=uo.getX();
myY=uo.getY();
if LastX==myX and LastY==myY then


Особенно судя по этому отрывку. Возможно:

Code:
myX=uo.getX(); 
myY=uo.getY();


В скобках следует указать объект к которому нужно идти?

laststatus или же object

Code:
myX=uo.getX('laststatus'); 
myY=uo.getY('laststatus');


Top
   
 Post subject:
PostPosted: 2006-06-17 08:33:21 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Code:
myX=uo.getX(); 
myY=uo.getY();


Судя по названиям переменных, тут всё верно..

PS: А телепатов и правда нету.


Top
   
 Post subject:
PostPosted: 2006-06-21 08:12:04 
Offline

Joined: 2006-06-16 09:29:26
Posts: 4
Вот вот дело то в том что мне надо подходить к определённому предмету и просто по координатам )


Top
   
 Post subject:
PostPosted: 2006-06-21 15:53:10 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Юзай SuperWalk() -Savage. Находишь предмет который тебе нужен, и она к нему идёт довольно не плохо.


Top
   
 Post subject:
PostPosted: 2006-06-21 21:48:59 
Offline
Expert!
User avatar

Joined: 2006-02-25 21:48:38
Posts: 1032
&pathfind(dx,dy) :twisted: :twisted: :twisted:

_________________
DerMeister сейчас на нейрале!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 guests


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