Yoko

All sides of Injection
It is currently 2025-11-14 10:31:17

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Need Mininh script!
PostPosted: 2007-04-30 09:23:10 
Offline

Joined: 2007-04-30 09:12:06
Posts: 2
Hi All, Someone Can Help me?

I don't undestand russian, so i can't check if there is another mining script..

My Problem is this, on my shard now for mining, you need to stay in the same direction , where you mine... and now i need some mod on my mining script, but i can't do it...this script is a friend donations!
So Someone can Modify that script?Please?

This script for me is really good...if someone can please, modify that script

I need to move, and to stay in the facing direction where i mine


Thank you!

Code:
##########################-.MINARE.-#############################
# | | 18| 19| 20| |
# |___|___|___|___|___|
# | 17| 7 | 8 | 1 | 9 |
# |___|___|___|___|___|
# | 16| 6 | | 2 | 10|
# |___|___|___|___|___|
# | 15| 5 | 4 | 3 | 11|
# |___|___|___|___|___|
# | | 14| 13| 12| |
# | | | | | |
sub lamer()
UO.Say(".autoloop 1")
var a=0, b=0, x, x0, y, y0, z, z0, tile
uo.exec("waittargetself")
uo.exec("addobject my")
wait(500)
uo.exec("waittargetself")
uo.exec("addobject my")
wait(500)
x0=UO.Getx("my")
y0=UO.Gety("my")
z0=UO.Getz("my")
uo.print("x " + str(x0) + " y " + str(y0) + " z " + str(z0))
tile=1339
IF uo.count("0x0e85")==0 THEN
uo.print("Non hai picconi in borsa")
uo.say("terminate all")
ENDIF
REPEAT
x=x0-1
y=y0-1
z=z0
a=1
azione:
uo.exec("disarm")
wait(300)
IF tile==1339 THEN
uo.exec("equipt Rhand 0x0e85")
z=0
ENDIF
IF tile==3384 THEN
uo.exec("equipt Rhand 0x0F43")
ENDIF
wait(300)
b=0
REPEAT
b=b+1
uo.exec("waittargettile " + str(tile) + " " + Str(x) + " " + Str(y) + " " + str(z))
IF tile==1339 THEN
UO.Exec("usetype 0x0e85")
ENDIF
IF tile==3384 THEN
uo.exec("usetype 0x0F43")
ENDIF
uo.deletejournal()
wait(1000)
uo.print("azione " + str(b) + " posizione " + str(a))
repeat
wait(10)
until uo.injournal("You finished looping") or uo.injournal("You are not facing that direction") or uo.injournal("That is too") or uo.injournal("Looping aborted") or uo.injournal ("There's no ore left there")
UNTIL b==10 or uo.injournal("There's no")
a=a+1
IF a==2 THEN
x=x0
y=y0-1
goto azione
ENDIF
IF a==3 THEN
x=x0+1
y=y0-1
goto azione
ENDIF
IF a==4 THEN
x=x0+1
y=y0
goto azione
ENDIF
IF a==5 THEN
x=x0+1
y=y0+1
goto azione
ENDIF
IF a==6 THEN
x=x0
y=y0+1
goto azione
ENDIF
IF a==7 THEN
x=x0-1
y=y0+1
goto azione
ENDIF
IF a==8 THEN
x=x0-1
y=y0
goto azione
ENDIF
IF a==9 THEN
x=x0-1
y=y0-2
goto azione
ENDIF
IF a==10 THEN
x=x0
y=y0-2
goto azione
ENDIF
IF a==11 THEN
x=x0+1
y=y0-2
goto azione
ENDIF
IF a==12 THEN
x=x0+2
y=y0-1
goto azione
ENDIF
IF a==13 THEN
x=x0+2
y=y0
goto azione
ENDIF
IF a==14 THEN
x=x0+2
y=y0+1
goto azione
ENDIF
IF a==15 THEN
x=x0+1
y=y0+2
goto azione
ENDIF
IF a==16 THEN
x=x0
y=y0+2
goto azione
ENDIF
IF a==17 THEN
x=x0-1
y=y0+2
goto azione
ENDIF
IF a==18 THEN
x=x0-2
y=y0+1
goto azione
ENDIF
IF a==19 THEN
x=x0-2
y=y0
goto azione
ENDIF
IF a==20 THEN
x=x0-2
y=y0-1
goto azione
ENDIF
UNTIL uo.life==0
end sub


