SRL Archive - First Scripts

Power Cutter - By Mr_Bum


Mr_Bum

2008-11-19 06:32:53

Power Cutter - By Mr_Bum



PLEASE RATE THREAD ***** 5 STARS

Whos is Better Mine or Camo Kyles?
'                      _____                                  
/`\_/`\ /\ _`\
/\ \ _ __ \ \ \L\ \ __ __ ___ ___ ____
\ \ \__\ \/\``__\ \ \ _ <`/\ \/\ \ /` __` __`\ /`,__\
\ \ \_/\ \ \ \/ \ \ \L\ \ \ \_\ \/\ \/\ \/\ \/\__, `\
\ \_\\ \_\ \_\ \ \____/\ \____/\ \_\ \_\ \_\/\____/
\/_/ \/_/\/_/ _______\/___/ \/___/ \/_/\/_/\/_/\/___/
Power Cutter'

{_______________________________
| 1.Setup Players |
| |
| 2.Set RS window |
| |
| 3.Post Feedback |
| |
| 4.Add Smart If You Want |
|_____________________________|
}

SRL 4 Rev#28
Scar DIVI3.15b

FINDLEVELFUNCTION by griff721.

Script History

Version 0.1
No IsUpText, Clicks on ground sometimes, no entfinding, drops axe if in inventory and Proggy doesnt work

Version 0.5
IsUpText includes, Clicks on any tree, Proggy still doesnt work, No set amount of loads and Multiplayer doesnt work.

Version 1
Is IsUptext included, Clicks on any tree, Proggy works, Level finding added, No set amount of loads.

Version 1.1
Is IsUpText included, Clicks on any tree, Proggy Works, Level finding, Set amount of loads, set amount of axes and ent finding.

Version 1.2
IsUpText included, Option to not cut trees, Proggy updated, Ent Finding, Drops faster.

Version 1.3
IsUpText used as Fail Safe, FindTree Procedure updated uses FindCustomObj instead of FindColorTolerance, Finds fights more often.

Version 1.4
Better tree finding, My own drop procedure and my own find gained level procedure

Version 1.5
ADDED SRL STATS YEA!, A couple of touch ups. Forgot to release earlier

Version 1.6 - Current
Using griff721's findgainedlevel function. Mine isnt working right. Will be fixed in next update i hope.



If no proggies this wont be updated

Please Post Proggies and feedback… THANKS

Proggies:

// SirPa
#%#%#%#%#%#%#% Power Cutter By Mr_Bum #%#%#%#%#%#%#%
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%
#% Time Running : 3 Hours, 21 Minutes and 6 Seconds
#% Dropped 60 loads
#% Dropped 1564 logs
#% Gained 7 Woodcutting levels
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%
#%#%#%#%##%#%#%#%#% POST PROGGIES #%#%#%#%#%#%#%#%#%#%

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| SRL 28 Randoms Report |
| [url]http://www.srl-forums.com[/url] |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Fights : 10 |
| Talks : 1 |
| Certers Solved : 1 |
| Demons Solved : 1 |
| Boxes Solved : 10 |
| Ents Found : 1 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/


// [email]JiveTonto@Gmail.com[/email]
#%#%#%#%#%#%#% Power Cutter By Mr_Bum #%#%#%#%#%#%#%
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#% #%#%
#% Time Running : 1 Hours, 33 Minutes and 38 Seconds
#% Dropped 32 loads
#% Dropped 772 logs
#% Gained 1 Woodcutting levels
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#% #%#%

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| SRL 28 Randoms Report |
| [url]www.srl-forums.com[/url] |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Fights : 6 |
| Talks : 2 |
| Jekylls : 1 |
| Capn Hands : 1 |
| Boxes Solved : 5 |
| Ents Found : 1 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

SirPa

2008-11-19 08:50:34

The problem why the player won't login is in this part:

begin
Sig;
DeclarePlayers;
LoginPlayer;
SetupSRL;
ActivateClient;

It should be:

begin
SetupSRL; // makes all SRL functions work
DeclarePlayers; // Declare's players
Sig; // Signature or something
ActivateClient; // Activates the runescape window
LoginPlayer; // Logs player in (needs a active window ;) )


Not sure why the uptext won't work properly for you, ill look into it though

Looks like a decent first script! :)


Edit:
Can't help you with the GetUpText, as it is not in your script ;)



~Sir

Mr_Bum

2008-11-20 02:57:59

Yea i took it out. Is updated with GetUpText in it thanks so much for the help.

