SRL Archive - RS3 Outdated / Broken Scripts

~Destiful Woodcutter~


Dynamite

2009-05-25 16:00:11

(My First Script)
Script Status: Online!
Last Updated: 6/07/09
Currently Updating: Nothing, post feedback
Description: Chops and banks willows at Draynor
Please Rep++ and/or Rate if you use this script. And Post Proggies!


History of the script

25/5/09
First Release
V0.2 Fixed some problems (cant remember what :p) (2 views)
v0.3 Fixed the proggy, DTM was bad. (7 views)
v0.5 Fixed everything :D (6 views)
26/5/09
v0.6 Better proggy, and some other stuff fixed ;) (22 views)
V1.0 Full release out!!!! Even better proggy, Autocolor on the rock, Better antiban, Right and Left clicking the tree. (19.5 KB, 30 views)
V1.1 Hopefully fixed the runtime error :D (19.6 KB, 4 views)
V1.2 Fixed Proggy AGAIN...


Credits:
Heavenzeyez1
Quickmarch
99_
Frt
Shuttleu
Da 0wner
TorrentOfFlame <3
JakeyBoy29
Penguin

Requirements:
SCAR 3.20/3.20d
SRL Rev: 32

Instructions:

1. Have your Char in Draynor Bank or at the willows.
2. Press Play then fill out the form and press start.



Want to help me?
    Post proggies :D
      Post Feedback
        Use SRL-Stats when its up
          Rep+ maybe?
            Click this egg thing :D no idea what it is but other people have them so…

Dynamite

2009-05-25 16:01:11

~Proggies!~
Cazabacca
Ran For: 9 Hours, 15 Minutes and 23 Seconds!
Chopped down: 2856 logs
Successfully executed

Cazabacca

Ran For: 3 Hours, 55 Minutes and 44 Seconds!
Chopped down: 20776 logs (I'm a very fast cutter as you can see.)
Successfully executed

Da 0wner

2009-05-25 16:28:39

Looks good.
Except
  FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3233608, MSX1, MSY1, MSX2, MSY2, 2);
if Length(TPA) = 0 then Exit;
ColorToleranceSpeed(1);

Change that to

  FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3233608, MSX1, MSY1, MSX2, MSY2, 2);
ColorToleranceSpeed(1);
if Length(TPA) = 0 then
exit;
If the length of the TPA is 0 it will exit and the CTS will not be set back. And anyway, you should set it to curCTS.

Rct33

2009-05-25 16:31:47

Line 309: [Error] (19384:1): Unknown identifier 'CTS' in script

I don't understand why? You declared it correctly I think.

Da 0wner

2009-05-25 16:34:42

Indeed he did, however that procedure looks kinda funky lol. There are two begin and ends and they aren't nested either.

Delete that second set of code and it will run fine :).

Dynamite

2009-05-25 16:42:38

OK guys redownload 0.2 ;)

T~M

Rct33

2009-05-25 16:48:41

Nice script!
The walking and banking works well from what I can see.
The only things I would say to improve for now is sometimes the tree gets chopped down by other people before it finds a tree. Maybe try and increase the speed? Forogt to mention this is only sometimes, ususally it finds it pretty quickly.

Anyway, good start.

Torrent of Flame

2009-05-25 16:48:54

No mention for me? ;)

It looks nice dude. (:

Dynamite

2009-05-25 17:13:59

From: Rct33
Nice script!
The walking and banking works well from what I can see.
The only things I would say to improve for now is sometimes the tree gets chopped down by other people before it finds a tree. Maybe try and increase the speed? Forogt to mention this is only sometimes, ususally it finds it pretty quickly.

Anyway, good start.


Yeh what happens here is that the antiban over rides it. I may change next verison. Apart from that from my testing it has super fast tree changing.

From: Torrent of Flame
No mention for me? ;)

It looks nice dude. (:


Oh yeh sorry ToF <3

V0.3 out
Edited the proggy ;)

T~M

Da 0wner

2009-05-25 17:16:37

procedure AntiRandom;
begin
FindNormalRandoms;
end;

1.
Procedure CountTheLogs;
var
WillowsDTM, LogsInTheInv: Integer;
begin
if not LoggedIn then Exit;
GameTab(4);
WillowsDTM := DTMFromString('78DA637461626078C680027C5D6518F881342' +
'310FF07024613A09A270C6880118904D23640351F09A80900AA79' +
'45408D1750CD4DFC6A001E780A9E');
LogsInTheInv := ItemAmount('inv', 'dtm', WillowsDTM, []);
InventoryWillows := InventoryWillows+LogsInTheInv;
FreeDTM(WillowsDTM);
writeln(inventorywillows);
end;

huh?

Dynamite

2009-05-25 17:18:52

LOL, that was a copy from pastebin with the numbers :p

T~M

slakan

2009-05-25 18:54:46

so you fixed the " When im full i dont go to bank bug " xD

jakeyboy29

2009-05-25 18:58:15

z0mg, me?

Dynamite

2009-05-25 19:00:47

0mg sorry Jake ;)
Any proggies or feedback anyone?

T~M

William

2009-05-25 19:55:48

Ill test this out.

EDIT: I ran this for like 30 secs, it went to willows it clicked chop willow.. and got this:

- [Runtime Error] : Out Of Range in line 120 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Amount.scar

Dynamite

2009-05-25 20:38:35

Try to restart scar and run again.
Post a proggy ;)

T~M

Cazabacca

2009-05-25 21:01:09

Ummm..

Line 187: [Error] (20388:1): 'BEGIN' expected in script C:\Program Files\SCAR 3.20\Scripts\DestifulWoodcutterv0.3.scar

Dynamite

2009-05-25 21:44:31

