Jump to content


Toggle shoutbox Chat Open the Shoutbox in a popup

Прямая связь с администрацией по скайпу: gods.dragon
@  Pablo : (15 March 2024 - 21:12) Sell regs from pandora box.
@  Pablo : (15 March 2024 - 21:11) Sell paralyze and poison necklaces 100k 1 piece.
@  fr33 : (11 March 2024 - 16:38) blee gm zb atdai bank
@  GM SOLAR : (10 March 2024 - 17:24) ОпЯТь лаГГи ! ! !
@  Pablo : (06 March 2024 - 17:48) Labākais hot ko esmu jebkad paņēmis :D
@  Senseless : (05 March 2024 - 09:42) Opatj ataki na server powli :(
@  Pablo : (03 March 2024 - 19:19) Riebiigais
@  Ganjakur : (03 March 2024 - 15:10) kāds niks mp?
@  Pablo : (02 March 2024 - 21:31) Var kāds iedot 40 kk priekš 11 lvl ?
@  Senseless : (02 March 2024 - 18:12) bratva estj u kogo script na ckerika na lamber ?
@  GM SOLAR : (02 March 2024 - 16:44) ALL GO NA CTF ! ! ! ! !
@  Ganjakur : (01 March 2024 - 17:32) labi
@  Pablo : (29 February 2024 - 12:08) Eu džeki, tie kuri vairāk nespēlē ultimu, varat droši man uzdāvināt savus itemus, vai pat savus acc. droši rakstam man privāti. Es vismaz uzturēšu šo serveri pie dzīvības :D
@  fr33 : (29 February 2024 - 09:45) yes
@  EmmaSb : (28 February 2024 - 21:00) Easyuo still working ?
@  Artemy Shan : (18 February 2024 - 20:42) Еще один фикс поставил. Смотрим, тестируем.
@  jurasiks : (18 February 2024 - 20:04) da pipec tu, zdelal on
@  Senseless : (17 February 2024 - 19:17) Lagi powli opatj
@  Artemy Shan : (17 February 2024 - 12:36) Мне удалось повторить действия, которые делал этот пиздюк, чтобы нагружать процессор сервера на 100% и вроде как я поправил это.
@  Artemy Shan : (13 February 2024 - 02:44) Сменился айпи для входа в игру. Теперь заходим через: loginserver=login.oldp.net,2593 или loginserver=91.121.232.151,2593

Photo

Îøèáêà Ñêðèïòà


  • Please log in to reply
3 replies to this topic

#1 Garik

Garik

    Newbie

  • Members
  • 6 posts

Posted 10 September 2017 - 01:31

Всем привет!

 

Подскажите , пожалуйста , почему не хочет рубить? 

 

Скрипт начинает ходить , подходит к дереву , но не рубит , чекает бэкпак и всё....

 

Спасибо заранее)

 
Sub gotoXY(x,y)
   var ld=0,ldc=0
   var dx,dy
   var mx,my
   var ox,oy,mk,k
   start:
   mx=UO.GetX()
   my=UO.GetY()
   dx=mx-x
   if dx<0 then
      dx=0-dx
   endif
   dy=my-y
   if dy<0 then
      dy=0-dy
   endif
   if dy>dx then
      dx=dy
   end if
   if dx<=0 then
      return
   end if
   if not ldc then
   end if
   if dx<3 then
      mk=70
   else
      mk=15
   end if
   
   ox=mx
   oy=my
   for k=1 to mk
      mx=UO.GetX()
      my=UO.GetY()
      if mx<>ox or my<>oy then
         goto sdidapl
      end if
      wait(10)
   next
   sdidapl:
   
   mx=UO.GetX()
   my=UO.GetY()
   dx=mx-x
   if dx<0 then
      dx=0-dx
   endif
   dy=my-y
   if dy<0 then
      dy=0-dy
   endif
   if dy>dx then
      dx=dy
   end if
   
   if dx<=0 then
      return
   end if
   if ld==dx then
      ldc=ldc+1
      if ldc>100 then
         uo.print("Can not reach location!")
         return
      end if
   else
      ld=dx
   end if
   
   if mx==x then
      if my==y then
         return
      endif
      if my>y then 
         UO.Press(33)
         goto start
      endif 
      UO.Press(35)
      goto start
   end if
   if mx<x then
      if my>y then
         UO.Press(39)
         goto start
      endif
      if my==y then
         UO.Press(34)
         goto start
      endif
      UO.Press(40)
      goto start
   end if
   if my<y then
      UO.Press(37)
      goto start
   endif
   if my==y then
      UO.Press(36)
      goto start
   endif
   UO.Press(38)
   goto start
