Нужна Ходилка ! Чтобы без обхода...

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
ILIAS17
Posts: 8
Joined: 2006-11-27 12:10:37

Нужна Ходилка ! Чтобы без обхода...

Post by ILIAS17 »

Приветствую всех кто посетил етот пост!!! :D
Нужна ходилка без обхода препядствий ! Но быстрая.... :shock:
Поиск юзал облазел х...ву гору всего Ничего так и не нашел ....
:evil:
Прошу Напишите кому не лень .... Или просто киньте сюда ссылку :wink:
Заранее Примного БлагодареН!!!
Rivory
Posts: 205
Joined: 2005-01-06 11:49:28

Post by Rivory »

Я не понимаю, зачем писать что пользовался поиском, если ты его даже не открывал ? Ходилки на форуме выкладывались уже миллионы раз, и ходилки, и догонялки, и по координатам, и до обьекта, и с обходами, и напрямую, и как только можно, а он пишет : нифига не нашёл. Ну блин купи себе hands.dll и попробуй ещё раз.
ILIAS17
Posts: 8
Joined: 2006-11-27 12:10:37

Post by ILIAS17 »

Rivory wrote:Я не понимаю, зачем писать что пользовался поиском, если ты его даже не открывал ? Ходилки на форуме выкладывались уже миллионы раз, и ходилки, и догонялки, и по координатам, и до обьекта, и с обходами, и напрямую, и как только можно, а он пишет : нифига не нашёл. Ну блин купи себе hands.dll и попробуй ещё раз.
Ты тупой или где ?! :!:
я написал что пользовуался поиском значит пользовался .......
Врать не привык ...
И попрошу либо выкладывть ченить или давать ссылки либо не флудить ....
Заранее благодаренююю :wink:
arch
Posts: 38
Joined: 2004-05-26 16:39:57
Location: www.myruo.ru
Contact:

Post by arch »

Code: Select all

sub movechar(xx,yy) 
  repeat 
    if yy<uo.gety() then 
      gon() 
    else 
      if yy>uo.gety() then 
        gos() 
      end if 
    end if 
    if xx<uo.getx() then 
      gow() 
    else 
      if xx>uo.getx() then 
        goe() 
      end if 
    end if 
  until (xx==uo.getx()) and (yy==uo.gety()) 
end sub 

sub GoW() 
VAR walkwait=300 
VAR x,y,dir=6 
VAR key=36 ; Home key 
x=UO.GetX() 
y=UO.GetY() 
while UO.GetDir()<>dir 
UO.Press(key) 
wait(walkwait) 
If UO.GetDir()<>dir Then 
CheckLag() 
Endif 
wend 
UO.Press(key) 

wait(walkwait) 
If x==UO.GetX() AND y==UO.GetY() Then 
CheckLag() 
Endif 

If UO.GetX()+1==x Then 
return -1 
Else 
return 1 
Endif 
end sub 


sub GoN() 
VAR walkwait=300 
VAR x,y,dir=0 
VAR key=33 ; PgUp 
x=UO.GetX() 
y=UO.GetY() 
while UO.GetDir()<>dir 
UO.Press(key) 
wait(walkwait) 
If UO.GetDir()<>dir Then 
CheckLag() 
Endif 
wend 
UO.Press(key) 

wait(walkwait) 
If x==UO.GetX() AND y==UO.GetY() Then 
CheckLag() 
Endif 

If UO.GetY()+1==y Then 
return -1 
Else 
return 1 
Endif 
end sub 


sub GoE() 
VAR walkwait=300 
VAR x,y,dir=2 
VAR key=34 ; PgDown 
x=UO.GetX() 
y=UO.GetY() 
while UO.GetDir()<>dir 
UO.Press(key) 
wait(walkwait) 
If UO.GetDir()<>dir Then 
CheckLag() 
Endif 
wend 
UO.Press(key) 

wait(walkwait) 
If x==UO.GetX() AND y==UO.GetY() Then 
CheckLag() 
Endif 

If UO.GetX()-1==x Then 
return -1 
Else 
return 1 
Endif 
end sub 

sub GoS() 
VAR walkwait=300 
VAR x,y,dir=4 
VAR key=35 ; End 
x=UO.GetX() 
y=UO.GetY() 
while UO.GetDir()<>dir 
UO.Press(key) 
wait(walkwait) 
If UO.GetDir()<>dir Then 
CheckLag() 
Endif 
wend 
UO.Press(key) 

wait(walkwait) 
If x==UO.GetX() AND y==UO.GetY() Then 
CheckLag() 
Endif 

If UO.GetY()-1==y Then 
return -1 
Else 
return 1 
Endif 
end sub 
I'm
Expert!
Posts: 1396
Joined: 2004-10-15 22:38:04
Location: Moscow City.
Contact:

Post by I'm »

ILIAS17 wrote:Ты тупой или где ?! :!:
Полегче. Не стоит переходить на личности.
я написал что пользовуался поиском значит пользовался .......
"Не Верю" (С) Сами знаете кто :)
Раздел Scripting Ore - ПРИЛЕПЛЕННАЯ тема.
The End.
ILIAS17
Posts: 8
Joined: 2006-11-27 12:10:37

