SRL Archive - OSR Woodcutting

Awkward Maple Chopper!


Awkwardsaw

2022-07-08 22:03:27

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)

slacky

2022-07-11 19:43:21

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 :)

Awkwardsaw

2022-07-12 17:57:46

From: slacky
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

slacky

2022-07-13 03:12:03

From: Awkwardsaw
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.

Awkwardsaw

2022-07-13 18:43:50

From: slacky
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