end sub
 
var hatchet = "0x0F43"
Sub searchTree()
   var i, x, y, t, stp, max_search = 24 ; ???????????? ????????? ??? ????????? ?????????.
   var cx = uo.getX()
   var cy = uo.getY()
   for i = 1 to max_search
      for x =-i to i
         stp = 1
         if not i == abs( x ) then
            stp = abs( i ) * 2
         endif
         for y = -i to i step stp
            if NOT uo.getGlobal( 't:' + str( x + cx ) + "," + str( y + cy ) ) == "empty" then
               t = IsTreeTile( x + cx, y + cy )
               if not t == false then
                  uo.setGlobal( "tree_x", str( x + cx ) )
                  uo.setGlobal( "tree_y", str( y + cy ) )
                  uo.setGlobal( "tree_t", str( t ) )
                  return false
               else
                  uo.setGlobal( 't:' + str( x + cx ) + "," + str( y + cy ), 'empty' )
               endif
            endif
         next
      next
   next
   uo.print( "Found no tree, exit." )
   uo.exec( "terminate main" )
   return false
endsub
sub main()
   searchTree()
   doMineTree()
endsub
Sub doMineTree()
   var x, y, t, w
   repeat
      x = val( uo.getGlobal( "tree_x" ) )
      y = val( uo.getGlobal( "tree_y" ) )
      t = val( uo.getGlobal( "tree_t" ) )
      uo.setGlobal( 't:' + str( x ) + "," + str( y ), "empty" )
      Walker( x, y, "" )
      uo.exec( "exec searchTree" )
      repeat
         if uo.waiting() then
            uo.canceltarget()
         endif
         checklag()
         uo.waittargettile(str(t), str(x), str(y), str(uo.getZ()))
         uo.print(str(t)+ " " +str(x)+ " " +str(y)+ " " +str(uo.getZ()))
         uo.usetype(hatchet)
         w = waitforore()
      until w == 1
      while uo.getGlobal( "tree_x" ) == str( x ) && uo.getGlobal( "tree_y" ) == str( y )
         wait( 100 )
      wend
   until uo.dead()
endsub
Sub deljournal( msg )
   while uo.injournal( msg )
      uo.setjournalline( uo.injournal( msg ) -1, '' )
   wend
endsub
Sub IsTreeTile( x, y )
   var i, tree_count = 22
   DIM tree[ val( str( tree_count ) ) ]
   tree[0] = 3274
   tree[1] = 3275
   tree[2] = 3276
   tree[3] = 3277
   tree[4] = 3280
   tree[5] = 3283
   tree[6] = 3286
   tree[7] = 3289
   tree[8] = 3291
   tree[9] = 3292
   tree[10] = 3294
   tree[11] = 3295
   tree[12] = 3296
   tree[13] = 3299
   tree[14] = 3302
   tree[15] = 3394
   tree[16] = 3395
   tree[17] = 3417
   tree[18] = 3440
   tree[19] = 3461
   tree[20] = 15300
   tree[21] = 15305
   
   #    if checkIgnore( x, y ) then
   #        return false
   #    endif
   
   for i = 0 to tree_count -1
      if uo.privategettile( x, y, -1, tree[i], tree[i] ) then
         return tree[i]
      endif
   next
   return false