Post by ILIAS17 »

I'm wrote:
ILIAS17 wrote:Ты тупой или где ?! :!:
Полегче. Не стоит переходить на личности.
я написал что пользовуался поиском значит пользовался .......
"Не Верю" (С) Сами знаете кто :)
Раздел Scripting Ore - ПРИЛЕПЛЕННАЯ тема.
Не хочешь не верь .....
И сори за оскорбление ...

а не могли бы вы тогда из етой ходилки убратьсистему обхода препядствий чтобы ломился на пролом !?)

Code: Select all

sub Walk(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() 
;         UO.Print("Target locked!") 
         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,100) ;SE - DownArrow 
            If StepSucess==-1 Then 
               StepSucess=Go(7,38,100) ;WN - UpArrow 
               StepSucess=Go(1,39,100) ;NE - RightArrow 
               If StepSucess==-1 Then 
                  StepSucess=Go(5,37,100) ;SW - LeftArrow 
               Endif 
            Endif 
         Endif 

         If dx>0 AND dy<0 Then 
            StepSucess=Go(1,39,100) ;NE - RightArrow 
            If StepSucess==-1 Then 
               StepSucess=Go(5,37,100) ;SW - LeftArrow 
               StepSucess=Go(3,40,100) ;SE - DownArrow 
               If StepSucess==-1 Then 
                  StepSucess=Go(7,38,100) ;WN - UpArrow 
               Endif 
            Endif 
         Endif 

         If dx<0 AND dy>0 Then 
            StepSucess=Go(5,37,100) ;SW - LeftArrow 
            If StepSucess==-1 Then 
               StepSucess=Go(1,39,100) ;NE - RightArrow 
               StepSucess=Go(7,38,300) ;WN - UpArrow 
               If StepSucess==-1 Then 
                  StepSucess=Go(3,40,100) ;SE - DownArrow 
               Endif 
            Endif 
         Endif 

         If dx<0 AND dy<0 Then 
            StepSucess=Go(7,38,100) ;WN - UpArrow 
            If StepSucess==-1 Then 
               StepSucess=Go(3,40,100) ;SE - DownArrow 
               StepSucess=Go(5,37,100) ;SW - LeftArrow 
               If StepSucess==-1 Then 
                  StepSucess=Go(1,39,100) ;NE - RightArrow 
               Endif 
            Endif 
         Endif 

      Endif 

      If dx<>0 AND dy==0 Then 
         If dx>0 Then 
            StepSucess=Go(2,34,100) ;E - PgDown 
            If StepSucess==-1 Then 
               StepSucess=Go(3,40,100) ;SE - DownArrow 
               If StepSucess==-1 Then 
                  StepSucess=Go(1,39,100) ;NE - RightArrow 
               Endif 
               StepSucess=Go(2,34,100) ;E - PgDown 
            Endif 
         Endif 

         If dx<0 Then 
            StepSucess=Go(6,36,100) ;W - Home 
            If StepSucess==-1 Then 
               StepSucess=Go(7,38,100) ;WN - UpArrow 
               If StepSucess==-1 Then 
                  StepSucess=Go(5,37,100) ;SW - LeftArrow 
               Endif 
               StepSucess=Go(6,36,100) ;W - Home 
            Endif 
         Endif 
      Endif 


      If dx==0 AND dy<>0 Then 
         If dy>0 Then 
            StepSucess=Go(4,35,100) ;S - End 
            If StepSucess==-1 Then 
               StepSucess=Go(3,40,100) ;SE - DownArrow 
               If StepSucess==-1 Then 
                  StepSucess=Go(5,37,100) ;SW - LeftArrow 
               Endif 
               StepSucess=Go(4,35,100) ;S - End 
            Endif 
         Endif 

         If dy<0 Then 
            StepSucess=Go(0,33,100) ;N - PgUp 
            If StepSucess==-1 Then 
               StepSucess=Go(1,39,100) ;NE - RightArrow 
               If StepSucess==-1 Then 
                  StepSucess=Go(7,38,100) ;WN - UpArrow 
               Endif 
               StepSucess=Go(0,33,100) ;N - PgUp 
            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 
         CheckLag() 
      Endif 
   Endif 

   UO.Press(key) 
   wait(Walkwait) 

   If x==UO.GetX() AND y==UO.GetY() Then 
      CheckLag() 
   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 
      CheckLag() 
   Endif 

   If x==UO.GetX() AND y==UO.GetY() Then 
      UO.Print("Zasada!") 
      return -1 
   Else 
      return 1 
   Endif 
end sub 
I'm
Expert!
Posts: 1396
Joined: 2004-10-15 22:38:04
Location: Moscow City.
Contact:

Post by I'm »

Нет. :)

Ходилки
Dest wrote: ...
ходилка прет напролом кратчайшим путем к указанной точке, правда препятствия не обходит (обход оных в процессе написания).
Координаты я ваще забил внутри скрипта (пока отлаживал), но можно повесить как аргументы функции.

Code: Select all