Really?
Mine compiles fine…
I will reupload just for you ;)
As long as you get me a proggy and some feedback ;)

T~M

jakeyboy29

2009-05-25 21:55:29

From: Cazabacca
Ummm..

Line 187: [Error] (20388:1): 'BEGIN' expected in script C:\Program Files\SCAR 3.20\Scripts\DestifulWoodcutterv0.3.scar


scar version?

Rct33

2009-05-25 21:57:16

[Runtime Error] : Out Of Range in line 120 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Amount.scar

Never come across this error, i've tried restarting scar with no luck.

Dynamite

2009-05-25 22:00:49

From: Rct33
[Runtime Error] : Out Of Range in line 120 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Amount.scar

Never come across this error, i've tried restarting scar with no luck.


Download V0.3 again ;)

T~M

Rct33

2009-05-25 22:10:50

Still the same error? I been wanting to get a proggie for you.

Cazabacca

2009-05-25 22:11:35

From: jakeyboy29
scar version?


It didn't matter, I tried both 3.20d and 3.15b. With both dev #32 and srl opendev.

Does work now after you - da man - reuploaded JUST FOR ME. ;) Proggys incoming.

EDIT. I swear to god these F2P draynor willowcutters breed like rabbits. You wait 2 minutes and 5 has become 40.

Dynamite

2009-05-25 22:15:36

From: Rct33
Still the same error? I been wanting to get a proggie for you.


Are you using OpenDev?
If not, do so.

T~M

Mystic

2009-05-25 22:19:14

Ohh. Yay!!! This is one awesome Wcer.
And I see you liked my posts ;)
And, aww why is me not up there(Helped you with your chopping loop) :(
Anyways, Good job!

Dynamite

2009-05-25 22:20:17

Can you test it for me Kev and tell me if you get the same errors as above?

T~M

William

2009-05-25 23:32:28

From: The Man
Are you using OpenDev?
If not, do so.

T~M


how do i use open dev?

EDIT: i redownloaded, same error..

Dynamite

2009-05-25 23:57:10

V 0.5 is out!
I hopefully fixed all those errors and the proggy counting should be nearly perfect :p

T~M

Cazabacca

2009-05-26 00:40:32

Well my proggy will be coming with v0.3 :( It has been running a few hours now, let's see how long this buddy will keep on going ;)

EDIT. There are 2 normal trees in the west side of the bank. I checked to see the script and found out the mouse was just cycling between the two trees. It had been doing that max 15 minutes, but it looked quite endless unless I hadn't stopped it and guided to the willows. Now it's working good again. But again, I'm using v0.3 so I don't know if this bug is already fixed in 0.5.

All in all it has ran good regardless of this bug. Will be adding the proggy when I stop it. Maybe few more hours.

Dynamite

2009-05-26 01:15:58

Wow! sounds good :D
Keep it on for as long as possible :D

T~M

Cazabacca

2009-05-26 02:57:08

Destiful Woodcutter (v0.3 used)
Ran For: 3 Hours, 55 Minutes and 44 Seconds!
Chopped down: 20776 logs (I'm a very fast cutter as you can see.)
Successfully executed

Will be posting a better proggy tomorrow with proper version.

Well that was hard wasn't it? :D

Dynamite

2009-05-26 03:02:57

nice! yh 0.5 has fixed proggy.
also use devSvn it more stable and updated if you not already

cheers
T~M

Cazabacca

2009-05-26 03:07:32

From: The Man
also use devSvn it more stable and updated if you not already


Always ;)

Dynamite

2009-05-26 03:15:57

ok good. get the longest proggy ever! :p

T~M

Cazabacca

2009-05-26 11:44:15

Probably would be the best if you included some kind of a LoggedIn check and try to log in if the answer is false. Since I found the script just hanging in the login screen and it was still running. The problem was continuing the script after a random (abyssal).

Ran For: 9 Hours, 15 Minutes and 23 Seconds!
Chopped down: 2856 logs
Successfully executed

So it has spent time in the login screen for about 4 hours and cutted about 5. Which isn't bad, but just to get a "real" proggytiming try make it login or terminate the script if the scripts finds you logged out. :) (and I know I'm still learning to script so I can't provide any kind of help, which I doubt you even need)

Nice job.

Dynamite

2009-05-26 17:49:18

From: Cazabacca
Probably would be the best if you included some kind of a LoggedIn check and try to log in if the answer is false. Since I found the script just hanging in the login screen and it was still running. The problem was continuing the script after a random (abyssal).

Ran For: 9 Hours, 15 Minutes and 23 Seconds!
Chopped down: 2856 logs
Successfully executed

So it has spent time in the login screen for about 4 hours and cutted about 5. Which isn't bad, but just to get a "real" proggytiming try make it login or terminate the script if the scripts finds you logged out. :) (and I know I'm still learning to script so I can't provide any kind of help, which I doubt you even need)

Nice job.


OK I will hopefully update that today ;)

T~M

Dynamite

2009-05-26 22:00:39

Update!
V 0.6 is out now.

Updated:
If you are logged out it will stop the script
Improved proggy :D

T~M

William

2009-05-27 02:50:13

- i been running this for like 30 min, what i saw that was bad(not sure if it can b fixed) was that it spams click the willow tree… it will click same tree like 3-8 times..

Dynamite

2009-05-27 03:02:12

yeh i noticed that too,
I will release a full version(v1) later this week hopefully, with left clicking, non spam clicking and faster tree finding, i will also try and get the responder working, has anyone tested and seen it worling?

T~M

[Ethan]

2009-05-27 03:45:56

Thank you TheMan! :D i just made my first script, with help from a friend who you might know, Akwardsaw, and my first script is a fletcher. :) ill be using this to get my test logs! :D Ill post a proggy when im done running, itll be an edit :)