endsub
Sub checkIgnore( x, y )
   VAR i, cX, cY
   DIM ignore[5]
   ignore[0] = "1942,414"
   ignore[1] = "1995,331"
   ignore[2] = "1996,330"
   ignore[3] = "1999,331"
   for i=0 to 3
      cX = VAL( left( ignore[i], 4 ) )
      cY = VAL( right( ignore[i], 3 ) )
      if x == cX and y == cY then
         return true
      endif
   next
   return false
endsub
sub waitforore()
   var n
   for n=0 to 50
      if uo.injournal("appears immune|nothing here|reach this|reach that|????????????|nothing there|lumberjacking skill|too far away") then
         return 1
      endif
      if uo.injournal('but fail|You put') then
         return 0
      endif
      wait(500)
   next
   return 1
endsub
sub checklag()
   repeat
      UO.DeleteJournal()
      UO.Click('backpack')
   until backpack()==1
endsub
sub backpack()
   var n
   for n=0 to 200
      if uo.injournal('cliloc# 0xFEA1B') then
         return 1
      endif
      wait(200)
   next
endsub
sub hiding()
   if uo.warmode() <> 0 then
      uo.warmode(0)
   endif
   uo.useskill('Hiding')
endsub
Sub Abs(X)
   if X>0 then
      return X
   else
      return (-X)
   end if
end sub
sub Walker(x,y,Target) ########################################## ???????
   VAR LastTimer=UO.Timer()
   VAR distance=1
   VAR i
   VAR dir,ldir,rdir,key,olddir
   VAR dx,dy,Exit=0
   VAR CacheLimit=9,CacheIndex="Text"
   DIM CacheX[10], CacheY[10]
   
   CacheX[0]="Test"
   uo.say('')
   While Exit<>1
      
      If Target<>"" Then
         dx=UO.GetX(Target)-UO.GetX()
         dy=UO.GetY(Target)-UO.GetY()         
         If UO.GetDistance(Target)<2 OR LastTimer+100<UO.Timer() Then
            wait(1000)
            return
         Endif
      Else
         dx=x-UO.GetX()
         dy=y-UO.GetY()
         If (Abs(dx)<=distance AND Abs(dy<=distance)) OR LastTimer+100<UO.Timer() Then
            return
         Endif
      Endif   
      If dx<>0 AND dy<>0 Then
         If dx>0 AND dy>0 Then ; GoSE
            dir=3
            ldir=2
            rdir=4
            key=40 ; DownArrow
            olddir=UO.GetDir()
            If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then
               If olddir==2 Then ; GoNE
                  dir=1
                  ldir=0
                  rdir=1
                  key=39 ; RightArrow
                  While UO.GetDir()<>1
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSW
                  dir=5
                  ldir=5
                  rdir=6
                  key=37 ; LeftArrow
                  While UO.GetDir()<>5
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
         If dx>0 AND dy<0 Then ; GoNE
            dir=1
            ldir=0
            rdir=2
            key=39 ; RightArrow
            olddir=UO.GetDir()
            If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then
               If olddir==0 Then ; GoWN
                  dir=7
                  ldir=6
                  rdir=7
                  key=38 ; UpArrow
                  While UO.GetDir()<>7
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSE
                  dir=3
                  ldir=3
                  rdir=4
                  key=40 ; DownArrow
                  While UO.GetDir()<>3
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
         If dx<0 AND dy>0 Then ; GoSW
            dir=5
            ldir=4
            rdir=6
            key=37 ; LeftArrow
            olddir=UO.GetDir()
            If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then
               If olddir==6 Then ; GoWN
                  dir=7
                  ldir=7
                  rdir=0
                  key=38 ; UpArrow
                  While UO.GetDir()<>7
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSE
                  dir=3
                  ldir=2
                  rdir=3
                  key=40 ; DownArrow
                  While UO.GetDir()<>3
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
         If dx<0 AND dy<0 Then ; GoWN
            dir=7
            ldir=6
            rdir=0
            key=38 ; UpArrow
            olddir=UO.GetDir()
            If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then
               If olddir==0 Then ; GoNE
                  dir=1
                  ldir=1
                  rdir=2
                  key=39 ; RightArrow
                  While UO.GetDir()<>1
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSW
                  dir=5
                  ldir=4
                  rdir=5
                  key=37 ; LeftArrow
                  While UO.GetDir()<>5
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
      Endif
      If dx<>0 AND dy==0 Then
         If dx>0 Then ; GoE
            dir=2
            key=34 ; PgDown
            olddir=UO.GetDir()
            If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then
               If olddir==2 Then ; GoSE
                  dir=3
                  ldir=3
                  rdir=4
                  key=40 ; DownArrow
                  While UO.GetDir()<>3
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoNE
                  dir=1
                  ldir=1
                  rdir=0
                  key=39 ; RightArrow
                  While UO.GetDir()<>1
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif       
         If dx<0 Then ; GoW
            dir=6
            key=36 ; Home key
            olddir=UO.GetDir()
            If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then
               If olddir==0 Then ; GoWN
                  dir=7
                  ldir=7
                  rdir=0
                  key=38 ; UpArrow
                  While UO.GetDir()<>7
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSW
                  dir=5
                  ldir=4
                  rdir=5
                  key=37 ; LeftArrow
                  While UO.GetDir()<>5
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
      Endif
      If dx==0 AND dy<>0 Then
         If dy>0 Then ; GoS
            dir=4
            key=35 ; End
            If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then
               If olddir==2 Then ; GoSE
                  dir=3
                  ldir=2
                  rdir=3
                  key=40 ; DownArrow
                  While UO.GetDir()<>3
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSW
                  dir=5
                  ldir=6
                  rdir=5
                  key=37 ; LeftArrow
                  While UO.GetDir()<>5
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif     
         If dy<0 Then ;GoN
            dir=0
            key=33 ; PgUp
            olddir=UO.GetDir()
            If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then
               If olddir==2 Then ; GoNE
                  dir=1
                  ldir=1
                  rdir=2
                  key=39 ; RightArrow
                  While UO.GetDir()<>1
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoWN
                  dir=7
                  ldir=7
                  rdir=6
                  key=38 ; UpArrow
                  While UO.GetDir()<>7
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
      Endif
   Wend
