I am trying to make a lumberjacking macro for steam (so far it looks like this)
Code: Select all
if not findalias 'chopper'
headmsg 'Select your chopping axe (must be equipped)'
promptalias 'chopper'
endif
if not findalias 'shovelin'
headmsg 'Select a shovel... yes, a shovel... ugly workaround'
promptalias 'shovelin'
endif
if not listexists 'trees'
createlist 'trees'
pushlist 'trees' 0xce0 //walnut
pushlist 'trees' 0xcd0 // pine
pushlist 'trees' 0xcd3 //ash
pushlist 'trees' 0xcd9 //cedar needle
pushlist 'trees' 0xce6 //willow
pushlist 'trees' 0xccd //tree
pushlist 'trees' 0xcd0 //tree
pushlist 'trees' 0xcd6 //cedar
pushlist 'trees' 0xcd8 //cedar 2
pushlist 'trees' 0xcdd //oak
pushlist 'trees' 0xce3 //tree
endif
@clearjournal
for 0 to 'trees'
useobject 'shovelin'
waitfortarget 15000
if direction == 0
targettileoffset 0 -1 0 trees[]
elseif direction == 1
targettileoffset 1 -1 0 trees[]
elseif direction == 2
targettileoffset 1 0 0 trees[]
elseif direction == 3
targettileoffset 1 1 0 trees[]
elseif direction == 4
targettileoffset 0 1 0 trees[]
elseif direction == 5
targettileoffset -1 1 0 trees[]
elseif direction == 6
targettileoffset -1 0 0 trees[]
elseif direction == 7
targettileoffset -1 -1 0 trees[]
endif
pause 100
while @injournal "can't mine that"
pause 2000
useobject 'chopper'
waitfortarget 15000
if direction == 0
targettileoffset 0 -1 0 trees[]
elseif direction == 1
targettileoffset 1 -1 0 trees[]
elseif direction == 2
targettileoffset 1 0 0 trees[]
elseif direction == 3
targettileoffset 1 1 0 trees[]
elseif direction == 4
targettileoffset 0 1 0 trees[]
elseif direction == 5
targettileoffset -1 1 0 trees[]
elseif direction == 6
targettileoffset -1 0 0 trees[]
elseif direction == 7
targettileoffset -1 -1 0 trees[]
endif
if @injournal 'not enough wood'
break
endif
endwhile
endfor
Would it be possible to "detect" when I start swinging my axe, so that would mean its targetting the right tree? My issue is that when it targets a tree from the list that isn't the tree in front of me, I get no journal error or anything, so I can't do a simple if @injournal 'whatever'...
I want to do it with steam because its kind of easy to tweak afterward (once I add the checks for weight then chopping all logs into boards > sending them into the wood keys), and welp, because I am a total newbie with EasyUO and I am not sure I want to spend dozens of hours delving into documentation to write something simple (but complex for a newb at that language).
If someone has an idea, I am all ears.