From: sirpali
The problem why the player won't login is in this part:

begin
Sig;
DeclarePlayers;
LoginPlayer;
SetupSRL;
ActivateClient;

It should be:

begin
SetupSRL; // makes all SRL functions work
DeclarePlayers; // Declare's players
Sig; // Signature or something
ActivateClient; // Activates the runescape window
LoginPlayer; // Logs player in (needs a active window ;) )

~Sir


Login still not working…:(

Edit:
Working now!

Griff

2008-11-21 20:19:33

Thanks for crediting me for my procedure, that shows that your a good person :P
I'll look through the script a bit more, but looks awesome for a first script!

Mr_Bum

2008-11-21 20:58:20

From: griff721
Thanks for crediting me for my procedure, that shows that your a good person :P
I'll look through the script a bit more, but looks awesome for a first script!


Its fine. Sometimes it doesnt work in my script 100% i will have to make it search for gained lvls more often. Thanks for letting me use it:spot:

SirPa

2008-11-21 21:44:42

It's getting nicer every update :)
Im going to run it on my noobie, and let it run while i sleep, lets see if we can get a nice proggy off of it ;)

I made a few small changes though, i added DropAllExcept so it wouldn't drop my axe ;)

~Sir

Mr_Bum

2008-11-21 23:24:59

From: sirpali
It's getting nicer every update :)
Im going to run it on my noobie, and let it run while i sleep, lets see if we can get a nice proggy off of it ;)

I made a few small changes though, i added DropAllExcept so it wouldn't drop my axe ;)

~Sir

Thanks.

I will add DropAllExcept in with my next update. There will be two Versions… DropAll, And DropAllExcept

Sandstorm

2008-11-22 02:00:00

Get it to check if your wearing the axe or not (either get the user to input it or check it yourself). I'll take a more extensive look tomorrow. 12 AM ftw.

~Sandstorm

Kyle Undefined

2008-11-22 02:49:21

Nice script, everything seems to flow nicely. Keep it up. ;)

@ Sand. Wouldn't just adding (SetupWoodcutting;) near the beginning of the main loop make it check for an axe?

This is what I did to your script, kind of cleaned it a little. Hope you like.
{_______________________________
| 1.Setup Players |
| |
| 2.Set RS window |
| |
| 3.Post Feedback |
| |
| 4.Add Smart If You Want |
|_____________________________|
}
program PowerCutterByMR_BUM;
{.include srl/srl.scar}
var
TreeColor : array of Integer;
i,x,y : integer;
Found : boolean;
Drops : integer;
Antibans : integer;
Loads : integer;
Gained : integer;

const
TreeWait = 7000; //How long it takes to cut a tree Miliseconds
RunDirection = 'N'; //Which direction to run if a fight occurs
DesiredLoads = 10; // Amount of loads per player
TreeType = 'Tree'; //What type of tree you want. Leave blank for any tree
// ^^^^ Must start with capital


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

Players[0].Name := ''; // your runescape account
Players[0].Pass := ''; // your runescape password
Players[0].Nick := ''; // 3-4 letters of your runscape username
Players[0].Active := True; //In the script or not
{
Players[1].Name := ''; // your runescape account
Players[1].Pass := ''; // your runescape password
Players[1].Nick := ''; // 3-4 letters of your runscape username
Players[1].Active := True; //In the script or not

Players[2].Name := ''; // your runescape account
Players[2].Pass := ''; // your runescape password
Players[2].Nick := ''; // 3-4 letters of your runscape username
Players[2].Active := True; //In the script or not

Players[3].Name := ''; // your runescape account
Players[3].Pass := ''; // your runescape password
Players[3].Nick := ''; // 3-4 letters of your runscape username
Players[3].Active := True; //In the script or not

Players[4].Name := ''; // your runescape account
Players[4].Pass := ''; // your runescape password
Players[4].Nick := ''; // 3-4 letters of your runscape username
Players[4].Active := True; //In the script or not
}
end;

Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('You were attacked')
Begin
Status('Running away!');
Writeln('Running....');
RunAway(RunDirection,False,1,8000+Random(3000))
Writeln('Got Away?');
end;
end;
end;

// By griff721
function FindGainedLevel: boolean;
begin
if not LoggedIn then
Exit;
if ClickContinue(False, False) then
begin
if FindNPCChatText('lations', Nothing) then
begin
writeln('We gained a Woodcutting!');
Inc(Gained);
ClickContinue(True, True);
Result := True;
Exit;
end;
end;
end;