end sub
sub StepEdit(x,y,dir,key)
   VAR walkwait=250
   VAR ErrLevel=0
   If UO.GetDir()<>dir Then
      UO.Press(key)
   Endif
   UO.Press(key)
   wait(walkwait)
   If x==UO.GetX() AND y==UO.GetY() Then
      CheckLag()
      If x==UO.GetX() AND y==UO.GetY() Then
         ;zatik
         ErrLevel=1
      Endif
   Endif
   Return ErrLevel
end sub
sub StepArrow(x,y,dir,ldir,rdir,key)
   VAR walkwait=250
   VAR ErrLevel=0
   If UO.GetDir()<>dir Then
      UO.Press(key)
      wait(walkwait)
      If UO.GetDir()<>dir AND UO.GetDir()<>ldir AND UO.GetDir()<>rdir Then
         CheckLag()
      Endif
   Endif
   If UO.GetX()==x AND UO.GetY()==y Then
      UO.Press(key)
      wait(walkwait)
      If UO.GetDir()==dir AND UO.GetX()==x AND UO.GetY()==y Then
         CheckLag()
         If UO.GetDir()==dir AND UO.GetX()==x AND UO.GetY()==y Then
            ;zatik         
            ErrLevel=1
         Endif
      Endif
   Endif
   Return ErrLevel
end sub


#2 Second

Second

    Journeyman

  • Members
  • 76 posts

Posted 10 September 2017 - 08:03

Na forume posmatri tam estj norm scripti, nu tut vse rubit, kopajet, fishing na easyuo da i vobshe vse tokiji scp na easyuo ispolzivajet a ne na inject t.k proshe i bolshe funkcij tam.



#3 opas

opas

    Soviet

  • Members
  • 1011 posts
  • Gender:Male

Posted 10 September 2017 - 14:09

Track world items включил ?



#4 Garik

Garik

    Newbie

  • Members
  • 6 posts

Posted 10 September 2017 - 19:02

Track world items включил ?

да....






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users