Dynamite

2009-05-27 03:47:51

OK good to know [Ethan], just ask if ya need any testers, I have got over 120k willows just from this script :)

T~M

[Ethan]

2009-05-27 03:57:44

do you want to see the script now? :D im still sorting out some bugs and making a progress report before i submit as my first script, but id be happy to let you see it and gimme some constructive criticism. :)

Dynamite

2009-05-27 03:59:04

Yeh sure, i'd love to ;)
BTW love your siggy :D
You make it?

T~M

[Ethan]

2009-05-27 04:11:21

Yea :) glad you like my sig. ill pm you my pastebin for the script :)

Dynamite

2009-05-27 04:52:30

By the way guys, in the 'Full Release' I have taken out the form.
Is that ok?
or would you rather me keep it in?

T~M

[Ethan]

2009-05-27 04:53:46

from what ive seen, just filling out const is easier :P also, do you have any non-SMART versions? i have a slower-than-usual connection :l

Dynamite

2009-05-27 04:55:59

You can easily take it out, just take out the bits to do with smart. Then select the client (crosshair) the play.
Also the 'Full Release' has uber sexy proggy :D

T~M

[Ethan]

2009-05-27 05:04:33

TheMan! i have an issue with your script.
writeln(inventorywillows); returns
Failed when compiling
Line 200: [Error] (19274:26): Type mismatch in script DestifulWoodcutterv0.6.scar. :confused:

Blumblebee

2009-05-27 05:05:16

change the line to Writeln('inventorywillows');

Dynamite

2009-05-27 05:08:32

That is just supposed to return how many logs it has chopped, just delete that line.
Next version has it ;)

T~M

[Ethan]

2009-05-27 05:37:49

ag TM! help me :P more errors lol
Could not find Water Color!
Could not find Rock Color!
then it kept cutting one tree, then clicking another, and eventually ran back and forth without cutting anything :l

Dynamite

2009-05-27 05:39:25

Close scar and SMART then restart script.
Also dont minimize SMART while running the script. Cause the script could lose focus ;)

T~M

noidea

2009-05-27 05:45:41

From: The Man
Close scar and SMART then restart script.
Also dont minimize SMART while running the script. Cause the script could lose focus ;)

T~M


I get the rockColor error ALL THE TIME at draynor. Just get the color atthe beggining of teh script, and use that var for all of the RockColor needs.

Dynamite

2009-05-27 05:48:24

From: noidea
I get the rockColor error ALL THE TIME at draynor. Just get the color atthe beggining of teh script, and use that var for all of the RockColor needs.


What you mean like the users get it manually everytime?
I do have a constant for that ;)
What could I use to get the color of it automatically?

T~M

Da 0wner

2009-05-27 06:23:07

Autocolor of course.

Dynamite

2009-05-28 03:49:19

OK guys I am hopefully going to finish updating this tomorrow :D
Please post your current proggies though, and feedback.

T~M

[Ethan]

2009-05-28 06:00:20

Hey TM. you ever check out my willow (u) fletcher? i never heard back from you. //sorry for offtopic.
on topic, i cant seem to get your cutter going. :L he just stands at the trees.

Dynamite

2009-05-28 06:02:12

update SVN it to do with the new update ;)

T~M

[Ethan]

2009-05-28 06:46:25

k. ill have to tomorrow. :l going to bed atm look forward to willows though :)

Rct33

2009-05-28 19:49:51

Ill try to get a proggie soon, currently playing legit for a while.

Dynamite

2009-05-28 19:52:17

OK, I am working on the Full Release ;)

T~M

Rich

2009-05-28 19:56:58

Glad to see I have credits…

Dynamite

2009-05-28 20:31:57

lol, well obviously R1ch, Best mate on here probs ;)

T~M

Rich

2009-05-28 23:22:05

:) Sorry I said it in such a sour way. I was in quite a bad mood, but reading that post really cheered me up. <3 U!

Richard

Dynamite

2009-05-28 23:27:37

dont worry :) <3 u 2.
wanna go on msn?

T~M

Dynamite

2009-05-30 22:26:51

V1.0 Full release out now!!!!
Test please :D and post the proggy and feedback.


T~M

Naike

2009-05-30 23:24:12

Took a look at this, as you wished.

Found some stuff you should really work on
  • Standards
  • A bit logic, but that comes the more you script
  • Use Wait. Otherwise Rs won't follow along ;)
  • Learn where For to do loops are usefull

Other then that and what I've been writing in this script it's good :)


{==============================================================================]
[ [SRL]4 ]
[ ]
[ ]
[ NAME : Destiful Woodcutter ]
[ WRITER : The Man ]
[ CATEGORY : Woodcutting ]
[ DESCRIPTION : ]
[ ]
[==============================================================================]
[ Instructions: Be at Draynor bank. Fill out form, then run. ]
[==============================================================================}

{=========================Records & Vars DONT TOUCH!===========================}
program DestifulCutter;
{$DEFINE SMART} //Comment out to remove SMART

{$IFDEF SMART}
{.include srl/srl/misc/smart.scar}
{$ENDIF}

{.include SRL/SRL.scar}
{.include srl/srl/misc/debug.scar}
{.include SRL/SRL/Misc/Users.scar}


{
Try to avoid global vars.
DTMs can easily be stored inside procedure vars.

Instead of having xp, xp2, xp3, xp4 have an array.
XP: Array [0..3] of Integer;

Tip: For a easier way to store vars for each player
use a "Type"

Example,
Type
TPlayer = Record
XPGain, LvlGain: Integer;
end;

Just don't forget to declare its length in your
Global vars/DeclarePlayers procedure.

Var
ProgressPlayer: Array of TProgress;

And in DeclarePlayers you do,
SetArrayLength(ProgressPlayer, HowManyPlayers);
Simple.

To use this later on you simply do

ProgressPlayer[CurrentPlayer].XPGain := Logs*50; ect..

Moving on...
}