procedure LoadColors;
begin
SetArrayLength(TreeColor,5);
TreeColor[0] := 4292724;
TreeColor[1] := 4158055;
TreeColor[2] := 2839885;
TreeColor[3] := 2112567;
TreeColor[4] := 1921864;
end;

Procedure FindTree;
begin
FindFightEx;
FindGainedLevel;
LoadColors;
If not(Loggedin)then Exit;
MakeCompass('N');
SetAngle(true);
SetRun(true);
For i:= 0 to (GetArrayLength(TreeColor) - 1) do
begin
if(FindColorSpiralTolerance(x,y,TreeColor[i],MSX1,MSY1,MSX2,MSY2,5))then
begin
Writeln('Serching For Tree');
MMouse(x,y,2,2);
if IsUpTextMultiCustom(['hop', 'own',(TreeType)]) then
begin
Writeln('Found Tree');
Mouse(x,y,2,2,true);
Writeln('Cutting Tree');
Wait(TreeWait +random(500));
end else // Don't need that else in there
end;
end;
if(Found = False)then
Exit;
end;

Procedure AntiRandoms; Forward; // Called forward so can be used below
Procedure AntiBan; Forward; // Same

Procedure DropLogs; // By Camo Kyle
begin
if (not (LoggedIn)) then Exit;
if (InvFull) then
begin
for I := 2 to 28 do // Change the first number if needed
begin
DropItem(i)
AntiRandoms;
AntiBan;
Inc(loads);
end;
end;
end;

Procedure AntiRandoms;
var
d : Integer;
Begin
Status('Doing AntiRandoms');
for d := 0 to 3 do
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1);
end;

procedure Antiban; // Too many spaces, keep it as minimal as possible
begin
if not(LoggedIn)then Exit;
case Random(68) of

0:
begin
HoverSkill('Attack', False);
Antibans:=Antibans+1;
end;

1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;

2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;

3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;

4:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;
end;
end;

Procedure Proggy;
Begin
cleardebug;
Writeln('#%#%#%#%#%#%#% Power Cutter By Mr_Bum #%#%#%#%#%#%#%');
Writeln('#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%');
Writeln('#% Time Running : ' +TimeRunning + '');
Writeln('#% Dropped '+ IntToStr(Drops) + ' loads');
Writeln('#% Gained '+ IntToStr(Gained) + ' Woodcutting levels');
Writeln('#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%');
end;

Procedure Sig;
begin
ClearDebug;
Writeln(' _____ ');
Writeln(' /`\_/`\ /\ _`\ ');
Writeln('/\ \ _ __ \ \ \L\ \ __ __ ___ ___ ____ ');
Writeln('\ \ \__\ \/\``__\ \ \ _ <`/\ \/\ \ /` __` __`\ /`,__\ ');
Writeln(' \ \ \_/\ \ \ \/ \ \ \L\ \ \ \_\ \/\ \/\ \/\ \/\__, `\ ');
Writeln(' \ \_\\ \_\ \_\ \ \____/\ \____/\ \_\ \_\ \_\/\____/ ');
Writeln(' \/_/ \/_/\/_/ _______\/___/ \/___/ \/_/\/_/\/_/\/___/ ');
Writeln(' Power Cutter');
wait(2000);
end;



Begin // Fixed your standards
SetupSRL;
DeclarePlayers;
Sig;
ActivateClient;
LoginPlayer;
SetupWoodcutting;
If not Loggedin then LoginPlayer;
Disguise('Power Cutter - By Mr_Bum');
repeat
begin
FindTree;
if InvFull = true then
begin
FindFightEx;
DropLogs;
end;
AntiBan;
AntiRandoms;
if Loads = DesiredLoads then NextPlayer(true);
end;
Proggy;
until false
end.

~Camo

Mr_Bum

2008-11-22 04:31:03

From: Camo Kyle
Nice script, everything seems to flow nicely. Keep it up. ;)

@ Sand. Wouldn't just adding (SetupWoodcutting;) near the beginning of the main loop make it check for an axe?

This is what I did to your script, kind of cleaned it a little. Hope you like.
{_______________________________
| 1.Setup Players |
| |
| 2.Set RS window |
| |
| 3.Post Feedback |
| |
| 4.Add Smart If You Want |
|_____________________________|
}
program PowerCutterByMR_BUM;
{.include srl/srl.scar}
var
TreeColor : array of Integer;
i,x,y : integer;
Found : boolean;
Drops : integer;
Antibans : integer;
Loads : integer;
Gained : integer;

const
TreeWait = 7000; //How long it takes to cut a tree Miliseconds
RunDirection = 'N'; //Which direction to run if a fight occurs
DesiredLoads = 10; // Amount of loads per player
TreeType = 'Tree'; //What type of tree you want. Leave blank for any tree
// ^^^^ Must start with capital


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

Players[0].Name := ''; // your runescape account
Players[0].Pass := ''; // your runescape password
Players[0].Nick := ''; // 3-4 letters of your runscape username
Players[0].Active := True; //In the script or not
{
Players[1].Name := ''; // your runescape account
Players[1].Pass := ''; // your runescape password
Players[1].Nick := ''; // 3-4 letters of your runscape username
Players[1].Active := True; //In the script or not

Players[2].Name := ''; // your runescape account
Players[2].Pass := ''; // your runescape password
Players[2].Nick := ''; // 3-4 letters of your runscape username
Players[2].Active := True; //In the script or not

Players[3].Name := ''; // your runescape account
Players[3].Pass := ''; // your runescape password
Players[3].Nick := ''; // 3-4 letters of your runscape username
Players[3].Active := True; //In the script or not

Players[4].Name := ''; // your runescape account
Players[4].Pass := ''; // your runescape password
Players[4].Nick := ''; // 3-4 letters of your runscape username
Players[4].Active := True; //In the script or not
}
end;

Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('You were attacked')
Begin
Status('Running away!');
Writeln('Running....');
RunAway(RunDirection,False,1,8000+Random(3000))
Writeln('Got Away?');
end;
end;
end;

// By griff721
function FindGainedLevel: boolean;
begin
if not LoggedIn then
Exit;
if ClickContinue(False, False) then
begin
if FindNPCChatText('lations', Nothing) then
begin
writeln('We gained a Woodcutting!');
Inc(Gained);
ClickContinue(True, True);
Result := True;
Exit;
end;
end;
end;


procedure LoadColors;
begin
SetArrayLength(TreeColor,5);
TreeColor[0] := 4292724;
TreeColor[1] := 4158055;
TreeColor[2] := 2839885;
TreeColor[3] := 2112567;
TreeColor[4] := 1921864;
end;

Procedure FindTree;
begin
FindFightEx;
FindGainedLevel;
LoadColors;
If not(Loggedin)then Exit;
MakeCompass('N');
SetAngle(true);
SetRun(true);
For i:= 0 to (GetArrayLength(TreeColor) - 1) do
begin
if(FindColorSpiralTolerance(x,y,TreeColor[i],MSX1,MSY1,MSX2,MSY2,5))then
begin
Writeln('Serching For Tree');
MMouse(x,y,2,2);
if IsUpTextMultiCustom(['hop', 'own',(TreeType)]) then
begin
Writeln('Found Tree');
Mouse(x,y,2,2,true);
Writeln('Cutting Tree');
Wait(TreeWait +random(500));
end else // Don't need that else in there
end;
end;
if(Found = False)then
Exit;
end;

Procedure AntiRandoms; Forward; // Called forward so can be used below
Procedure AntiBan; Forward; // Same

Procedure DropLogs; // By Camo Kyle
begin
if (not (LoggedIn)) then Exit;
if (InvFull) then
begin
for I := 2 to 28 do // Change the first number if needed
begin
DropItem(i)
AntiRandoms;
AntiBan;
Inc(loads);
end;
end;
end;

Procedure AntiRandoms;
var
d : Integer;
Begin
Status('Doing AntiRandoms');
for d := 0 to 3 do
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1);
end;

procedure Antiban; // Too many spaces, keep it as minimal as possible
begin
if not(LoggedIn)then Exit;
case Random(68) of

0:
begin
HoverSkill('Attack', False);
Antibans:=Antibans+1;
end;

1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;

2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;

3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;

4:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;
end;
end;

Procedure Proggy;
Begin
cleardebug;
Writeln('#%#%#%#%#%#%#% Power Cutter By Mr_Bum #%#%#%#%#%#%#%');
Writeln('#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%');
Writeln('#% Time Running : ' +TimeRunning + '');
Writeln('#% Dropped '+ IntToStr(Drops) + ' loads');
Writeln('#% Gained '+ IntToStr(Gained) + ' Woodcutting levels');
Writeln('#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%');
end;

