SRL Archive - RS3 Outdated / Broken Scripts

TViYH's PowerChopper


TViYH

2008-09-02 20:42:08

It's my first real script..Even though it's not a real script. Lol.

Pick the normal tree colors, start with an axe wielded or in inventory.
Start wherever there are normal trees.

It's only supposed to do 1 load right now..
I'm still updating it =]

Please test it for me.
v1.3- SRL Rev #24

-BETA
Created basic skeleton of script.

-v1.1
Added MultiPlayer.

-v1.2
Fixed minor mistakes.

-v1.3
Changed it to a Willow PowerChopper
Added AntiBan;

Future Updates
MultiPlayer - Done
AntiBan - Done
Draynor Willow Chopper/Banker


{.Script Info:
# ScriptName = PowerChopper v1.3
# Author = TheVoiceInYourHead
# Description =
# Version = 1.3
# Date = Sep. 02, 2008
# Comments =
/Script Info}

program PowerChopper;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Woodcutting.scar}

var
Logs, Ents, z: Integer;
Colors: TIntegerArray;

Procedure DeclarePlayers;

Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Colors := []; //Setup Willow Tree colors here

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;

Writeln( IntToStr ( HowManyPlayers ) + ' Players' );
End;

procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
5: DoEmote(400 +Random(90));
end;
end;

function waitChop: boolean;
var
i, c, x, y: Integer;
begin
if not LoggedIn then Exit;
i := InvCount;
MarkTime(c);
repeat
AntiBan;
FindNormalRandoms;
if FindEnt(x, y, True) then
Inc(Ents);
Wait(120);
until((InvCount>i) or (TimeFromMark(c) > 800000+random(60000)));
Result := True;
end;

function dropLogs: boolean;
var
x, y: Integer;
begin
if not LoggedIn then Exit;
repeat
Logs := Logs + CountItems(srl_GetBitmap(bmp_Log_Willow), 'bmp', [0])
ClickAllItems(srl_GetBitmap(bmp_Log_Willow), 'bmp', 'rop', 120, [0]);
until(not(FindBitmap(srl_GetBitmap(bmp_Log_Willow), x, y)));
Result := True;
end;

//Thanks to Cazax and Nava2 for help
function findTree(colors: tintegerarray): boolean;
var
MainTPA: TPointArray;
MainATPA, ColorTPA: T2DPointArray;
MainPoint: TPoint;
i, c, lingth: Integer;
begin
if not LoggedIn then Exit;
for c := 0 to High(colors) do
begin
FindColorsSpiralTolerance(MSCX, MSCY, ColorTPA[c], colors[c], MSX1, MSY1, MSX2, MSY2, 5);
MainTPA := CombineTPA(MainTPA, ColorTPA[c]);
end;
if Length(MainTPA)=0 then
begin
WriteLn('Pick new colors..');
TerminateScript;
end;
MainATPA := TPAtoATPAEx(MainTPA, 4, 4);
Lingth := High(MainATPA);
for i := 0 to Lingth do
begin
MainPoint := MiddleTPA(MainATPA[i]);
MMouse(MainPoint.x, MainPoint.y, 0, 0);
Wait(75 + Random(51));
if IsUpText('illow') then
begin
Mouse(MainPoint.x, MainPoint.y, 0, 0, False);
Wait(250 + Random(250));
Result := ChooseOption('hop');
If Result Then
Exit;
end;
end;
if Not Result Then
Writeln('No Tree');
end;

procedure Proggy;
begin
WriteLn('<><><><><>TViYH''s PowerChopper');
WriteLn('Total Ents: ' + IntToStr(Ents));
WriteLn('Total Logs: ' + IntToStr(Logs));
WriteLn('Total Time: ' + IntToStr((GetTimeRunning * 1000) * 60) + ' minutes');
end;

procedure MainLoop;
begin
if not LoggedIn then Exit;
if not FindAxe then
begin
WriteLn('No axe..');
TerminateScript;
end;
repeat
if findTree(Colors) then
begin
waitChop;
end;
until(InvFull);
dropLogs;
AntiBan;
Proggy;
end;

begin
SetupSRL;
DeclarePlayers;
ActivateClient;
for z := 0 to (HowManyPlayers-1) do
begin
LoginPlayer;
MainLoop;
NextPlayer(False);
end;
end.

Rubix

2008-09-02 21:34:27

looks good, like how you already know your standards, wish i woulda learnt themearly :s
-first post

TViYH

2008-09-02 22:07:53

Lol. Yeah. I'm a fairly advanced scripter =/

I just don't really care about RS anymore.
I've started like a hundred decent scripts, but never finish them b/c I get tired of RS..

jkmaster

2008-09-02 23:20:11

Lol if you get tired of RS try making a script thats useful for something else.

TViYH

2008-09-02 23:23:50

Like what?

P1nky

2008-09-02 23:24:51

a advance scripter should have antiban. and alot other proc's

TViYH

2008-09-02 23:30:09

Mate. It's v1.2.

Calm down.

I need testing so I can make sure this even works.

How about you test it and do this thread some good?

NiCbaZ

2008-09-03 03:04:27

looks good add some walking banking and some other stuff and apply for members.

TViYH

2008-09-03 14:57:43

Mk NiCbaZ.

I'm thinking of turning it into a Draynor Willer Chopper/Banker..

BjRobMan

2008-09-04 04:01:43

From: Rubix
looks good, like how you already know your standards, wish i woulda learnt themearly :s
-first post


Lol Pm the script i'll add standards to any script.

Btw downloading it now…Not to use but to learn, Thanks!

TViYH

2008-09-04 14:50:38

No problem. I'm in the process of updating it because of simple errors.

BjRobMan, if you need any help with learning, I can help =]