sub hodilka()
var x,y,cx,cy,tmp,i=0, temp
x = 1642 ;//Координата x-назначения.
y = 2669 ;//Координата y-назначения.
x = -(uo.getx() - x)
y = -(uo.gety() - y)
cx = x
cy = y
if cx <= 0 then
   cx = -cx
endif
if cy <= 0 then
   cy = -cy
endif
tmp = str(cx+cy)
if val(tmp) then
   DIM step[val(tmp)]
   repeat
      i=i+1
      if x>0 && y>0 && x==y  then
         x=x-1
         y=y-1
         cx=x
         cy=y
         step[i]=2
      endif
      if x>0 && cx>cy then
         x=x-1
         cx=x
         step[i]=3
      endif
      if x>0 && y<0 && cx==cy then
         x=x-1
         y=y+1
         cx=x
         cy=-y
         step[i]=6
      endif
      if y<0 && cy>cx then
         y=y+1
         cy=-y
         step[i]=9
      endif
      if x<0 && y<0 && x==y then
         x=x+1
         y=y+1
         cx=-x
         cy=-y
         step[i]=8
      endif
      if x<0 && cx>cy then
         x=x+1
         cx=-x
         step[i]=7
      endif
      if x<0 && y>0 && cx==cy then
         x=x+1
         y=y-1
         cx=-x
         cy=y
         step[i]=4
      endif
      if y>0 && cy>cx then
         y=y-1
         cy=y
         step[i]=1
      endif
      if x==-0 then
         x=0
      endif
      if y==-0 then
         y=0
      endif
   until cx==0 && cy==0
   temp=i
   tmp=''
   for i=1 to temp
      tmp=tmp+str(step[i])
   next
   uo.addstep(tmp)
endif
uo.resend()
endsub
The End.
to4a
Posts: 265
Joined: 2006-03-10 00:19:11
Location: http://drw.ru/

Post by to4a »

жирные они все какието, нашел свою хз сколько летней давности написания...

идёт тупо, в лоб, до нужного расстояния подхода(prec)

Code: Select all

Sub GotoXY(x,y,prec)
var mx,my
repeat
mx=UO.GetX('self')
my=UO.GetY('self')
  if Diap(mx,x,prec) and my>y+prec then
    UO.Press(33)
  endif
  if Diap(mx,x,prec) and my<y-prec then
    UO.Press(35)
  endif
  if mx<x-prec and Diap(my,y,prec) then
    UO.Press(34)
  endif
  if mx<x-prec and my>y+prec then
    UO.Press(39)
  endif
  if mx<x-prec and my<y-prec then
    UO.Press(40)
  endif
  if mx>x+prec and Diap(my,y,prec) then
    UO.Press(36)
  endif
  if mx>x+prec and my>y+prec then
    UO.Press(38)
  endif
  if mx>x+prec and my<y-prec then
    UO.Press(37)
  endif
until Diap(mx,x,prec) and Diap(my,y,prec)
endsub

Sub Diap(mx,x,prec)
      if mx-x>=-prec and mx-x<=prec then
         return 1
      else
         return 0
      endif
endsub
Last edited by to4a on 2007-06-15 14:32:02, edited 1 time in total.
[b][color=#666666][size=67]DRW - Glorior Belli[/size][/color][/b]
[url=http://tyv.name/action/][img]http://tyv.name/action/pishu.gif[/img][/url]
arch
Posts: 38
Joined: 2004-05-26 16:39:57
Location: www.myruo.ru
Contact:

Post by arch »

to4a wrote:жирные они все какието, нашел свою хз сколько летней давности написания...

идёт тупо, в лоб, до нужного расстояния подхода(prec)

Code: Select all

Sub GotoXY(x,y,prec)
var mx,my
repeat
mx=UO.GetX('self')
my=UO.GetY('self')
  if Diap(mx,x,prec) and my>y+prec then
    UO.Press(33)
  endif
  if Diap(mx,x,prec) and my<y-prec then
    UO.Press(35)
  endif
  if mx<x-prec and Diap(my,y,prec) then
    UO.Press(34)
  endif
  if mx<x-prec and my>y+prec then
    UO.Press(39)
  endif
  if mx<x-prec and my<y-prec then
    UO.Press(40)
  endif
  if mx>x+prec and Diap(my,y,prec) then
    UO.Press(36)
  endif
  if mx>x+prec and my>y+prec then
    UO.Press(38)
  endif
  if mx>x+prec and my<y-prec then
    UO.Press(37)
  endif
until Diap(mx,x,prec) and Diap(mx,x,prec) ############
endsub

Sub Diap(mx,x,prec)
      if mx-x>=-prec and mx-x<=prec then
         return 1
      else
         return 0
      endif
endsub
гыыы. Вчитайся строчку, отмеченную шарпами :)
to4a
Posts: 265
Joined: 2006-03-10 00:19:11
Location: http://drw.ru/

Post by to4a »

ага, тока интересно хули это с ней случилось, ведь было нормально, исправил...
[b][color=#666666][size=67]DRW - Glorior Belli[/size][/color][/b]
[url=http://tyv.name/action/][img]http://tyv.name/action/pishu.gif[/img][/url]
Post Reply