[UOSteam] Alamiester's Easy Tree Chopper v0.2
Posted: Fri Feb 09, 2018 12:06 pm
well, as requested, here is my attempt at making a easy use able lumber jacking macro. i reworked the whole thing. took out the slow chopping logs to boards routine. i will post a seperate addon for that. i also redid the whole part where its looking for an axe and equiping it, if its in your bag. it will put whatever else is inyour hands in your bag and equip the axe if its in your backpack. thanks to glyph for finding me a bag of resources so quick, lol. this version is alot quicker at chopping. this is not in anyway an afk macro, you still have to target the tree on each chop. but you dont need to click on your axe and you dont need to move resources around in your bag. unless you target a regular bag for the tree trimmings. also make sure you dont have circle of transperency on in your uo options. happy chopping!

Code: Select all
//[UOSteam]Alamiester's Easy Tree Chopper v0.2
//11Feb2018
//You must have an axe,a saw, and BOH or BOR for this script to work.
//I added a second bag for all the other stuff you can get from trees. you can either put them in a BOH or use your safe trash 4 tokens bag.
//
//create list for BOR.
if not listexists 'logbag'
createlist 'logbag'
pushlist 'logbag' '0x1bdd' // Log
endif
pause 200
//
//create list misc fruits and tree clippings.
if not listexists 'miscbag'
createlist 'miscbag'
pushlist 'miscbag' '0x318f' // Bark Fragment
pushlist 'miscbag' '0x2f5f' // Switch
pushlist 'miscbag' '0x3190' // Parasitic Plant
pushlist 'miscbag' '0x3191' // Luminescent Fungi
pushlist 'miscbag' '0x9d0' // Apple
pushlist 'miscbag' '0x994' // Pear
pushlist 'miscbag' '0x9d2' // Peach
endif
pause 200
//
//setup aliases.
if not @findobject 'logbag'
headmsg 'Select a bag to store Logs.'
promptalias 'logbag'
endif
if not @findobject 'miscbag'
headmsg 'Select a bag to store fruit and tree clippings.'
promptalias 'miscbag'
endif
//
if not @findtype '0xf43' 'any' 'backpack'
sysmsg 'No Axe Found in backpack!'
sysmsg 'It must be in your hand. :P'
else
if findlayer 'self' 2
@unsetalias 'hand2'
@setalias 'hand2' 'found'
moveitem 'hand2' 'backpack' 'any' 'any'
endif
pause 300
if findlayer 'self' 1
@unsetalias 'hand1'
@setalias 'hand1' 'found'
moveitem 'hand1' 'backpack' 'any' 'any'
endif
pause 300
if @findtype '0xf43' 'any' 'backpack'
@unsetalias 'Axe'
@setalias 'Axe' 'found'
pause 300
equipitem 'Axe' 2
endif
else
if not @findlayer 'self' 2 or @findlayer 'self' 1
equipitem 'Axe' 2
pause 1500
endif
endif
//
@clearjournal
//
//******************
// chop the trees
//******************
//
msg 'Chop, Chop, Chop, all day long!' 15
pause 200
msg 'Chop, Chop, Chop, while i sing this song!' 15
pause 200
while not @injournal 'enough wood here' "system"
if weight <= '350'
useobject! 'LeftHand'
pause 200
waitfortarget '5000'
pause '2000'
else
@canceltarget!
@clearjournal
sysmsg 'You are overwieght!'
//move logs to BOR
sysmsg ' **** Looking for logs ****' '20'
for 0 to 'logbag'
while @findtype! logbag[] 'any' 'backpack' 'any' '0'
sysmsg ' **** Moving Logs ****' '20'
if @injournal 'cannot hold more'
sysmsg ' !!! WARNING: Your bag is full. Exiting script !!!' '28'
@clearjournal
stop
else
moveitem 'found' 'logbag' 'any' 'any'
pause 500
endif
endwhile
endfor
//move misc fruit and tree trimmings to bag.
sysmsg ' **** Looking for Tree Trimmings ****' '20'
for 0 to 'miscbag'
while @findtype! miscbag[] 'any' 'backpack' 'any' '0'
sysmsg ' **** Moving Tree Trimmings ****' '20'
if @injournal 'cannot hold more'
sysmsg ' !!! WARNING: Your bag is full. Exiting script !!!' '28'
@clearjournal
stop
else
moveitem 'found' 'miscbag' 'any' 'any'
pause 500
endif
endwhile
endfor
endif
endwhile
//
if @injournal 'enough wood here' "system"
headmsg 'NO MORE WOOD!' '2124'
pause 200
headmsg 'Go to the next tree!' '2124'
pause 200
endif
//
@canceltarget!
@clearjournal