Procedure Sig;
begin
ClearDebug;
Writeln(' _____ ');
Writeln(' /`\_/`\ /\ _`\ ');
Writeln('/\ \ _ __ \ \ \L\ \ __ __ ___ ___ ____ ');
Writeln('\ \ \__\ \/\``__\ \ \ _ <`/\ \/\ \ /` __` __`\ /`,__\ ');
Writeln(' \ \ \_/\ \ \ \/ \ \ \L\ \ \ \_\ \/\ \/\ \/\ \/\__, `\ ');
Writeln(' \ \_\\ \_\ \_\ \ \____/\ \____/\ \_\ \_\ \_\/\____/ ');
Writeln(' \/_/ \/_/\/_/ _______\/___/ \/___/ \/_/\/_/\/_/\/___/ ');
Writeln(' Power Cutter');
wait(2000);
end;



Begin // Fixed your standards
SetupSRL;
DeclarePlayers;
Sig;
ActivateClient;
LoginPlayer;
SetupWoodcutting;
If not Loggedin then LoginPlayer;
Disguise('Power Cutter - By Mr_Bum');
repeat
begin
FindTree;
if InvFull = true then
begin
FindFightEx;
DropLogs;
end;
AntiBan;
AntiRandoms;
if Loads = DesiredLoads then NextPlayer(true);
end;
Proggy;
until false
end.

~Camo



Thank you. I will use your drop but with a bit of edititng and fixed mainloop.

UPDATED

Kyle Undefined

2008-11-22 04:42:02

No problem, glad to help. Do you have the code needed? I have a quick one right here. It's very simple but gets the job done.
procedure Ent;
begin
if Findent(x, y, true) then
RunAway('E', false, 1, 10000 + random(6000));
end;

Mr_Bum

2008-11-22 04:47:54

Isnt there one in Woodcutting.scar

{*******************************************************************************
function FindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean;
By: Sumilion
Description: Will look for an Ent and avoid if found.
*******************************************************************************}

function FindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean;
var
x, y, EntTime, tcts: Integer;
begin
if not(LoggedIn)then
Exit;
GetMousePos(x, y);
if(x <> fx)or(y <> fy)then
MMouse(fx, fy, 0, 0);
if(IsUpText('Chop'))then
begin
tcts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.75);
Result := (CountColorTolerance(118478, 9, 10, 124, 23, 10) > 10);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(tcts);
end;
if(Result)then
begin
WriteLn('Ent Found!!');
if(AvoidWhenFound)then
begin
Writeln('Waiting for it to go away.');
MFNF(MMCX, MMCY, -1, 1);
MarkTime(EntTime);
while(TimeFromMark(EntTime) < 35000)do
if(Random(20) > 15)then
IdleTime(500, 500, 0.4)
else
Wait(500 + Random(500));
EntsAvoided := EntsAvoided + 1;
end;
end;
end;

SirPa

2008-11-22 04:48:58

Ok, so i let the script for a while, but i stopped it after an hour, because there are a few little flaws in it.


1: When it searches for a tree, it seaches from the outside of the screen in. This causes the player to keep running further and further from the starting posittion. I found my player all the way in falador :p


2: The colors aren't perfect, or something is wrong with the FindTree procedure. Even though i set the script to only cut Trees, it cut oaks too.
This caused an Ent, and because of no entfinder, my player lost his axe, but tried to continue cutting.


So far these are the only flaws i found, but its a pretty nice script nonetheless.

~Sir

