SCAR Code:
{.Script Info:
-=ScriptName=- = SecretCutter
-=Author=- = HyperSecret
-=Description=- = Chops Trees behind Lumby Castle and drops them
-=Version=- = 0.10
-=Comments=- = SRL 4+
(C) 2007 Rip-It Productions
/Script Info}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
//
// * NAME : SecretCutter
// * WRITER : HyperSecret
// * CATEGORY : WoodCutting
// * DESCRIPTION : Chops Trees behind Lumby Castle and DROPS them
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
//
// * INSTRUCTIONS : Have Axe In Inventory, Not Wielded. Setup Players In DeclarePlayers.
// Players MUST be at trees BEHIND Lumby Castle.
// Must have a Tree Symbol, or Store symbol on Minimap for script to chop
//
// PS: Set The DidYouReadInstructions const to 'yes' to run script...
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
program SecretCutter;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
{.include SRL/SRL/skill/Fighting.scar}
var
x, y: integer;
LogDTM, GoodAxeDTM, BrokenAxeDTM, OakDTM: integer;
Chopped, Loads, TotalLoads, StartTime: integer;
const MySRLID = '';// Stats ID.
const MySRLPassword = '';//<-Your SRL Password here if you want to have yout stats logged
const DidYouReadInstructions = 'yes';// did you read the instuctions up there ^^ ?
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure DeclarePlayers;
begin
HowManyPlayers := 5;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLID := MySRLID;
SRLPassword := MySRLPassword;
Players[0].Name :='i put name here'; //Character name
Players[0].Pass :='and pass here'; //Character PAss
Players[0].Nick :='i put the first 3 letters of characrter'; //Nickname 3 Letter of char name
Players[0].Active := True;
Players[0].Loc := 'Trees';
Players[0].Integers[0] := 1; //how many loads for this player to chop
Players[0].Integers[1] := 0;
Players[0].Integers[2] := 0;
Players[0].Integers[3] := 0;
Players[1].Name :=''; //Character name
Players[1].Pass :=''; //Character PAss
Players[1].Nick :=''; //Nickname 3 Letter of char name
Players[1].Active := True;
Players[1].Loc := 'Trees';
Players[1].Integers[0] := 1; //how many loads for this player to chop
Players[1].Integers[1] := 0;
Players[1].Integers[2] := 0;
Players[1].Integers[3] := 0;
Players[2].Name :=''; //Character name
Players[2].Pass :=''; //Character PAss
Players[2].Nick :=''; //Nickname 3 Letter of char name
Players[2].Active := True;
Players[2].Loc := 'Trees';
Players[2].Integers[0] := 1; //how many loads for this player to chop
Players[2].Integers[1] := 0;
Players[2].Integers[2] := 0;
Players[2].Integers[3] := 0;
Players[3].Name :=''; //Character name
Players[3].Pass :=''; //Character PAss
Players[3].Nick :=''; //Nickname 3 Letter of char name
Players[3].Active := True;
Players[3].Loc := 'Trees';
Players[3].Integers[0] := 1; //how many loads for this player to chop
Players[3].Integers[1] := 0;
Players[3].Integers[2] := 0;
Players[3].Integers[3] := 0;
Players[4].Name :=''; //Character name
Players[4].Pass :=''; //Character PAss
Players[4].Nick :=''; //Nickname 3 Letter of char name
Players[4].Active := True;
Players[4].Loc := 'Trees';
Players[4].Integers[0] := 1; //how many loads for this player to chop
Players[4].Integers[1] := 0;
Players[4].Integers[2] := 0;
Players[4].Integers[3] := 0;
Writeln('Using '+ IntToStr(HowManyPlayers) +' Players.');
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure HyperSecretTAG;
begin
ClearDebug;
Writeln(' _ _ _____ _ ');
Writeln('| | | | / ___| | | ');
Writeln('| |_| |_ _ _ __ ___ _ __\ `--. ___ ___ _ __ ___| |_');
Writeln('| _ | | | | ''_ \ / _ \ ''__|`--. \/ _ \/ __| ''__/ _ \ __|');
Writeln('| | | | |_| | |_) | __/ | /\__/ / __/ (__| | | __/ |_ ');
Writeln('\_| |_/\__, | .__/ \___|_| \____/ \___|\___|_| \___|\__|');
Writeln(' __/ | | ');
Writeln(' |___/|_| ');
Writeln('HyperSecret''s PowerCutter!');
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
NextPlayer(true);
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
NextPlayer(false);
Exit;
end;
end;
9: RC;
10: Respond;
end;
wait(1);
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure FindRandoms;
begin
FindFastRandoms;
FindNormalRandoms;
if (InFight) or (FindFight) then
begin
RunAwayDirection('N');
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure LoadDTM;
begin
LogDTM := DTMFromString('78DA6374626260E062644006B921460CFF8 13' +
'448F43F10305A00D530A2AA81C8C24820EDC884C4C3A1C607 A8E6' +
'1F0361356C04CC0900AAE127A0C60EA84694801A4BA01A410 26A8' +
'C09DB050091CD09C3');
OakDTM := DTMFromString('78DA639CCEC4C0C0CDC8800CDA33ED19FE0 36' +
'990E87F2060EC01AA61445503918591401A640E030135F381 6AFE' +
'32E057B300A8868D80394B806AF809A8990054234A404D2F5 08D2' +
'001351D40350244A8E1C0AF0600D2900D8B');
BrokenAxeDTM := DTMFromString('78DA6374646260B8CD80023AD2F818FE036 94' +
'620FE0F048C164035EF18D000231209A4AD816A3E1050E306 5473' +
'97801A2FA09A8704D4F800D5DC27A0C613A8E60E0135DE403 5370' +
'8A8B127AC06000D091069');
GoodAxeDTM := DTMFromString('78DA63CC626260B8C380026AE3F818FE036 94' +
'620FE0F048C4940351F18D000231209A4538950530C54F390 809A' +
'72A09A7B04D49402D5DC20A006E4AFEBF8D50000353A0F2B' );
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function InstructionReader: boolean;
begin
if DidYouReadInstructions = 'no' then
begin
result := True;
Writeln('You DID NOT Read The Instructions, Please Read!');
TerminateScript;
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function IsAxeGood: boolean;
begin
if (FindDTM(GoodAxeDTM, x, y, MIx1, MIy1, MIx2, MIy2)) then
begin
FindRandoms;
result := True;
Writeln('We Have New, Good Axe!');
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function IsAxeBroke: boolean;
begin
if (FindDTM(BrokenAxeDTM, x, y, MIx1, MIy1, MIx2, MIy2)) then
begin
FindRandoms;
result := True;
Writeln('Axe Is Broken');
end
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function WeInLumby: boolean;
begin
if (FindSymbol(x, y, 'water')) and (not(FindSymbol(x, y, 'tree'))) then
begin
FindRandoms;
Players[CurrentPlayer].Loc := 'Lumbridge';
Result := True;
Writeln('In Lumby');
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function WeAtTrees: boolean;
begin
FindRandoms;
if (FindSymbol(x, y, 'tree')) or
(FindSymbol(x, y, 'store')) or
(FindSymbol(x, y, 'dungeon')) then
begin
Players[CurrentPlayer].Loc := 'Trees';
Result := True;
Writeln('Currently At Trees');
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function WeAreLost: boolean;
begin
if (not(WeInLumby)) and (not(WeAtTrees)) then
begin
If (not(LoggedIn)) then LoginPlayer;
FindRandoms;
Players[CurrentPlayer].Loc := 'Lost';
Result := True;
NextPlayer(false);
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function AxeIsBroken: boolean;
begin
if IsAxeBroke and (not(WeInLumby))and WeAtTrees then
begin
result := True;
Writeln('Axe Is Broken');
Players[CurrentPlayer].Loc := 'Broken Axe';
NextPlayer(false);
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
function UberEnt: Boolean; //by Nashi, Edited By HyperSecret
begin
if (FindColorTolerance(x, y, 383705, 9, 9, 233, 24, 20)) or
(FindColorTolerance(x, y, 65535, 9, 9, 233, 24, 20)) then
begin
GetMousePos(x, y);
Mouse(x, y, 5, 5, False);
if (FindText(x, y, 'Chop down', upchars, x - 50, y - 50, x + 100, y + 50)) then
begin
if (FindColor(x, y, 65535, x + 70, y, x + 100, y + 10)) then
begin
Mouse(MMCX, MMCY, 5, 5, True);
Writeln('Found ent! Waiting for it to go away');
Result := True;
EntsAvoided := EntsAvoided + 1;
end;
end else
ChooseOption('Cancel');
FindRandoms;
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure DropThemLogs;
begin
repeat
begin
if (FindDTM(LogDTM, x, y, MIx1, MIy1, MIx2, MIy2)) or
(FindDTM(OakDTM, x, y, MIx1, MIy1, MIx2, MIy2)) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('Drop');
end;
end;
until (not(FindDTM(LogDTM, x, y, MIx1, MIy1, MIx2, MIy2))) and (not(FindDTM(OakDTM, x, y, MIx1, MIy1, MIx2, MIy2)));
Loads := Loads + 1;
TotalLoads := TotalLoads + 1;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] + 1;
ReportVars[1] := ReportVars[1] + 1;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure Chopping;
var
TimeToCut, TC: Integer;
TreeColors: array[0..9] of integer;
begin
TreeColors[0] := 1787205;
TreeColors[1] := 2970958;
TreeColors[2] := 2176309;
TreeColors[3] := 2576205;
TreeColors[4] := 1196085;
TreeColors[5] := 2051651;
TreeColors[6] := 1649451;
TreeColors[7] := 2713177;
TreeColors[8] := 4023131;
TreeColors[9] := 1798755;
MarkTime(TimeToCut);
if (not(AxeIsBroken)) and (not(WeAreLost)) and WeAtTrees then
for TC := 0 to 9 do
begin
If (FindObj(x, y, 'Tree', TreeColors[TC], 15)) and (not(UberEnt)) then
begin
MMouse(x, y, 0, 0);
if(IsUpTextMulti('Tree', 'ree', 'Chop down'))then
begin
if IsUpText('patch') then
begin
Mouse(MMCX, MMCY, 5, 5, true);
end else
case Random(2) of
0: begin
Mouse(x, y, 0, 0, true);
end;
1: begin
Mouse(x, y, 0, 0, false);
ChooseOption('hop');
end;
end;
Players[CurrentPlayer].Integers[3] := Players[CurrentPlayer].Integers[3] + 1;
ReportVars[0] := ReportVars[0] + 1;
Chopped := Chopped + 1;
begin
SleepAndMoveMouse(500 + random(500));
end;
Wait(500+random(500));
end;
FindRandoms;
end;
end;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
if Players[CurrentPlayer].Active = True then
Active:='In Use'
else
Active:='Not In Use';
Writeln('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
Writeln(' Player Name : '+ Players[CurrentPlayer].Name);
Writeln(' Player Number : '+inttostr(CurrentPlayer));
Writeln(' Active : '+ Active);
if ( Players[CurrentPlayer].Worked > 0 ) then
Writeln(' Worked : '+ inttostr(Players[CurrentPlayer].Worked) +' min.');
Writeln('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
GetAllLevels;
for i := 0 to HowManyPlayers - 1 do
begin
if Players[i].Active = True then Active:='T' else Active:='F';
Writeln( ' ' + Inttostr (I) + ' : Nick : ' + Players[i].Nick + ' = ' + Active
+'. - WC Lvl : '
+' '+inttostr(Players[i].level[20])+'. '
+'W : '+IntToStr(Players[i].Worked)+' min. '
+'D : '+ IntToStr(Players[i].integers[2]) +' Loads. '
+'C : '+IntToStr(Players[i].Integers[3]) +' Logs. '
+'L : '+ Players[i].Loc);
end
Writeln('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
Procedure ProgressReport;
var Sec, ChopRate: integer;
begin
Sec:= (1+((Getsystemtime-StartTime)/1000));
ChopRate:=(3600*(Chopped))/(Sec);
ClearDebug;
SRLRandomsReport;
Writeln(' ');
Writeln('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
Writeln(' -= SecretCutter vBETA -Progress Report- By : HyperSecret =-');
Writeln('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
Writeln(' Worked for '+ TimeRunning);
Writeln(' Total # of Loads '+inttostr(TotalLoads));
Writeln(' Total # of Logs Cut '+inttostr(Chopped)+' at the rate of '+IntToStr(ChopRate)+' per hour.');
PlayerStats;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure SetUp;
begin
InstructionReader;
SetupSRL;
ScriptID := '311';
HyperSecretTAG;
DeclarePlayers;
if(not(loggedin))then LoginPlayer;
LoadDTM;
StartTime := GetSystemTime;
end;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
begin
Setup;
TotalLoads := 0;
Chopped := 0;
repeat
if(not(loggedin))then LoginPlayer;
repeat
HighestAngle;
SetRun(True);
begin
repeat
if (not(LoggedIn)) then LoginPlayer;
Chopping;
FindRandoms;
until(InvFull)
end;
DropThemLogs;
until(Loads >= Players[CurrentPlayer].Integers[0])
begin
Players[CurrentPlayer].Integers[1] := 0;
nextplayer(true);
Loads := 0;
end;
ProgressReport;
until(False)
end.