Last edited by Carbonchia on 2007-04-30 16:30:04, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2007-04-30 13:23:39 
Offline
User avatar

Joined: 2007-02-21 20:15:57
Posts: 479
Code:
[code][/code]

_________________
Шард Антарес
Ururu


Top
   
 Post subject:
PostPosted: 2007-04-30 16:30:40 
Offline

Joined: 2007-04-30 09:12:06
Posts: 2
someone can help me?


Top
   
 Post subject:
PostPosted: 2007-05-01 21:22:11 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Sorry for my very-very clumsy English :)

I can write function for you in reply box :)

You can use it for you script.

Code:
; x, y - coordinates where you mining
; function returns dir number for entering coordinates
Sub DetermineDir( x, y )
   return getWalkDir( x - uo.getX(), y - uo.getY(), 1, 0 )
End Sub

; x, y - coordinates where you mining
; function returns key code
Sub DetermineKey( x, y )
   return getWalkDir( x - uo.getX(), y - uo.getY(), 0, 0 )
End Sub

; this function from my lib
; Получение направление хождения
; v1.1 (c) 2006, Destruction.
; x = координата X точки - uo.getX();
; y = координата Y точки - uo.getY();
; type = 0 - получение кода клавиши, чтобы пойти.
; type = 1 - получение направления в котором идти (см. uo.getDir).
; walk = 0 - направление, чтобы подойти
; walk = 1 - обратно направление (чтобы отойти в противоположную сторону)
Sub getWalkDir(x, y, type, walk)
   DIM keys[8]
   if type == 0 then
      if walk == 0 then
         keys[0] = 35; End
         keys[1] = 40; Down
         keys[2] = 34; Page Down
         keys[3] = 39; Right
         keys[4] = 33; Page Up
         keys[5] = 38; Up
         keys[6] = 36; Home
         keys[7] = 37; Left
      else
         keys[0] = 33; Page Up
         keys[1] = 38; Up
         keys[2] = 36; Home
         keys[3] = 37; Left
         keys[4] = 35; End
         keys[5] = 40; Down
         keys[6] = 34; Page Down
         keys[7] = 39; Right
      endif
   else
      if walk == 0 then
         keys[0] = 4; End
         keys[1] = 3; Down
         keys[2] = 2; Page Down
         keys[3] = 1; Right
         keys[4] = 0; Page Up
         keys[5] = 7; Up
         keys[6] = 6; Home
         keys[7] = 5; Left
      else
         keys[0] = 0; Page Up
         keys[1] = 7; Up
         keys[2] = 6; Home
         keys[3] = 5; Left
         keys[4] = 4; End
         keys[5] = 3; Down
         keys[6] = 2; Page Down
         keys[7] = 1; Right
      endif
   endif
   if x==0 && y > 0 then
      return keys[0]
   endif
   if x==0 && y < 0 then
      return keys[4]
   endif
   if x > 0 && y == 0 then
      return keys[2]
   endif
   if x < 0 && y == 0 then
      return keys[6]
   endif
   if x > 0 && y > 0 then
      return keys[1]
   endif
   if x > 0 && y < 0 then
      return keys[3]
   endif
   if x < 0 && y > 0 then
      return keys[7]
   endif
   if x < 0 && y < 0 then
      return keys[5]
   endif
endsub


You can use received data from DetermineDir or DetermineKey for add dir.

Commands: uo.press( key code ), uo.addDir( dir )

Of course, you need to check current dir.

Good luck.

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited