SRL Archive - First Scripts

Lumber Jack v1.0


NosePicker

2008-03-18 18:21:45

This script will chop any type of tree based on the woodcutting skill level of the player. Once the inventory is full, it will drop all the items specified from your inventory. I have a "To Do" list in the source so any feedback on how to accomplish some of those tasks would be great.

There are two source files:
LumberJack 1.0.scar (my main script)
NewSRLCode.scar (new methods that would belong in the SRL library)

As this is my first script ever, I know there will be many things that could
be done better and even more things that just need to be done but you have to start somewhere. Also it should be noted that I have not played the actual game myself very much either. My son plays all the time and it is because of him that I decided to write some scripts. For me it is more fun writing scripts to play for me than it is playing the game itsself.

Since I realize there will be other noobs like myself reading this post
I sort of feel the need to explain what to expect from scripts like this
that you download and why they may not always work out-of-the-box for you. I tried to make the code readable with lots of comments for the noobs.

When I began writing this script and testing, things happened in the
game that I didn't expect to happen, or at least I didn't take the time to think
about how to handle that situation. As I encountered these situation I would
modify my script to handle that situation. So if you download a script and it
does not work perfectly for you then please realize that your game character
may be in a situation that the author had not encountered or thought about.
With that in mind please use this script freely and give me feedback both good and bad as you see fit.

skilld u

2008-03-18 18:26:52

its very simple.

if you made the findanytree procedure why not just put it in your scrip?
ps: hy check your pm's :p

Harry

2008-03-18 18:29:34

ps: hy check your pm's :p

Quite random to mention me in a thread not by me… thanks anyways :p

skilld u

2008-03-18 18:30:19

i knew that you were looking at iSpy so i just posted it here so that you could see.

penguII

2008-03-18 18:31:00

hi, iam getting this error, when compiling the script: Failed when compiling
Line 57: [Error] (8924:24): Type mismatch in script C:\Program Files\SCAR 3.14\includes\SRL/SRL/Core/AntiRandoms/EvilBob.scar

edit: thanks skilld u. Well its working. It first chopped down 6 trees, than, after there were no more trees, it waited, moved the camera, when the trees "respawned" it right clicked am and choose "examine". and didnt stop examing everything.

NosePicker

2008-03-18 18:35:31

make sure you have the LumberJack tab selected before you compile. Other than that I can't find anything that would make it not compile. Just note the version I am running which I documented in the code.

NosePicker

2008-03-18 18:38:58

skilld u,
well honestly because I am thinking more long range. On one hand I realize I am a noob at this and for that maybe I should have. But on the other hand I have been coding in this langage for over 15 years so I am hoping as I get more experience with the game and the SRL library that I may be able to contribute to the SRL library so other noobs don't have to write the same stuff that I am learning.

skilld u

2008-03-18 18:39:04

thats an error with SRL, not his script. make sure that you have newest SRL and SCAR

edit: don't double post.

P1nky

2008-03-18 19:43:43

this name is already taken from JAD script :)

Runite

2008-03-19 04:45:13

Simple, but OK for a first script.

Richard

2008-03-19 04:54:57

From: Runite
Simple, but OK for a first script.


Your saying that for loads of threads on here… what scripts have you actually made?