Results 1 to 5 of 5

Thread: Awkward Maple Chopper!

  1. #1
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default Awkward Maple Chopper!

    Hi guys, it's sure been a while!

    I've recently gotten back into scripting, mostly to help the monotony of starting a new ironman account, and so here's my maple woodcutter that I use to gather logs for fletching. It should be very simple to add more trees and locations to the script, which I will do eventually but for right now just chopping maple logs and banking them at seers is doing just fine (330 logs, or 33k woodcutting xp/ hour)

    I'd like to thank Flight for writing a tutorial on basic lape scripting, that's what got me back on my feet after being out of the game for so many years. I've incorporated some of those lines of code into this because well, it just works :)

    So anyways, to start the script have your character in either seers bank or to the maple trees just to the north with your axe equipped. In the settings you can decide how long you want the script, or how many logs to chop. The script will end when either one of those conditions are met. You will have to have Flight's SRL-F include installed

    In the future I'll add more trees and locations, and maybe even an option to hop worlds when a spot is already taken by someone else.

    most recent progress report:
    script ran out of time! terminating
    Time ran:[03:01:16:703]
    logs cut:1008
    logs/h: 334
    exp gained(/h): 100800(33363)
    Attached Files Attached Files
    Last edited by Awkwardsaw; 07-09-2022 at 02:33 AM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  2. #2
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Hi. This is probably not what you are looking for, but I am gonna be a bitch and point it out anyway:
    Looking at the script I spotted a few things that can be improved when it comes to utilizing lape and the way we designed SRL.

    Your whole function `function TScript.CountInvLog() : Integer;`
    can be replaced with a single call like so: `Inventory.CountItem('Maple logs');`

    Since this is used in `function TScript.invfull() : boolean;` you can really just call `Inventory.IsFull()` instead

    and your `depositall` function, it can be replaced by a call to `Bank.DepositAll();`

    I'd also prefer see all functions related to the script linked to the script-datatype `TScript`. Like `ADebug`, `progreport`, `endingprogreport` etc... and use self, rather than the global variable `bot`.

    And just to be clean, proper PascalCase for function names


    Anyhow, welcome back
    Last edited by slacky; 07-11-2022 at 11:53 PM.
    !No priv. messages please

  3. #3
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    Hi. This is probably not what you are looking for, but I am gonna be a bitch and point it out anyway:
    Looking at the script I spotted a few things that can be improved when it comes to utilizing lape and the way we designed SRL.

    Your whole function `function TScript.CountInvLog() : Integer;`
    can be replaced with a single call like so: `Inventory.CountItem('Maple logs');`

    Since this is used in `function TScript.invfull() : boolean;` you can really just call `Inventory.IsFull()` instead

    and your `depositall` function, it can be replaced by a call to `Bank.DepositAll();`

    I'd also prefer see all functions related to the script linked to the script-datatype `TScript`. Like `ADebug`, `progreport`, `endingprogreport` etc... and use self, rather than the global variable `bot`.

    And just to be clean, proper PascalCase for function names


    Anyhow, welcome back
    Thank you for your input

    However I have to say, the reason I made those functions separately was because I wasn't having any luck with the SRL versions, especially the item finder. I kind of felt like it was one of those things that the devs must have already known about due it just not finding anything, not to mention the "no left anchor" error when doing anything with the inventory functions
    Last edited by Awkwardsaw; 07-12-2022 at 10:02 PM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  4. #4
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    Thank you for your input

    However I have to say, the reason I made those functions separately was because I wasn't having any luck with the SRL versions, especially the item finder. I kind of felt like it was one of those things that the devs must have already known about due it just not finding anything, not to mention the "no left anchor" error when doing anything with the inventory functions
    Peculiar. I don't have this issue, and there is a decently sized very active third party "community" outside SRL that uses official SRL + extension and the users have not complained about such issues, so I have no clue how this occurs for you. They, and I do not use SRL-F, so idk about that, but I'd simply assume it's not broken either as it builds on SRL.

    Edit: I just tested all three modes, fixed, and both resizable with latest SRL, and it's fine. I assume you are using official client.
    Last edited by slacky; 07-13-2022 at 07:17 AM.
    !No priv. messages please

  5. #5
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    Peculiar. I don't have this issue, and there is a decently sized very active third party "community" outside SRL that uses official SRL + extension and the users have not complained about such issues, so I have no clue how this occurs for you. They, and I do not use SRL-F, so idk about that, but I'd simply assume it's not broken either as it builds on SRL.

    Edit: I just tested all three modes, fixed, and both resizable with latest SRL, and it's fine. I assume you are using official client.
    yeah, I don't really get it either, maybe I messed with something without realizing it lol. It's not too much of a problem however, it's not difficult to make a dtm
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

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
  •