Results 1 to 11 of 11

Thread: LumberJack9000 - Woodcutting with a vengeance!

  1. #1
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    193
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Post LumberJack9000 - Woodcutting with a vengeance!

    Probably not my first script but here is something
    that isn't finished but is basically me trying to figure out
    what is gonna work and what isn't in terms of an actual working
    bot that isn't retarded.

    Biggest takeaways from doing this:
    1. Linking RSWalker locations to main screen objects is a must even for trees
    because how else are u supposed to know if its cut down otherwise.
    2. Somebody needs to make a function that converts main screen point
    to RSWalker map point. (Accurately) So i can use RSW.GetMSTile to detect
    if a tree is gone or not without having to manually add points where the tree actually is
    into my data pile.
    3. Trying to find/click things while "on the move" for rswalker was interesting.

    Directions for use:
    0. Simba 1.3
    1. Not anti ban proof at all. Just a proof of concept right now.
    2. Set Zoom to Medium
    3. Move Terminator and YouMurderer Folders into Simba/Fonts folder. Or install the fonts.
    4. Put the Fierce Scripts folder into Simba's scripts folder.
    5. Be in the location that you say you are (e.g. banking draynor, be in draynor village on your player)

    What actually works:
    1. Chops then Banks
    2. Falador: Oaks and Yews. Draynor Willows and Yews. Varrock East Yews.
    3. Forms
    4. Breaks
    5. Antibans
    6. Progress GUI

    Places like Lumbridge with stairs to bank aren't supported yet.
    Make sure you turn on Debugging options to see what's going on.





    Download the zip : Updated 9/20[meganz]

    I'm interested to know how the Forms will do on other people's windows/linux devices. Not sure how it will turn out being Simba forms n all.
    Cheers.

    The End Awaits. . .

  2. #2
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,157
    Mentioned
    25 Post(s)
    Quoted
    432 Post(s)

    Default

    Nice work! Looks really good!

    Somebody needs to make a function that converts main screen point to RSWalker map point. (Accurately) So I can use RSW.GetMSTile to detect if a tree is gone or not without having to manually add points where the tree actually is into my data pile.
    So, your goal is to find the Minimap point of a tree using colour only by using the point that was clicked rather than looking for the colour inside of a specific tile? If so, there can be a bit of an accuracy problem when working with that. It will take a bit of calibration but there is a good chance it will select the tile next to the tree as the trees are pretty tall on the main screen. I can see if I can come up with something and I'll let you know.

  3. #3
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    193
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by StickToTheScript View Post
    Nice work! Looks really good!



    So, your goal is to find the Minimap point of a tree using colour only by using the point that was clicked rather than looking for the colour inside of a specific tile? If so, there can be a bit of an accuracy problem when working with that. It will take a bit of calibration but there is a good chance it will select the tile next to the tree as the trees are pretty tall on the main screen. I can see if I can come up with something and I'll let you know.
    Yeah i guess you are right it would be tricky to pull off. Maybe I'm getting too perfectionist with this haha. Using UpText and randoming around is probably safe enough. I wish RSWalker didn't take a decade after walking somewhere for my chop tree function to do something. Maybe its cuz of the drawing too.

    I have a TreeClicked variable. Whenever it finds a tree and clicks it. It sets it to true. Whenever it doesn't find a tree. It sets it to false. When that variable is true. I know that either the tree is cut down or my character just randomly stopped woodcutting when my pixel shift tells me I'm not chopping anymore. So instead of checking the surrounding trees for uptext again. I'd rather just check the place where i clicked to see if the tree's colors are still there. But i guess trees could get clustered up and this wouldn't work. It would potentially solve 2 problems if you think deep about it.

    My script just assumes that the tree is cut down and precedes to walk to a new area (another yew tree nearby in the case of falador). With maybe an extra uptext check.


    EDIT: Kinda like how your Find Objects with RSWalker tut. You can just click the screen with right click on Smart and get the world position and get the tile on the screen.
    Could be useful for mining to check if the rock that was clicked was mined or not. Because on members u can mine multiple ores at once. So checking the inventory might not be as good idk.

    The End Awaits. . .

  4. #4
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    193
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    +---| STATS |----------------------------------------
    |- Script Runtime : 05h 21m 35s
    |- Player[0] Runtime : 05h 21m 15s
    |- State : CHOP
    |- Time Since Break : 21m 33s
    |- Energy Level : 60.4
    |- Logs Jacked : 672
    |- Randoms Dismissed : 1
    |- Estimated Profit : 128352gp
    +----------------------------------------------------

    The End Awaits. . .

  5. #5
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,157
    Mentioned
    25 Post(s)
    Quoted
    432 Post(s)

    Default

    Quote Originally Posted by LordJashin View Post
    Yeah i guess you are right it would be tricky to pull off. Maybe I'm getting too perfectionist with this haha. Using UpText and randoming around is probably safe enough. I wish RSWalker didn't take a decade after walking somewhere for my chop tree function to do something. Maybe its cuz of the drawing too.

    I have a TreeClicked variable. Whenever it finds a tree and clicks it. It sets it to true. Whenever it doesn't find a tree. It sets it to false. When that variable is true. I know that either the tree is cut down or my character just randomly stopped woodcutting when my pixel shift tells me I'm not chopping anymore. So instead of checking the surrounding trees for uptext again. I'd rather just check the place where i clicked to see if the tree's colors are still there. But i guess trees could get clustered up and this wouldn't work. It would potentially solve 2 problems if you think deep about it.

    My script just assumes that the tree is cut down and precedes to walk to a new area (another yew tree nearby in the case of falador). With maybe an extra uptext check.


    EDIT: Kinda like how your Find Objects with RSWalker tut. You can just click the screen with right click on Smart and get the world position and get the tile on the screen.
    Could be useful for mining to check if the rock that was clicked was mined or not. Because on members u can mine multiple ores at once. So checking the inventory might not be as good idk.
    See, my first woodcutter did something a little different. I used a fairly inefficient method of finding the tree by selecting a 3x3 area of tiles around the tree that I wanted to chop. I saved those tiles and hardcoded them into the script. What would happen is that once the pixelshift was low enough, the script would search for the leaf colours inside those 9 boxes to see if there was a tree there. If it didn't find the leaves, the tree was assumed to be cut down.

    I found that this method worked for any camera direction and was very accurate. I added a check to see if all 9 tiles were on the main screen. If they weren't, I'd walk to one of the tiles and then check again.

  6. #6
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    193
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by StickToTheScript View Post
    See, my first woodcutter did something a little different. I used a fairly inefficient method of finding the tree by selecting a 3x3 area of tiles around the tree that I wanted to chop. I saved those tiles and hardcoded them into the script. What would happen is that once the pixelshift was low enough, the script would search for the leaf colours inside those 9 boxes to see if there was a tree there. If it didn't find the leaves, the tree was assumed to be cut down.

    I found that this method worked for any camera direction and was very accurate. I added a check to see if all 9 tiles were on the main screen. If they weren't, I'd walk to one of the tiles and then check again.
    I kinda did something like that for finding my bank booths. I just clustered a bunch of tile points and it randomly picks a tile to search.

    Well, seeing as the script section is lacking woodcutting scripts. I'll finish up the code for this and submit it there when its more full fledged. Gotta add support for upstairs banks, clean up the code more, and add support for firemaking. I also need to add more script terminating features so the script doesn't just go on forever even if its failing too much. There's no reason for it to fail. But Murphy's law.

    The End Awaits. . .

  7. #7
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,644
    Mentioned
    179 Post(s)
    Quoted
    1860 Post(s)

    Default

    congrats on release

    also if you use runelite, you can do something super simple to determine if it's woodcutting or not ha~

    function ischopping: boolean;
    begin
    result:= getcolor(point(87,38))=65280;
    end;

    the point being wherever that box showing if you're woodcutting is located. I can't remember if i had to adjust some inherent SRL functions to work with runelite, but the combo of color + runelite plugins makes many tasks that can be more challenging with color super easy.

  8. #8
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    193
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    congrats on release

    also if you use runelite, you can do something super simple to determine if it's woodcutting or not ha~

    function ischopping: boolean;
    begin
    result:= getcolor(point(87,38))=65280;
    end;

    the point being wherever that box showing if you're woodcutting is located. I can't remember if i had to adjust some inherent SRL functions to work with runelite, but the combo of color + runelite plugins makes many tasks that can be more challenging with color super easy.
    Thanks.
    All credits to Slacky for the Tree finding magic. https://villavu.com/forum/showthread.php?t=117808
    Works on every tree in the game so far. The only one it probably won't work on is redwood.

    I just got Woodcutting guild working. I have a lot to do before i officially release this and plan
    to support it for all the nubs out there. I haven't tested it on Runelite yet.
    I plan to support Runelite. I use that personally. Right now I'm testing on SMART.

    Yeah that would be a good way to check if its woodcutting but it would be different for every user because
    you can hold down the alt key and drag that box around lol. I guess most would have it at default position.

    EDIT: The thing I'm most sketched about right now is getting bird nests working.

    The End Awaits. . .

  9. #9
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    193
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    9/20/2019 Major Update:

    Code:
    - Birdnests Confirmed Working (picks up)
    - Fletching Confirmed Working (Longbows only)
    - Dropping Confirmed Working
    - Many locations support added see below
    - On screen Progress GUI updated
    - Normal trees cut pretty instantly and 
    when goes too far away repositions back
    - Loses focus after clicking tree automatically
    - Fixed some banks / Maples work now
    Confirmed Working Locations: 9/20/2019:
    Code:
    F2P Locations:
    - Draynor
    - Falador
    - Varrock East
    - Varrock West
    - Port Sarim
    - Corsair Cove
    - GE/Edgeville : Use at own risk. Not completely done yet
    
    Members Locations:
    - Seers Village
    - Catherby
    - Woodcutting Guild East & West
    Features that still need to be added:
    Code:
    - Firemaking support
    - Myths Guild support
    - Lumby Bank support
    - Better GE support
    - Edgeville DOOR detector
    - Corsair Ship travel
    - Tree Gnome Stronghold support
    - Mahogany and Teak locations
    - Redwoods
    - Cleanup code / optimization
    - Double check code logic / waits
    Port Sarim: Lone Yew Tree -

    The End Awaits. . .

  10. #10
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,008
    Mentioned
    50 Post(s)
    Quoted
    503 Post(s)

    Default

    Quote Originally Posted by LordJashin View Post
    Somebody needs to make a function that converts main screen point
    to RSWalker map point. (Accurately) So i can use RSW.GetMSTile to detect
    if a tree is gone or not without having to manually add points where the tree actually is
    into my data pile.
    Isn't that just PointToMM()?

  11. #11
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    193
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    Isn't that just PointToMM()?
    Maybe. Didn't know about that function. I will experiment more for sure to perfect this. But for now I need to work on cleanup code and take a short break. Cheers everyone. Enjoy the woodcutter as it is today!

    The End Awaits. . .

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •