SRL Archive - RS3 Outdated / Broken Scripts

Teak PowerChopper


guyver

2008-10-30 04:30:45

HI all,
Well here is my first script as a Junior Member. Hope you post comments and such for it.
It is just a cutter and dropper on Ape Atoll. Why here? Well no randoms while you are the monkey, and yes sorry to say you need a monkey gree gree for this as well.
I have been using this for about two weeks now running it at different times in between using my character normally. It has so far raised me from lvl 78 to 86 WC and 92 to 93 FM…Enjoy!!

// This is an RS members script. It will power cut teak trees at ape atoll
// for the number of loads you specify at Players[0].Integers
// There is no check for randoms as you don't get any when
// in monkey form. Make sure axe is in inventory spot 1. This is the
// top left spot. Will not pick up birdnests.
// The Fire Making part is because I use an Inferno Adze to cut.

program TeakCutter;
{.include SRL/SRL.scar}

const
TeakTree = 6796443; //Use colour picker if it can't find teak trees

var
x, y, Tries, LoadsToDo, i: Integer;
CurrentTime, CurrentLevel, LevelsGained: Integer;
StartWCExp, StartFMExp, FinishWCExp, FinishFMExp: Integer;

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0] := 16; //number of loads to do
end;

procedure ProgressReport;
begin
ClearDeBug;
Writeln('[====================================================]');
Writeln('[===> Guyvers Teak Chopper') ;
Writeln('[===> Time script active '+ TimeRunning);
Writeln('[===> Number of loads done '+ IntToStr(LoadsToDo));
Writeln('[===> Starting Woodcutting Level ' + IntToStr(CurrentLevel));
Writeln('[===> Woodcutting EXP Start: ' + IntToStr(StartWCExp));
Writeln('[===> Woodcutting EXP Finish: ' + IntToStr(FinishWCExp));
Writeln('[===> Levels gained while running: ' +IntToStr(LevelsGained));
Writeln('[===================================================]');
Writeln('[===> FireMaking EXP Start: ' + IntToStr(StartFMExp));
Writeln('[===> FireMaking EXP Finish: ' + IntToStr(FinishFMExp));
Writeln('[===================================================]');
end;

procedure AntiBanme;
begin
case random(30) of // The larger the number the less AntiBann it does
0: GameTab(5 + Random(12));
1: BoredHuman;
2: begin
SetAngle(False); //Sets camera angle to low view
wait(10+random(10));
SetAngle(True); //Sets camera angle to high view
end;
3: HoverSkill('Woodcutting', False);
4: GameTab(2 + Random(12));
5: RandomMovement;
6: RandomRClick;
7: PickUpMouse;
end;
end;

// Credit to Oceans 1 for this procedure
// I have modified it for teaks and added
// an autologout preventer
procedure ChopTeaks;
begin
if (InvFull) or (not (LoggedIn)) then Exit;
repeat
if (FindColorTolerance(x, y, TeakTree, MSX1, MSY1, MSX2, MSY2, 10)) then
begin
MMouse(x, y, 1, 1);
wait(45 + Random(500));
if IsUpText('eak') then
begin
CurrentTime := 150; //used to stop auto logout when cutting one tree
Mouse(x, y, 1, 1, True); //for a long time
FFlag(0);
repeat
CurrentTime := CurrentTime - 1;
wait(200 + Random(300));
until (InvFull) or not (IsUpText('eak'))or (CurrentTime = 0);
end;
end else
begin
Wait(550 + Random(450));
Tries := Tries + 1;
if (Tries = 5) then
begin
Writeln('Failed to find the Teak Tree, Exiting');
Exit;
end;
Tries := 0;
end;
until (InvFull) or (FindBlackChatMessage('Your inventory is too full to hold anymore logs.'));
end;

procedure DropTeaks;
begin
for i:= 2 to 28 do
begin
DropItem(i);
end;
LoadsToDo := LoadsToDo + 1;
end;

//MAIN LOOP//
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
MoveToTray;
if not (LoggedIn) then
begin
LogInPlayer;
end;
LoadsToDo := 0
SetAngle(True);
SetRun(True);
MakeCompass('N');
StartWCExp := GetXP('Woodcutting');
StartFMExp := GetXP('Firemaking');
Wait(400 + Random(655));
CurrentLevel := GetSkillLevel('WoodCutting');
repeat
ChopTeaks;
AntiBanMe;
DropTeaks;
AntiBanMe;
FinishWCExp := GetXP('Woodcutting');
FinishFMExp := GetXP('Firemaking');
LevelsGained := ((GetSkillLevel('WoodCutting')) - CurrentLevel);
ProgressReport;
until (LoadsToDo = Players[CurrentPlayer].Integers[0])
Logout;
end.

:spot: :spot: :spot:

kingarabian

2008-10-30 04:40:16

Well well well… this is a unique one. The script looks pretty simple though.

Heavenzeyez1

2008-10-30 05:31:25

Standards are off.
~Eerik~

guyver

2008-10-30 07:27:07

From: heavenzeyez1
Standards are off.
~Eerik~


When you say standards are off what did you mean exactly by that? The way the script is written or the procedures used or what? Any explanation would be helpful.
Thanks.

Magiic

2008-10-30 10:58:18

the way it is set out as in


begin
–stuff
end;

with two spaces

guyver

2008-11-05 02:28:24

I've just updates my Teak Power Chopper. Corrected standards and added a proggy logging to a file. Please comment.


