thanks you if some one have it.
Forgotten World lumberjacking
Moderators: Murderator+, Murderator
Forgotten World lumberjacking
Everything i want its only script to find tree wich is near and chop it untill end.. the + is if the character run to other tree but its not so important
thanks you if some one have it.
thanks you if some one have it.
-
Destruction
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
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.
Telegram: @tatikom
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
-
Destruction
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
This script have only 101 lines...
Whats you have near line 132 ?
Whats you have near line 132 ?
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.
Telegram: @tatikom
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Lol im sorry
you know i posted my Autoload line
not script
so
the problem is in Line 10 : Function not found - ABS
this script :
you help me ?
the problem is in Line 10 : Function not found - ABS
this script :
Code: Select all
#Lumbjacking ? ??????????? ??????? (c) Destruction, v1.0
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( x + 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 autoLumber" )
return false
endsub
sub autoLumber()
searchTree()
doMineTree()
endsub
Sub doMineTree()
var x, y, t
var end = "appears immune|nothing here|reach this"
var try = "You put|fail"
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, 1 )
uo.exec( "exec searchTree" )
repeat
if uo.waiting() then
uo.canceltarget()
endif
deljournal( try + "|" + end )
uo.waittargettile( str( t ), str( x ), str( y ), str( uo.getZ() ) )
uo.usetype( hatchet )
repeat
wait( 100 )
until uo.injournal( try + "|" + end )
until uo.injournal( end )
while uo.getGlobal( "tree_x" ) == str( x ) && uo.getGlobal( "tree_y" ) == str( y )
wait( 100 )
wend
until false
endsub
Sub deljournal( msg )
while uo.injournal( msg )
uo.setjournalline( uo.injournal( msg ) -1, '' )
wend
endsub
Sub IsTreeTile( x, y )
var i, tree_count = 20
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
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
endsubyou help me ?
-
Destruction
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
Oh my god...
U need walker script, as minimum..
viewtopic.php?p=66813#66813 - try to copy this script too and all will be good.
U need walker script, as minimum..
viewtopic.php?p=66813#66813 - try to copy this script too and all will be good.
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.
Telegram: @tatikom
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom