Yoko

All sides of Injection
It is currently 2026-01-22 04:12:22

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2006-08-30 12:01:34 
Offline

Joined: 2006-07-06 08:30:59
Posts: 40
что я совсем замучался,мне вот надо сделать ходилку чтоб допустим при слове bla чар шол на координату ещо раз bla на другую координату и так после каздова слова на другую координату,всего 4 координаты

Code:
sub bla()
if UO.InJournal("bla") then
wait(500)
Uo.GoToXY(4448,3194,"") ##тут вставь координаты куда идти
UO.DeleteJournal()
wait(500)
end if
end sub

sub GotoXY(x,y,prec)
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

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


вот я тут чтото начал но тока запутался немного как зделать чтоб он шол по 4 рeм коодинатам и после 4 возвращался к 1? :roll:


Top
   
PostPosted: 2006-08-30 15:52:29 
Offline

Joined: 2005-08-19 16:12:23
Posts: 182
Code:
sub bla()
UO.DeleteJournal() 
while 1
while not UO.InJournal("bla")
 wait(500)
wend
GoToXY(4448,3194,"") ##тут вставь координаты куда идти
UO.DeleteJournal() 
while not UO.InJournal("bla")
 wait(500)
wend
GoToXY(4448,3194,"") ##тут вставь координаты куда идти
UO.DeleteJournal() 
while not UO.InJournal("bla")
 wait(500)
wend
GoToXY(4448,3194,"") ##тут вставь координаты куда идти
UO.DeleteJournal() 
while not UO.InJournal("bla")
 wait(500)
wend
GoToXY(4448,3194,"") ##тут вставь координаты куда идти
UO.DeleteJournal() 
wend
end sub

что-то в этом роде


Top
   
 Post subject:
PostPosted: 2006-08-30 19:18:53 
Offline

Joined: 2006-07-06 08:30:59
Posts: 40
Спасибо всё работает


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

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:  
Powered by phpBB® Forum Software © phpBB Limited