[UOSteam] Alamiester's Easy Tree Chopper v0.2

If you make a Client-side script you can publish it here for other players to use
Post Reply
User avatar
Alamiester
Legendary Scribe
Posts: 279
Joined: Wed Jan 04, 2017 8:49 pm

[UOSteam] Alamiester's Easy Tree Chopper v0.2

Post by Alamiester »

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! :D

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
Last edited by Alamiester on Sun Feb 11, 2018 1:52 am, edited 2 times in total.
User avatar
erised_faylen
Master Scribe
Posts: 57
Joined: Sun May 21, 2017 3:26 pm

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.1

Post by erised_faylen »

this is exciting! thank you :D can't wait to try it!
User avatar
Alamiester
Legendary Scribe
Posts: 279
Joined: Wed Jan 04, 2017 8:49 pm

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.1

Post by Alamiester »

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.
User avatar
[Glyph]
Legendary Scribe
Posts: 226
Joined: Mon Sep 14, 2015 12:04 am

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.1

Post by [Glyph] »

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.
User avatar
Alamiester
Legendary Scribe
Posts: 279
Joined: Wed Jan 04, 2017 8:49 pm

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.1

Post by Alamiester »

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. :nod:
Deadwerd
Elder Scribe
Posts: 100
Joined: Fri Sep 23, 2016 7:48 pm
Location: Iowa, US

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.1

Post by Deadwerd »

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.
'Deadwerd' in game, 'Deadwerd' onstage.
User avatar
Alamiester
Legendary Scribe
Posts: 279
Joined: Wed Jan 04, 2017 8:49 pm

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.1

Post by Alamiester »

you havto actually click on the tree. :lol: im gonna redo this. split it into one that chops and moves to a BOH or BOR, and one that chops logs to boards.
User avatar
Alamiester
Legendary Scribe
Posts: 279
Joined: Wed Jan 04, 2017 8:49 pm

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.2

Post by Alamiester »

update to v0.2
thanks glyph! :dance
zoras
Apprentice Scribe
Posts: 15
Joined: Sun May 27, 2018 1:12 am

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.2

Post by zoras »

Alamiester, you don't happen to have one that chops then cuts to boards and loads them into the key ring do ya?
jackpod
Expert Scribe
Posts: 37
Joined: Mon Dec 22, 2014 10:41 pm

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.2

Post by jackpod »

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?
User avatar
Animol
Elder Scribe
Posts: 166
Joined: Tue Apr 03, 2018 8:38 pm

Re: [UOSteam] Alamiester's Easy Tree Chopper v0.2

Post by Animol »

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.
Post Reply