PS: No proggy :( Cause i stopped the script manually. Maybe put a proggy in the drop procedure?

Kyle Undefined

2008-11-22 04:50:02

Yeah, but do you understand exactly what's going on in that script or are you just copying it?

~Camo

Mr_Bum

2008-11-22 04:53:02

From: sirpali
Ok, so i let the script for a while, but i stopped it after an hour, because there are a few little flaws in it.


1: When it searches for a tree, it seaches from the outside of the screen in. This causes the player to keep running further and further from the starting posittion. I found my player all the way in falador :p


2: The colors aren't perfect, or something is wrong with the FindTree procedure. Even though i set the script to only cut Trees, it cut oaks too.
This caused an Ent, and because of no entfinder, my player lost his axe, but tried to continue cutting.


So far these are the only flaws i found, but its a pretty nice script nonetheless.

~Sir

PS: No proggy :( Cause i stopped the script manually. Maybe put a proggy in the drop procedure?

I think the problem with the tree setting is that it searches if it has hop,own,and the tree you set. so if it finds something with rop and own in it it will click on the tree. If i take that out you can only cut one type of tree.

From: Camo Kyle
Yeah, but do you understand exactly what's going on in that script or are you just copying it?

~Camo


@Camo.
Yes i do. I have been reading tuts for about 3 weeks until i released this

Sandstorm

2008-11-22 09:45:34

From: Camo Kyle
Nice script, everything seems to flow nicely. Keep it up. ;)

@ Sand. Wouldn't just adding (SetupWoodcutting;) near the beginning of the main loop make it check for an axe?

This is what I did to your script, kind of cleaned it a little. Hope you like.
{_______________________________
| 1.Setup Players |
| |
| 2.Set RS window |
| |
| 3.Post Feedback |
| |
| 4.Add Smart If You Want |
|_____________________________|
}
program PowerCutterByMR_BUM;
{.include srl/srl.scar}
var
TreeColor : array of Integer;
i,x,y : integer;
Found : boolean;
Drops : integer;
Antibans : integer;
Loads : integer;
Gained : integer;

const
TreeWait = 7000; //How long it takes to cut a tree Miliseconds
RunDirection = 'N'; //Which direction to run if a fight occurs
DesiredLoads = 10; // Amount of loads per player
TreeType = 'Tree'; //What type of tree you want. Leave blank for any tree
// ^^^^ Must start with capital


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

Players[0].Name := ''; // your runescape account
Players[0].Pass := ''; // your runescape password
Players[0].Nick := ''; // 3-4 letters of your runscape username
Players[0].Active := True; //In the script or not
{
Players[1].Name := ''; // your runescape account
Players[1].Pass := ''; // your runescape password
Players[1].Nick := ''; // 3-4 letters of your runscape username
Players[1].Active := True; //In the script or not

Players[2].Name := ''; // your runescape account
Players[2].Pass := ''; // your runescape password
Players[2].Nick := ''; // 3-4 letters of your runscape username
Players[2].Active := True; //In the script or not

Players[3].Name := ''; // your runescape account
Players[3].Pass := ''; // your runescape password
Players[3].Nick := ''; // 3-4 letters of your runscape username
Players[3].Active := True; //In the script or not

Players[4].Name := ''; // your runescape account
Players[4].Pass := ''; // your runescape password
Players[4].Nick := ''; // 3-4 letters of your runscape username
Players[4].Active := True; //In the script or not
}
end;

Procedure FindFightEx;
Begin
If(FindFight) then
Begin
Status('Fight found!');
Writeln('You were attacked')
Begin
Status('Running away!');
Writeln('Running....');
RunAway(RunDirection,False,1,8000+Random(3000))
Writeln('Got Away?');
end;
end;
end;

// By griff721
function FindGainedLevel: boolean;
begin
if not LoggedIn then
Exit;
if ClickContinue(False, False) then
begin
if FindNPCChatText('lations', Nothing) then
begin
writeln('We gained a Woodcutting!');
Inc(Gained);
ClickContinue(True, True);
Result := True;
Exit;
end;
end;
end;


procedure LoadColors;
begin
SetArrayLength(TreeColor,5);
TreeColor[0] := 4292724;
TreeColor[1] := 4158055;
TreeColor[2] := 2839885;
TreeColor[3] := 2112567;
TreeColor[4] := 1921864;
end;

Procedure FindTree;
begin
FindFightEx;
FindGainedLevel;
LoadColors;
If not(Loggedin)then Exit;
MakeCompass('N');
SetAngle(true);
SetRun(true);
For i:= 0 to (GetArrayLength(TreeColor) - 1) do
begin
if(FindColorSpiralTolerance(x,y,TreeColor[i],MSX1,MSY1,MSX2,MSY2,5))then
begin
Writeln('Serching For Tree');
MMouse(x,y,2,2);
if IsUpTextMultiCustom(['hop', 'own',(TreeType)]) then
begin
Writeln('Found Tree');
Mouse(x,y,2,2,true);
Writeln('Cutting Tree');
Wait(TreeWait +random(500));
end else // Don't need that else in there
end;
end;
if(Found = False)then
Exit;
end;

Procedure AntiRandoms; Forward; // Called forward so can be used below
Procedure AntiBan; Forward; // Same

Procedure DropLogs; // By Camo Kyle
begin
if (not (LoggedIn)) then Exit;

if (InvFull) then
begin
for I := 2 to 28 do // Change the first number if needed
begin
DropItem(i)
AntiRandoms;
AntiBan;
Inc(loads);
end;
end;
end;

Procedure AntiRandoms;
var
d : Integer;
Begin
Status('Doing AntiRandoms');
for d := 0 to 3 do
FindNormalRandoms;
FindFightEx;
FindNonInventoryRandoms;
wait(1);
end;

procedure Antiban; // Too many spaces, keep it as minimal as possible
begin
if not(LoggedIn)then Exit;
case Random(68) of

0:
begin
HoverSkill('Attack', False);
Antibans:=Antibans+1;
end;

1:
begin
HoverSkill('Smithing', false);
Antibans:=Antibans+1;
end;

2:
begin
GameTab(1 + Random(12));
wait(800 + random(500));
GameTab(4);
Antibans:=Antibans+1;
end;

3:
begin
BoredHuman;
Antibans:=Antibans+1;
end;

4:
begin
DoEmote(400 + Random(90));
Antibans:=Antibans+1;
end;
end;
end;

Procedure Proggy;
Begin
cleardebug;
Writeln('#%#%#%#%#%#%#% Power Cutter By Mr_Bum #%#%#%#%#%#%#%');
Writeln('#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%');
Writeln('#% Time Running : ' +TimeRunning + '');
Writeln('#% Dropped '+ IntToStr(Drops) + ' loads');
Writeln('#% Gained '+ IntToStr(Gained) + ' Woodcutting levels');
Writeln('#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%');
end;

Procedure Sig;
begin
ClearDebug;
Writeln(' _____ ');
Writeln(' /`\_/`\ /\ _`\ ');
Writeln('/\ \ _ __ \ \ \L\ \ __ __ ___ ___ ____ ');
Writeln('\ \ \__\ \/\``__\ \ \ _ <`/\ \/\ \ /` __` __`\ /`,__\ ');
Writeln(' \ \ \_/\ \ \ \/ \ \ \L\ \ \ \_\ \/\ \/\ \/\ \/\__, `\ ');
Writeln(' \ \_\\ \_\ \_\ \ \____/\ \____/\ \_\ \_\ \_\/\____/ ');
Writeln(' \/_/ \/_/\/_/ _______\/___/ \/___/ \/_/\/_/\/_/\/___/ ');
Writeln(' Power Cutter');
wait(2000);
end;



Begin // Fixed your standards
SetupSRL;
DeclarePlayers;
Sig;
ActivateClient;
LoginPlayer;
SetupWoodcutting;
If not Loggedin then LoginPlayer;
Disguise('Power Cutter - By Mr_Bum');
repeat
begin
FindTree;
if InvFull = true then
begin
FindFightEx;
DropLogs;
end;
AntiBan;
AntiRandoms;
if Loads = DesiredLoads then NextPlayer(true);
end;
Proggy;
until false
end.

~Camo


It might, I've never actually tried using it lol.

Also, instead of that drop procedure, try using this one (I modified DropAll;).

Program DropAllExceptItems;
{.include srl/srl.scar}

{*******************************************************************************
Procedure DropAllExcept(A : Array of Integer);
By: Sand Storm
Description: Drops everything except the user defined inventory spaces.
*******************************************************************************}

procedure DropAllExcept(A : Array of Integer);
var
i: Integer;
begin
If (Not (LoggedIn)) Then Exit;
For I:=1 To 28 Do
if not(InIntArray(a, i)) then
DropItem(i);
end;


Begin
setupsrl;
DropAllExcept([1]);
End.

The Procedure is the actual code, the Mainloop just shows how to use it. That would drop everything except the first inventory slot.

Mr_Bum

2008-11-22 21:28:20

From: Sand Storm
It might, I've never actually tried using it lol.

Also, instead of that drop procedure, try using this one (I modified DropAll;).

Program DropAllExceptItems;
{.include srl/srl.scar}

{*******************************************************************************
Procedure DropAllExcept(A : Array of Integer);
By: Sand Storm
Description: Drops everything except the user defined inventory spaces.
*******************************************************************************}

procedure DropAllExcept(A : Array of Integer);
var
i: Integer;
begin
If (Not (LoggedIn)) Then Exit;
For I:=1 To 28 Do
if not(InIntArray(a, i)) then
DropItem(i);
end;


Begin
setupsrl;
DropAllExcept([1]);
End.

The Procedure is the actual code, the Mainloop just shows how to use it. That would drop everything except the first inventory slot.


I have put that in my updated script. Thank you.

Sandstorm

2008-11-22 21:37:24

No problem. Feel free to pm me if you'd like some help/suggestions :).

Racko

2008-11-22 22:47:15

I got the unwanted tree error, but other than that it ran fine a while.

Mr_Bum

2008-11-23 07:38:42

UPDATED TO VERSION 1.2

Runs smoother and proggy is updated

LiveNDieHye

2008-11-23 09:49:57

trying it now

Mr_Bum

2008-11-25 05:17:01

UPDATED TO VERSION 1.3

Update includes - Better proggy (One for single player and one for multiplayer), Better FindTree procedure - Uses FindCustomObj instead of FindColorSprialTolerance.

Death-Magnetic

2008-11-25 13:54:34

Haven't used it, but looks good :D

poolikemax

2008-11-28 02:29:48

great script hav run for 10 mins seems fine! great work

Mr_Bum

2008-11-28 02:48:57

Updated to Version 1.4
Better tree finding. My own Drop Procedure, My own FindGained level procedure

snake bite

2008-11-28 08:54:11

I like it! Nice and simple, like how it detects levelup

snake bite

2008-11-30 12:16:41

Sorry for dubble post, but here is a little proggie

#%#%#%#%#%#%#% Power Cutter By Mr_Bum
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%
#% Time Running : 17 Minutes and 51 Seconds
#% Dropped 2 loads
#% Started on level: 26
#% Gained 2 Woodcutting levels
#% Ended on level 28

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| SRL 28 Randoms Report |
| www.srl-forums.com |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Fights : 2 |
| Talks : 1 |
| Ricks : 1 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

Mr_Bum

2008-12-01 02:43:54

lol. Ur the only one to post a proggy. And your the only non SRL Juinior Member. hahaha

Mr_Bum

2008-12-04 07:06:27

Sorry about double post.
UPDATED TO VERSION 1.5!

SirPa

2008-12-04 12:54:14

Top proggy? ^^

#%#%#%#%#%#%#%  Power Cutter By Mr_Bum  #%#%#%#%#%#%#%
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%
#% Time Running : 3 Hours, 21 Minutes and 6 Seconds
#% Dropped 60 loads
#% Dropped 1564 logs
#% Gained 7 Woodcutting levels
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%
#%#%#%#%##%#%#%#%#% POST PROGGIES #%#%#%#%#%#%#%#%#%#%



/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| SRL 28 Randoms Report |
| [url]www.srl-forums.com[/url] |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Fights : 10 |
| Talks : 1 |
| Certers Solved : 1 |
| Demons Solved : 1 |
| Boxes Solved : 10 |
| Ents Found : 1 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

Glad to help :)
Lvl's gained is more though, from 36-50 ;)