// This is an RS members script. It will power cut teak trees at ape atoll
// for the number of loads you specify at Players[0].Integers
// There is no check for randoms as you don't get any when
// in monkey form. Make sure axe is in inventory spot 1. This is the
// top left spot. Will not pick up birdnests. Included is a writing to a file
// for the saving of progress reports you can post. Just change the ProgFile
// name to the one you are using. Make sure it is in the same spot as this
// script.
// The Fire Making part is because I use an Inferno Adze to cut.

program TeakCutter;
{.include SRL/SRL.scar}

const
TeakTree = 6796443; //Use colour picker if it can't find teak trees
ProgFile = 'My Proggies.txt';

var
x, y, LoadsToDo: Integer;
CurrentLevel, LevelsGained: Integer;
StartWCExp, StartFMExp, FinishWCExp, FinishFMExp: Integer;
MyProggy, ProggyLength: Integer;
OldProggyText, DebugText: string;

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0] := 65; //number of loads to do
end;

procedure ReadProggy;
begin
if (FileExists(ScriptPath + ProgFile)) then
begin
MyProggy := OpenFile(ScriptPath + ProgFile, False);
if (MyProggy < 0) then
begin
WriteLn('Cannot Open File.');
end else
begin
ProggyLength := FileSize(MyProggy);
ReadFileString(MyProggy, OldProggyText, ProggyLength);
end;
end else
begin
WriteLn('No Such File Exists');
end;
CloseFile(MyProggy);
end;

procedure WriteProggy;
begin
if (FileExists(ScriptPath + ProgFile)) then
begin
MyProggy := RewriteFile(ScriptPath + ProgFile, False);
if (MyProggy < 0) then
begin
WriteLn('Cannot Open File.');
end else
begin
DebugText := GetDebugText; //gets the debug window text
Insert(DebugText, OldProggyText, ProggyLength); //adds new proggy to old proggy
WriteFileString(MyProggy, OldProggyText); //writes all to file
WriteFileString(MyProggy, TheDate(1) + ', ' + TheTime + ' ');
end;
end else
begin
WriteLn('No Such File Exists');
end;
CloseFile(MyProggy);
end;

procedure ProgressReport;
begin
ClearDeBug;
WriteLn(' ');
WriteLn(' ');
Writeln('[====================================================]');
Writeln('[===> Guyvers Teak Chopper') ;
Writeln('[===> Time script active '+ TimeRunning);
Writeln('[===> Number of loads done '+ IntToStr(LoadsToDo));
Writeln('[===> Starting Woodcutting Level ' + IntToStr(CurrentLevel));
Writeln('[===> Woodcutting EXP Start: ' + IntToStr(StartWCExp));
Writeln('[===> Woodcutting EXP Finish: ' + IntToStr(FinishWCExp));
Writeln('[===> Levels gained while running: ' +IntToStr(LevelsGained));
Writeln('[===================================================]');
Writeln('[===> FireMaking EXP Start: ' + IntToStr(StartFMExp));
Writeln('[===> FireMaking EXP Finish: ' + IntToStr(FinishFMExp));
Writeln('[===================================================]');
WriteLn(' ');
end;

procedure AntiBanme;
begin
case random(25) of // The larger the number the less AntiBann it does
0: GameTab(5 + Random(12));
1: BoredHuman;
2: begin
SetAngle(False); //Sets camera angle to low view
wait(10 + random(10));
SetAngle(True); //Sets camera angle to high view
end;
3: HoverSkill('Woodcutting', False);
4: GameTab(2 + Random(12));
5: RandomMovement;
6: RandomRClick;
7: PickUpMouse;
end;
end;

// Credit to Oceans 1 for this procedure
// I have modified it for teaks and added
// an autologout preventer
procedure ChopTeaks;
var
CurrentTime, Tries: Integer;

begin
if (InvFull) or (not (LoggedIn)) then Exit;
repeat
if (FindColorTolerance(x, y, TeakTree, MSX1, MSY1, MSX2, MSY2, 10)) then
begin
MMouse(x, y, 1, 1);
wait(45 + Random(500));
if IsUpText('eak') then
begin
CurrentTime := 120; //used to stop auto logout when cutting one tree
Mouse(x, y, 1, 1, True); //for a long time
FFlag(0);
repeat
CurrentTime := CurrentTime - 1;
wait(200 + Random(300));
until (InvFull) or not (IsUpText('eak'))or (CurrentTime = 0);
end;
end else
begin
Wait(550 + Random(450));
Tries := Tries + 1;
if (Tries = 5) then
begin
Writeln('Failed to find the Teak Tree, Exiting');
Exit;
end;
Tries := 0;
end;
until (InvFull) or (FindBlackChatMessage('Your inventory is too full to hold anymore logs.'));
end;

procedure DropTeaks;
var
i: Integer;

begin
for i:= 2 to 28 do
begin
DropItem(i);
end;
LoadsToDo := LoadsToDo + 1;
end;

//MAIN LOOP//
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
//MoveToTray;
if not (LoggedIn) then
begin
LogInPlayer;
end;
LoadsToDo := 0;
SetAngle(True);
SetRun(True);
MakeCompass('N');
StartWCExp := GetXP('Woodcutting');
StartFMExp := GetXP('Firemaking');
CurrentLevel := GetSkillInfo('Woodcutting', False);
Wait(400 + Random(655));
repeat
ChopTeaks;
AntiBanMe;
DropTeaks;
AntiBanMe;
FinishWCExp := GetXP('Woodcutting');
FinishFMExp := GetXP('Firemaking');
LevelsGained := ((GetSkillInfo('Woodcutting', False)) - CurrentLevel);
ProgressReport;
until (LoadsToDo = Players[CurrentPlayer].Integers[0])
ReadProggy;
WriteProggy;
Logout;
end.

:cartman: