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!
//[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
Last edited by Alamiester on Sun Feb 11, 2018 1:52 am, edited 2 times in total.
well, its far from perfect, but it gets the job done. i was unsure what skill is needed in carpentry to be able to turn the logs into boards. since i am at 105 already, and unable to convert redwood and petrified, i set a >=120 on both of those. if anyone knows the skill levels required feel free to chime in and i can update the rest of the woods. right now if you dont have enough skill the logs just move around in your backpack, until you stop the macro.
Just a thought. If the logs could go into a BoH or a Bag of Resources, it would solve the weight issue. I realise that not everyone has these though. It would also solve the problem of not being able to convert the higher tiers into boards.
yeah i thought about that, once the logs are chopped the weight goes down a lot on them, and most usually they are the plain logs that get chopped if your runnin around to random trees. honestly i didnt wanna add anymore lines of code. its already bulky, and it sucks converting logs anyways. if your willing to donate one of those to me it might change my mind about it, lol.
I'm not sure if this is intentional or not, but it just spams 'use axe' rather than actually targeting anything. I've attempted to make a work around where I change the target each time, but trees give off very few successful chops before being depleted, usually gotta go to 3-4 trees and empty them all before I hit my 600 weight limit on my bag. I'm gunna attempt to rewrite your format (with your permission, of course) and see if I can make it shorter and more efficient.
I haven't used this script but it seems like the OP only setup fixed delay between chops.
You should be careful using the script because a tree has limited number of resources before depletion, and each chopping attempt (regardless of successful extract) decreases resource availability by 1. For example, instead of getting 10 logs on a specific tree with 10 chopping, you might end up retrieving only 2 logs with 10 chopping (given your success chance is 100%), because you can take new action and override preceding chop before it's complete.
OP may be able to make a way around by checking each attempts with bag weight/axe use?
jackpod wrote:For example, instead of getting 10 logs on a specific tree with 10 chopping, you might end up retrieving only 2 logs with 10 chopping (given your success chance is 100%), because you can take new action and override preceding chop before it's complete.
I don't know where you got that info but I just tested it on 5 runebooks of plain wood (one macro with 500 ms between chops, one waiting for chopping animation to end) and there's no difference at all. 80 trees gave me exactly the same amount of wood on both passes.