~Sir

JiveTonto@Gmail.com

2008-12-04 16:48:13

#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%
#% Time Running : 27 Minutes and 30 Seconds
#% Dropped 9 loads
#% Dropped 234 logs
#% Gained 0 Woodcutting levels
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%

JiveTonto@Gmail.com

2008-12-04 18:25:18

hetrs a nother one

#%#%#%#%#%#%#% Power Cutter By Mr_Bum #%#%#%#%#%#%#%
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%
#% Time Running : 1 Hours, 33 Minutes and 38 Seconds
#% Dropped 32 loads
#% Dropped 772 logs
#% Gained 1 Woodcutting levels
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%

/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| SRL 28 Randoms Report |
| www.srl-forums.com |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Fights : 6 |
| Talks : 2 |
| Jekylls : 1 |
| Capn Hands : 1 |
| Boxes Solved : 5 |
| Ents Found : 1 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

Mr_Bum

2008-12-05 01:32:45

UPDATED TO VERSION 1.6 Using griff721's findgainedlevel function again.
Cheers for proggies!

staffa

2008-12-05 05:24:22

good script, gone up 2 levles

JiveTonto@Gmail.com

2008-12-05 15:32:58

for me it doesnt seem to liek boxes it keeps logging out on them,and the dragon school thign as well but other than that a few tweeks to make mouse movement smoother was eneded and now shes mint

Mr_Bum

2008-12-05 18:07:27

Would you be able to help me out with that? PM me if you can. Cheers.

dre_bro11

2008-12-19 03:52:50

wat logs it do?

Mr_Bum

2008-12-20 06:57:01

Any. Just put in what ever tree you want it to cut.

hamish909

2008-12-20 08:23:29

Ok, ill test it out for you and see how it goes.

EDIT: Awesome script for a first timer I made a SMART version for you ill upload it in this post.

Couple of suggestions: Add in forms it saves typing out your name and it's nicer.

: Faster tree finding after you cut them down he doesn't do anything for a couple of seconds.

Apart from that good job and keep updating.

Pwnt by Pwnt

2008-12-21 02:53:27

sorry.. posted something then noticed you had it.. in a weird spot >.>