var
x, y, RockDTM, DBDTM, LevelUps, InventoryWillows, xp, xp2, xp3, xp4, Lot2, Loads: integer;


// Don't use to much spaces..



procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //Username.
Players[0].Pass := ''; //Password.
Players[0].Nick := ''; //3-4 Letters From Your Username.
Players[0].Strings[0] := ''; //Bank Pin.
Players[0].Integers[0] := 100; //Loads To Do Each Player.
Players[0].Active := True;
{
Two lines that you can add... Not much, but makes it look better.
Writeln(IntToStr(HowManyPlayers) + ' Players');
SetPlayerNameTPAs; <- Sets the players Nicks. So if they forget to
set it they will have an error at start, and not at
FindNormalRandoms.
}
end;

{
Smart idea, But not very good if theres only one line.
If it was .Loc := S; and something else under it, then it would be a
space saver, not it's just a shorten version which afterall proofs that
you're lazy ^^ (Still up to you if you want to keep it, Won't hurt anything).
}
procedure SetLoc(s: String);
begin
Players[CurrentPlayer].Loc := s;
end;

{
Same as above.
}
function PlayerLoc: String;
begin
Result := Players[CurrentPlayer].Loc;
end;

function AutoColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 5789018, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 0.00) and (H <= 93.77) and (S >= 0.72) and (S <= 10.16) and (L >= 26.45) and (L <= 41.39) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 5.35) and (X <= 14.18) and (Y >= 5.60) and (Y <= 13.46) and (Z >= 5.37) and (Z <= 17.49) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

function CountNPCs(var NPA: T2DPointArray): Integer;
var
NPC: array of TPoint;
begin
FindColorsSpiralTolerance(MMCX, MMY2, NPC, 62965, MMX1, MMY1, MMX2, MMY2, 5);
NPA := TPAtoATPA(NPC, 2);
Result := Length(NPA);
end;


function LevelUp : Boolean; //Thanks Wizzup?
var
Lev : Integer;
begin
Result := FindNPCChatText('gratu', Nothing) or
FindNPCChatText('atio', Nothing);
if Result then
begin
while ClickContinue(True, True) do
Wait(500 + Random(250)); // 2 Spaces after a While / do loop, otherwise it looks weird..
WriteLn(Players[CurrentPlayer].Name + ' leveled up');
Lev := GetSkillInfo('woodcutting', False);
WriteLn(Players[CurrentPlayer].Name + '''s woodcutting level is now ' + IntToStr(Lev));
LevelUps:= LevelUps + 1;
end;
end;

{
In this procedure, if everything screws up, you loop something MAX 6 times.
If you know how many times your going to be looping at max then you're better
off with a For T:=0 to 5 loop and a break statement.

Other thing I found is that you don't free your DTM correctly.
You break out before it if it's found, and if it's not you free it and look
after a empty Integer.

My version of this function:

procedure GRockDTM;
var
MaxTol, T, C: Integer;

begin
MaxTol := 55;
C := AutoColor;
RockDTM := DTMFromString('78DA636467606060614001DE41DE609A11CA6' +
'7E40212ACA86A748D7550D5F00009765435663616986A38099803' +
'92E726A086950873406AD8F0AB0100821404CC');
For T:= 0 to 4 do
begin
if DTMRotated(RockDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln('Found');
Break;
end;
end;
FreeDTM(RockDTM);
end;


}
procedure GRockDTM;
var
MaxTol, T, C: Integer;

begin
MaxTol := 55;
C := AutoColor;
RockDTM := DTMFromString('78DA636467606060614001DE41DE609A11CA6' + // Don't forget 2 spaces.
'7E40212ACA86A748D7550D5F00009765435663616986A38099803' +
'92E726A086950873406AD8F0AB0100821404CC');
repeat
IncEx(T, 10);
Writeln(IntToStr(T));
if DTMRotated(RockDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln('Found');
Break;
end;
FreeDTM(RockDTM);
until(T >= MaxTol);
end;

//Major Standard wrongs, so I fix it up before looking.
{
Not much to mention, Your logic is special, but it's sure logical ;P
Shorten the function tho, look at the old one and this..
See and learn the diffrence.
}
function DepositWillows: Boolean;
var
AxeDTM, x, y, i: Integer;
T: TBox;
begin
AxeDTM := DTMFromString('78DA63AC616160F8C480023AD38518FE03694' +
'620FE0F048C9D40356F19D000231209A46B816A5E1050530A54F3' +
'9F809A2AA09ADF04D43402D5BCC4AF06008D550EC3');

if InvCount > 0 then OpenBank('db', True, True)else Exit;
if PinScreen then InPin(Players[CurrentPlayer].Strings[0]);
if BankScreen then
for i := 1 to 28 do
begin
T := InvBox(i);
if not FindDTM(AxeDTM, x, y, T.x1, T.y1, T.x2, T.y2) and ExistsItem(i) then
begin
MouseItem(i, False);
Wait(RandomRange(500, 1000));
case Random(5) of
0..3: ChooseOption('eposit-All');
4:
begin
ChooseOption('eposit-X');
Wait(RandomRange(500, 1000));
TypeSend(IntToStr(RandomRange(30, 100)));
end;
end;
Wait(2000+random(2000));
Result := not(InvFull);
if Result then
SetLoc('WalkToWillows');
end;
end;

Result := True;
SetLoc('WalkToWillows');
CloseBank;
FreeDTM(AxeDTM);
end;


{
A bit standards off, same as before.
Fixed it up, read and learn the diffrence.
}
function WalkWillowRadial(XOffSet, YOffSet: Integer): TPoint;
var
TPA: TPointArray;
i, CTS: Integer;
ATPA: T2DPointArray;
TB: TBox;

begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
RadialWalkEx(TPA, MMCX, MMCY + 20, 1455939, 50, 200, 250, 50);
if Length(TPA) = 0 then
Exit;
ATPA := SplitTPAEx(TPA, 20, 20);
SortATPAFrom(ATPA, Point(MMCX, MMCY));
TB := GetATPABounds(ATPA);
for i := 0 to High(TPA) do
if (PointInBox(TPA[i], TB)) then
begin
Result.x := ((TB.x1 + TB.x2) / 2) - XOffSet;
Result.y := ((TB.y1 + TB.y2) / 2) - YOffSet;
Break;
end;
ColorToleranceSpeed(CTS);
end;

{
You're setting Compass north twice?
No need, As it got a failsafe if it's already 10% north.
So it WON'T help getting it better ;)

The way you use SetRun is good, but theres another function
in SRL that does the same thing,

{*******************************************************************************
function RunEnergy(Min: Integer): Boolean;
By: lordsaturn
Description: Toggles run if energy is greater or equal to MinEnergy. Results
true if energy is greater or equal to minimum.
*******************************************************************************}
procedure SetupScript;
var
s: String;
// No need for space here..
begin
MakeCompass('n');
SetAngle(True);
SetRun(GetMMLevels('run', s) > 0);
DepositWillows;
MakeCompass('n');
SetLoc('WalkToWillows');
end;

{
Same thing as i mention before, If you only use one function in one
procedure then it's a waste of space. If it doens't result anything and so on
which this doesn't.
}
procedure AntiRandom;
begin
FindNormalRandoms;
end;

{
Remember to ALWAYS follow standards.
Fixed it up for you.

You also want a Wait between GameTab(4) and the DTM Search,
If it lags, you're screwed.
}
Procedure CountTheLogs;
var
WillowsDTM, LogsInTheInv: Integer;
begin
if not LoggedIn then Exit;
GameTab(4);
// Wait(235+Random(200));
WillowsDTM := DTMFromString('78DA6314626060E0634001BEAE320C3A8C0C0' +
'C40C4F01F081885810C090634C0884402696E20214D400D0B9010' +
'27420D2F1176B1115003F2172B0135203F31135003F213070135B' +
'240420CBF1A003539062B');
LogsInTheInv := ItemAmount('inv', 'dtm', WillowsDTM, []);
InventoryWillows := InventoryWillows+LogsInTheInv;
FreeDTM(WillowsDTM);
end;

{
Read a Tutorial about Advnaced proggies, think i made one..
So you get a Proggie for each player and so on..
}
procedure Proggy;
begin
writeln('~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#');
writeln('#Destiful Woodcutter by The Man ');
writeln('~Ran For: '+TimeRunning+'! ');
Writeln('#Chopped down: '+IntToStr(InventoryWillows)+' logs ');
WriteLn('~WoodCutting Exp Gained: '+ IntToStr(xp3) +'. ');
WriteLn('#Exp Until Next Lvl: '+ IntToStr(xp4) +'. ');
WriteLn('~ Loads Done: '+ IntToStr(Loads) +'. ');
Writeln('#Thank you for using Destiful Woodcutter ');
Writeln('~Please post this at [url]http://www.villavu.com/forum/showthread.php?t=45713');[/url]
Writeln('#~Also please post feedback :) ');
Writeln('#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~');
end;

{
This is acceptable as it results true or false.
Not like the other 2.
}
function PointSet(P: TPoint): Boolean;
begin
if (P.x <> 0) or (P.y <> 0) then Result := True;
end;

{
Not recommended doing Proggy in ScriptTerminate..
Can't remember why tho, if it works then stick with it.
}
procedure ScriptTerminate;
begin
Proggy;
end;

{
Logical, No need for me to look to much in this one.
Fixed a bit standards tho.
}
function ToWillows: boolean;
var
u,x,y,m: Integer;
P: TPoint;
// No need for space here...
begin
if (not(loggedin)) then exit;
U := findwatercolor;
P := WalkWillowRadial(3, 3);
if (PointSet(P)) then
begin
Result := True;
Mouse(P.x, P.y, 3, 3, True);
AntiRandom;
Flag;
SetLoc('Chopping');
Exit;
end;
if (DTMRotated(RockDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then // Found DDTM
begin
Result := True;
Mouse(x, y, 5, 5, True);
AntiRandom;
Flag;
SetLoc('Chopping');
Wait(RandomRange(100, 500));
Exit;
end;
if RadialWalk(AutoColor, 160, 200, 60, -10, -10) then Result := True else
Result := RadialWalk(FindWaterColor, 260, 280, 40, 70, 5);

if Result then
begin
SetLoc('Chopping');
AntiRandom;
Exit;
end;

if Findsymbol(x,y,'fish') then
begin
M := GetColor(x - 20, y);
if M = U Then
begin
Mouse(x,y,5,5, true);
wait(250+random(250));
FFlag(10);
If Distance(mmcx,mmcy,x,y) < 7 then
begin
result := true;
SetLoc('Chopping');
AntiRandom;
Exit;
end;
end;
end;
end;

{
Looks good, remember to space after a If statement or do
a 2 space after/Statement, Look down.
}
function Reposition: Boolean;
var
i, CTS: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
TB: TBox;
P: TPoint;
// NO NEED FOR SPACE HERE!
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 1455939, MMX1, MMY1, MMX2, MMY2, 50);
if Length(TPA) = 0 then Exit;

{

If Length(TPA) = 0 then
Exit;

}
FilterPointsPie(TPA, 0.0, 360.0, 0, 30, MMCX, MMCY);
ATPA := SplitTPAEx(TPA, 20, 20);
SortATPAFrom(ATPA, Point(MMCX,MMCY));
TB := GetATPABounds(ATPA);
for i := 0 to High(TPA) do
if (PointInBox(TPA[i], TB)) then
begin
P.x := ((TB.x1 + TB.x2) / 2) - 2;
P.y := ((TB.y1 + TB.y2) / 2) - 2;
Mouse(P.x, P.y, 3, 3, True);
Flag;
Break;
end;
ColorToleranceSpeed(CTS);
end;

{
Logical, Fixed the STANDARDS tho.

Noticed that you DONT Free your DTM in this one..
Simply delete your exit, Look down.

Also, You use the same stuff as you do in Proggy?
Try sticking to one Type out procedure.
}
function Bank: Boolean;
var
x, y, i, Failsaves: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
//For real, Stop this xD
begin
Failsaves := 1;
Loads := Loads + 1;
for i := 0 to Failsaves do

case i of
0:
begin
FindSymbol(X, Y, 'bank');
Mouse(X, Y, 5, 5, True);
DBDTM := DTMFromString('78DA636C67626008644001FFFFFD63F80FA41' +
'9416C2060AC01AAF182C8B140D5FCF9C304A619A17CB09A204C35' +
'22E86AC2F09B0300F8811153');

if DTMRotated(DBDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Result := True;
Mouse(x, y, 3, 3, True);
Flag;
AntiRandom;
SetLoc('Bank');
// Exit;
end;
FreeDTM(DBDTM);
end;

1:
begin
RadialWalkEx(TPA, MMCX, MMCY, 195836, 3, 360, 30, 30);
if Length(TPA) = 0 then
Exit;
SortTPAFrom(TPA, Point(MMCX, MMCY));
ATPA := SplitTPAEx(TPA, 10, 10);
SortATPASize(ATPA, True);
MiddleTPAEx(ATPA[0], x, y);
Mouse(x, y, 3, 3, True);
Result := True;
AntiRandom;
Flag;
AntiRandom;
SetLoc('Bank');
Exit;
end;
end;

xp2 := GetXp('woodcutting');
xp3 := xp2 - xp;
xp4 := XpTillNextLevel('woodcutting');
writeln('~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#');
writeln('#Destiful Woodcutter by The Man ');
writeln('~Ran For: '+TimeRunning+'! ');
Writeln('#Chopped down: '+IntToStr(InventoryWillows)+' logs ');
WriteLn('~WoodCutting Exp Gained: '+ IntToStr(xp3) +'. ');
WriteLn('#Exp Until Next Lvl: '+ IntToStr(xp4) +'. ');
WriteLn('~Loads Done: '+ IntToStr(Loads) +'. ');
Writeln('#Thank you for using Destiful Woodcutter ');
Writeln('~Please post this at [url]http://www.villavu.com/forum/showthread.php?t=45713');[/url]
Writeln('#Also please post feedback :) ');
Writeln('~But We are still running ;) ');
Writeln('#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~');
Lot2 := Lot2 + 1;
if (Lot2=(Players[CurrentPlayer].Integers[0])) then
begin
WriteLn('Done All Loads For That Player.');
Status('Next Player');
Lot2 := 0;
end;
MakeCompass('N');
SetRun(True);
SRLRandomsReport;
end;

Procedure SetVar;
Begin
Players[CurrentPlayer].Strings[0] := Lowercase(Players[CurrentPlayer].Strings[0]);
End;

function FindWillow(var x, y: Integer): Boolean;
var
A, M, curCTS, MX, MY: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
// Removeeeee
begin
Result := False;
if (not(LoggedIn)) then exit;
curCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3233608, MSX1, MSY1, MSX2, MSY2, 2);
ColorToleranceSpeed(1);
if Length(TPA) = 0 then
exit;
ATPA := TPAtoATPAEx(TPA, 10, 10);
M := High(ATPA);
for A := 0 to M do
if MiddleTPAEx(ATPA[A], MX, MY) then
begin
MMouse(MX, MY, 6, 6);
Wait(100 + Random(50));
if IsUpText('illow') then
begin
Result := True;
GetMousePos(X, Y);
ColorToleranceSpeed(curCTS);
Exit;
end;
end;
ColorToleranceSpeed(curCTS);
end;

procedure AntiBanage;
begin
case Random(100) of
0: HoverSkill('woodcutting', false);
1: MakeCompass('random');
2: Wait(1000 + Random(200));
3: RandomMovement;
4: RandomRClick;
5: HoverSkill('random', false);
6: GameTab(RandomRange(1, 12));
else SleepAndMoveMouse(250+random(100));
end;
end;

// Fixed standards.
function ChoppingLoop: Boolean;
var
T, x, y, i: Integer;
Colour: Integer;
begin
repeat
AntiRandom;
MarkTime(T);
if FindWillow(x, y) then
if Random(11) = 10 then
begin
Mouse(x, y, 3, 3, false);
Wait(RandomRange(123, 223));
if ChooseOptionEx('hop', 'action') then
Colour := GetColor(x, y);
Wait(1000 + random(2000));
end else Mouse(x, y, 3, 3, true);
Wait (1000+random(1000));

while (SimilarColors(Colour, GetColor(x, y), 4) and not(InvFull)) do
begin
MakeCompass('N');
Result := True;
i := random(30);
if i = 1 then
begin
AntiBanage;
Wait(randomrange(100,250));
end;
Wait(100);
AntiRandom;
SleepAndMoveMouse(2500+random(100));
if TimeFromMark(T) >= 20000 then
Break;
end;
until(InvFull);
CountTheLogs;
Result := true;
end;

procedure Responder; // Cheers R1ch great guy :D
var
HiChats, NoobChats, AutoChats, HiChatR, NoobChatR, AutoChatR, UpChats,
UpChatR, LevelChats, YesChats : TStringArray;
I, RL, R : Integer;
// ZzzzZZzz
begin
if (not(LoggedIn)) then
begin
Players[CurrentPlayer].Active:= False;
Exit;
end;
HiChats:= ['hi', 'yo', 'sup', 'ello', 'wassup', 'll right', 'hey', 'hai'];
HiChatR:= ['hi', 'hello there', 'sup', 'yo', 'hello', 'hey', 'howdy', 'hai'];
NoobChats:= ['noob', 'froob', 'neeb', 'choob', 'loser', 'you are a'];
NoobChatR:= ['u are', 'you r', 'u r', 'i aint', 'how am i??', 'looked in the mirror lately?'];
AutoChats:= ['autoer', 'bot', 'auto', 'cheater', 'autoing', 'cheat'];
AutoChatR:= ['no im not', 'im not a bot', 'i dont cheat!', 'me?!', 'r u serious?!', 'bots can talk??'];
UpChats:= ['gratz', 'well done', 'congratulations', 'grats', 'congratz'];
UpChatR:= ['thanks', 'ty', 'thank you', 'thx', 'thanx'];
LevelChats:= ['wc lv', 'wcing lv', 'woodcutting lev', 'wc lev'];
YesChats:= ['Yes', 'Ye', 'Yeah', 'Yea', 'Yup', 'Uh huh', 'Yep'];

for I:= 0 to High(HiChats) do
begin
if InChat(HiChats[i]) then
TypeSend(HiChatR[i]);
R:= R + 1;
end;
for I:= 0 to High(NoobChats) do
begin
if InChat(NoobChats[i]) then
TypeSend(NoobChatR[i]);
R:= R + 1;
end;
for I:= 0 to High(AutoChats) do
begin
if InChat(AutoChats[i]) then
TypeSend(AutoChatR[i]);
R:= R + 1;
end;
if LevelUp then
begin
for I:= 0 to High(UpChats) do
begin
if InChat(UpChats[i]) then
TypeSend(UpChatR[i]);
R:= R + 1;
end;
end;
for I:= 0 to High(LevelChats) do
begin
if InChat(LevelChats[i]) then
begin
R:= R + 1;
RL:= GetSkillInfo('fishing', False);
case Random(10) of
0: TypeSend(IntToStr(RL));
1: TypeSend('lvl '+IntToStr(RL));
2: TypeSend(IntToStr(RL) + ' over here');
3: TypeSend('level '+IntToStr(RL));
4: TypeSend('I''m ' + IntToStr(RL) + 'fishing');
5: TypeSend('only ' + IntToStr(RL));
6: TypeSend('meh, only ' + IntToStr(RL));
7: begin
case Random(5) of
0: TypeSend('onky ' + IntToStr(RL));
1: TypeSend('omly ' + IntToStr(RL));
2: TypeSend('inly ' + IntToStr(RL));
3: TypeSend('onlu ' + IntToStr(RL));
4: TypeSend('om;y ' + IntToStr(RL));
end;
case Random(5) of
0: TypeSend('only*');
1: TypeSend('*only');
2: TypeSend('Sorry, *only');
3: TypeSend('I meant "only"');
4: TypeSend('*only ' + IntToStr(RL));
end;
end;
8: case Random(3) of
0: TypeSend('My wcing is ' + IntToStr(RL));
1: TypeSend('My woodcutting is ' + IntToStr(RL) + '...8-)');
2: TypeSend('It''s ' + IntToStr(RL));
end;
9: begin
TypeSend('Me?');
Wait(2500 + Random(1500));
for I:= 0 to High(YesChats) do
if InChat(YesChats[i]) then
TypeSend(IntToStr(RL));
end;
end;
end;
end;
end;

{
No need for all the Writelns.
And if you really need to do them just use

Var
I: Integer;

For I:=0 to 7 do
Writeln('');
}
procedure SetupMain;
begin
cleardebug;
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
setupsrl;
ScriptID := '1058';
mousespeed := 13; // to fast. 13 is better
declareplayers;
activateclient;
wait(500);
end;

{Fixed standards.}
begin
SetupMain;

{$IFDEF SMART}
smartsetupex(57, false, true, false);
settargetdc(smartgetdc);
repeat
Wait(100);
until (SmartGetColor(253, 233) <> 1118604);
{$ENDIF}

if (not (LoggedIn)) then
begin
Loginplayer;
setangle(true);
Wait(500 + random(30))
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
xp := GetXp('woodcutting');
end;

SetupScript;
repeat
if not (loggedIn) then
begin
nextplayer(false);
TerminateScript;
end;


Players[CurrentPlayer].Loc:= PlayerLoc;

if Players[CurrentPlayer].Loc = 'WalkToWillows' then
if ToWillows then Players[CurrentPlayer].Loc:= 'Chopping';

if Players[CurrentPlayer].Loc = 'Chopping' then
if ChoppingLoop then Players[CurrentPlayer].Loc:= 'LoadDone';

if Players[CurrentPlayer].Loc = 'LoadDone' then
if Bank then Players[CurrentPlayer].Loc:= 'Bank';

if Players[CurrentPlayer].Loc = 'Bank' then
if DepositWillows then Players[CurrentPlayer].Loc:= 'WalkToWillows';

Until(AllPlayersInactive = True);
end.

You got potential, keep doing it :)

Dynamite

2009-05-30 23:56:54

ok cheers n1ke, has anyone tested it yet?

T~M

Dynamite

2009-05-31 14:15:46

Bump? 7 downloads, 1 post?
Please guys I need feedback to make this better, or I may aswell put this in members section.

T~M

Torrent of Flame

2009-05-31 21:13:56

bump ;)

Dynamite

2009-06-04 22:17:58

can someone please post a proggy?
cazabaca have you tried the new version?
if i get a few people atleast posting proggies and tell me where it went wrong i will update.

T~M

y0m0mma0123

2009-06-05 01:36:59

i will try it

y0m0mma0123

2009-06-05 01:46:58

i just tested it and a couple of things

first the random movement on the mouse takes alil bit too long but thats not a big deal what is a problem is it will do a load and befor it gose to band it will stop and say

[Runtime Error] : Out Of Range in line 120 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Amount.scar

so theres ur feedback =)

Dynamite

2009-06-05 23:04:26

Random movement as in antiban?
Runtime error I have no idea why it does it :( it doesnt for me!
hmm any one share any advice on this error?

T~M

Dynamite

2009-06-07 01:13:51

Updated to V1.1
Updated so that you shouldnt get the runtime error :)

T~M

Da 0wner

2009-06-07 01:38:52

Okay, you edited the WillowAmount procedure I posted to a bit more useless version. You declared InvLogs as a local variable and instead of inc(result) you use inc(invlogs).

That is useless. Keep it at how I had it and just declare InvLogs as a global variable and do IncEx(InvLogs, WillowAmount).

Seizure

2009-06-07 07:40:54

Good script… one flaw for me though.

For some reason, SMART and the runescape applet itself just freezes. This has never happened with any other script.

Dynamite

2009-06-07 12:24:29

From: Da 0wner
Okay, you edited the WillowAmount procedure I posted to a bit more useless version. You declared InvLogs as a local variable and instead of inc(result) you use inc(invlogs).

That is useless. Keep it at how I had it and just declare InvLogs as a global variable and do IncEx(InvLogs, WillowAmount).


OH okay I understand now. Thank you :)

From: Seizure
Good script… one flaw for me though.

For some reason, SMART and the runescape applet itself just freezes. This has never happened with any other script.


That isn't anything to do with the script (I don't think) just try closing scar then open it up again and run.

T~M

Dynamite

2009-06-07 14:15:22

Updated V1.2
Download the new version
Should be stable
Post feedback
Post Proggies

Cheers
T~M

Pure1993

2009-06-07 20:27:28

I don't know if it's a bug or on purpose, but the script clicks the tree every 3 or sseconds, even if it isn't cut down yet… Also, it attacked a wizzard who ran between the mouse and the tree in the last second, would have killed me if I wouldn't have been there ^^

Bro

2009-06-07 20:31:51

Downloading now i'll leave it on over night and get back to you :)

EDIT: Yeah I agree with osmm, bad walking procedure, I ended up on Ice Mountain when I checked its progress rofl :)

Chops the willows like a charm, but it really needs a clean up on walking to the bank. It would be perfect if that worked :)

Dynamite

2009-06-07 21:42:55

From: Pure1993
I don't know if it's a bug or on purpose, but the script clicks the tree every 3 or sseconds, even if it isn't cut down yet… Also, it attacked a wizzard who ran between the mouse and the tree in the last second, would have killed me if I wouldn't have been there ^^


Sorry :( I am trying to fix that. Do you know how I could? :S

From: Bro
Downloading now i'll leave it on over night and get back to you :)


Ok cheers Bro :D

T~M

osmm

2009-06-07 21:45:28


~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#
#Destiful Woodcutter by The Man
~Ran For: 35 Minutes and 34 Seconds!
#Chopped down: 252 logs
~WoodCutting Exp Gained: 0.
#Exp Until Next Lvl: 0.
~ Loads Done: 9.
#Thank you for using Destiful Woodcutter
~Please post this at http://www.villavu.com/forum/showthread.php?t=45713
#~Also please post feedback :)
#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~


And then it just got lost in the northern part of Draynor. I paused script, took it back down to the willow area and it kept clicking on water (on minimap).

EDIT: Yeah script is buggy in terms of walking. It turned my compass when I was at bank, but it never turned it back to North when walking back to trees, so I got lost.

EDIT2: The fix for ^^ that bug:
MakeCompass('n');
(I use it in my script, just handing it to you incase you didn't know it by heart, so you wouldn't have to waste time searching for it)

Dynamite

2009-06-09 12:00:40

ok cheers guys Im at school now, i will maybe fix tonight alrjough I have to revise for exams.

T~M

lolers

2009-06-10 04:50:37

~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#
#Destiful Woodcutter by The Man
~Ran For: 15 Minutes and 23 Seconds!
#Chopped down: 112 logs
~WoodCutting Exp Gained: 0.
#Exp Until Next Lvl: 0.
~ Loads Done: 4.
#Thank you for using Destiful Woodcutter
~Please post this at http://www.villavu.com/forum/showthread.php?t=45713
#~Also please post feedback :)
#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~

Stopped because it couldn't locate the willows, It does correct to north after the 4th load or something like that.

Dynamite

2009-06-20 13:44:51

OK my exams are over now so I can start working on this.
Now everyone has a vote.
what should i do:

Fix this
or
Make my 1-99 ProWoodcutter
You decide.
I will make a poll

T~M

masterBB

2009-07-26 21:09:26

From: Cazabacca
Destiful Woodcutter (v0.3 used)
Ran For: 3 Hours, 55 Minutes and 44 Seconds!
Chopped down: 20776 logs (I'm a very fast cutter as you can see.)
Successfully executed

Will be posting a better proggy tomorrow with proper version.

Well that was hard wasn't it? :D


OMG that is 88 logs a minute… 1.5 logs a second…

impossible, I reach 15 logs a minute max with 75 wc on oaks MANUAL…