SRL Archive - Archive

Heavenguard - SRL Member Application


Heavenguard

2010-07-25 23:13:34

How Long have You Played Runescape?
2 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Only Pascal [From Learning SCAR].


Are you a member of any other communities?
No.


Tell us about yourself…
From: Heavenguard
I Like to Script for Runescape. I like MMA and UFC. I really enjoy practicing martial arts. I like animals, I hate annoying people, and I am very straight-forward. I Exercise everyday, Im *Currently* unemployed, and I only wish to continue learning as much as I can about code. I will strive at making the best scripts that I possibly can make, and I will not let anyone down.



Please show us one (or multiple) of your scripts.
{My first simba script, Varrock East Mine + Banker , Re-Done}
program HMS;
{$DEFINE SMARt}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
//{$i srl/srl/misc/debug.scar}

// Made in Honor of Cigue.

{Big Thank you to my Buddies Coh3n [AutoColors], Wizzup[IRC-Simba Help],
and of course ZephyrsFury[MSN Help]. Another Thank you to ILuffsYews for his
IRC Help with Reflection. This script was Resurrected as a Celebration of
MSI Pheonix.}

{Global Constants}
const
ReflectionWorking = True; // If Reflection is not working, make it False.
VersionNumber = '1.00'; // No Need to Touch.

{Global Variables}
var
DDTMTolerance : Integer;

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

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
Integers[0] := 10; // Set the Amount of Loads the Player Banks.
Integers[1] := 2; // Max Seconds to Wait while Mining an Ore.
Integers[2] := 10; // How Many Minutes should this player take a break for?
Integers[3] := 5; // After How Many Loads Should this Player take a Break?
Strings[0] := 'Iron'; // Ore to Mine, Valid Arguments = ['Iron','Copper','Tin'].
Booleans[0] := False; // True if Pickaxe is Equipped, False if not.
//If False, Keep Pickaxe in First Inventory Slot!
Booleans[1] := True; // Player Takes Breaks? True for Yes, False for no.
end;

// To Use more then 1 Player, Take out the { sign next to with .. do.
{with Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
Integers[0] := 10; // Set the Amount of Loads the Player Banks.
Integers[1] := 2; // Max Seconds to Wait while Mining an Ore.
Integers[2] := 10; // How Many Minutes should this player take a break for?
Integers[3] := 5; // After How Many Loads Should this Player take a Break?
Strings[0] := 'Iron'; // Ore to Mine, Valid Arguments = ['Iron','Copper','Tin'].
Booleans[0] := False; // True if Pickaxe is Equipped, False if not.
//If False, Keep Pickaxe in First Inventory Slot!
Booleans[1] := True; // Player Takes Breaks? True for Yes, False for no.
end;

{with Players[2] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
Integers[0] := 10; // Set the Amount of Loads the Player Banks.
Integers[1] := 2; // Max Seconds to Wait while Mining an Ore.
Integers[2] := 10; // How Many Minutes should this player take a break for?
Integers[3] := 5; // After How Many Loads Should this Player take a Break?
Strings[0] := 'Iron'; // Ore to Mine, Valid Arguments = ['Iron','Copper','Tin'].
Booleans[0] := False; // True if Pickaxe is Equipped, False if not.
//If False, Keep Pickaxe in First Inventory Slot!
Booleans[1] := True; // Player Takes Breaks? True for Yes, False for no.
end;

{with Players[3] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
Integers[0] := 10; // Set the Amount of Loads the Player Banks.
Integers[1] := 2; // Max Seconds to Wait while Mining an Ore.
Integers[2] := 10; // How Many Minutes should this player take a break for?
Integers[3] := 5; // After How Many Loads Should this Player take a Break?
Strings[0] := 'Iron'; // Ore to Mine, Valid Arguments = ['Iron','Copper','Tin'].
Booleans[0] := False; // True if Pickaxe is Equipped, False if not.
//If False, Keep Pickaxe in First Inventory Slot!
Booleans[1] := True; // Player Takes Breaks? True for Yes, False for no.
end;

{To Add More Players, Copy and Paste a With .. Do Statement just above this,
and change the Player Number. Example: Players[4]}

end;

procedure Antiban;
begin
case Random(70) of
0: RandomRClick;
1: HoverSkill('mining', False);
2: PickUpMouse;
4: RandomMovement;
5: BoredHuman;
6: ExamineInv;
end;
end;

function Breaking : Integer;
begin
if Players[CurrentPlayer].Booleans[1] = True then
begin
if Players[CurrentPlayer].Banked Mod Players[CurrentPlayer].Integers[3] = 0 then
begin
Result := Players[CurrentPlayer].Integers[2];
LogOut;
Wait(Result * 60000);
LoginPlayer;
Inc(Players[CurrentPlayer].Worked);
end;
end;
end;

{************************************ Color ***********************************}

{AutoColor Functions}
function IronOreColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.13);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 2041922, MSX1, MSY1, MSX2, MSY2, 8);
if (Length(arP) = 0) then
begin
{Writeln('Failed to find the color, no result.');}
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.33) and (X <= 6.14) and (Y >= 1.21) and (Y <= 5.19) and (Z >= 0.90) and (Z <= 3.51) then
begin
Result := arC[i];
{Writeln('AutoColor = ' + IntToStr(arC[i]));}
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
{if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');}
end;

function CopperOreColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.06);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 3891080, MSX1, MSY1, MSX2, MSY2, 10);
if (Length(arP) = 0) then
begin
{Writeln('Failed to find the color, no result.');}
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 8.66) and (X <= 23.73) and (Y >= 7.94) and (Y <= 21.55) and (Z >= 3.54) and (Z <= 9.23) then
begin
Result := arC[i];
{Writeln('AutoColor = ' + IntToStr(arC[i]));}
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
{if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');}
end;

function TinOreColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.16, 0.07);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 7105907, MSX1, MSY1, MSX2, MSY2, 20);
if (Length(arP) = 0) then
begin
{Writeln('Failed to find the color, no result.');}
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 4.46) and (X <= 34.31) and (Y >= 4.59) and (Y <= 35.39) and (Z >= 4.91) and (Z <= 37.38) then
begin
Result := arC[i];
{Writeln('AutoColor = ' + IntToStr(arC[i]));}
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
{if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');}
end;

{DDTM}

function SetDDTM(Number : Integer) : Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array of TDTMPointDef;
TempTDTM: TDTM;
begin
case Number of
1:
begin
SetArrayLength(dtmSubPoints, 4);
dtmMainPoint.x := 949;
dtmMainPoint.y := 217;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := AutoColor(SRL_VarrockRoadColor);
dtmMainPoint.Tolerance := DDTMTolerance;

dtmSubPoints[0].x := 949;
dtmSubPoints[0].y := 217;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[0].Tolerance := DDTMTolerance;

dtmSubPoints[1].x := 942;
dtmSubPoints[1].y := 211;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[1].Tolerance := DDTMTolerance;

dtmSubPoints[2].x := 969;
dtmSubPoints[2].y := 244;
dtmSubPoints[2].AreaSize := 6;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[2].Tolerance := DDTMTolerance;

dtmSubPoints[3].x := 967;
dtmSubPoints[3].y := 227;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[3].Tolerance := DDTMTolerance;
end;

2:
begin
SetArrayLength(dtmSubPoints, 5);
dtmMainPoint.x := 874;
dtmMainPoint.y := 226;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := AutoColor(SRL_VarrockRoadColor);
dtmMainPoint.Tolerance := 15;

dtmSubPoints[0].x := 874;
dtmSubPoints[0].y := 226;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[0].Tolerance := 15;

dtmSubPoints[1].x := 973;
dtmSubPoints[1].y := 235;
dtmSubPoints[1].AreaSize := 8;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_LightDirtRoadColor);
dtmSubPoints[1].Tolerance := 15;

dtmSubPoints[2].x := 928;
dtmSubPoints[2].y := 229;
dtmSubPoints[2].AreaSize := 8;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_LightDirtRoadColor);
dtmSubPoints[2].Tolerance := 15;

dtmSubPoints[3].x := 918;
dtmSubPoints[3].y := 285;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 909;
dtmSubPoints[4].y := 207;
dtmSubPoints[4].AreaSize := 4;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[4].Tolerance := 15;
end;

3:
begin
SetArrayLength(dtmSubPoints, 3);
dtmMainPoint.x := 961;
dtmMainPoint.y := 239;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := AutoColor(SRL_VarrockRoadColor);
dtmMainPoint.Tolerance := DDTMTolerance;

dtmSubPoints[0].x := 961;
dtmSubPoints[0].y := 239;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[0].Tolerance := DDTMTolerance;

dtmSubPoints[1].x := 892;
dtmSubPoints[1].y := 219;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[1].Tolerance := DDTMTolerance;

dtmSubPoints[2].x := 884;
dtmSubPoints[2].y := 239;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[2].Tolerance := DDTMTolerance;
end;

4:
begin
SetArrayLength(dtmSubPoints, 11);
dtmMainPoint.x := 937;
dtmMainPoint.y := 337;
dtmMainPoint.AreaSize := 5;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := AutoColor(SRL_VarrockRoadColor);
dtmMainPoint.Tolerance := 15;

dtmSubPoints[0].x := 937;
dtmSubPoints[0].y := 337;
dtmSubPoints[0].AreaSize := 5;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[0].Tolerance := 15;

dtmSubPoints[1].x := 944;
dtmSubPoints[1].y := 312;
dtmSubPoints[1].AreaSize := 2;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[1].Tolerance := 15;

dtmSubPoints[2].x := 932;
dtmSubPoints[2].y := 298;
dtmSubPoints[2].AreaSize := 6;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[2].Tolerance := 15;

dtmSubPoints[3].x := 926;
dtmSubPoints[3].y := 276;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 911;
dtmSubPoints[4].y := 276;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[4].Tolerance := 15;

dtmSubPoints[5].x := 897;
dtmSubPoints[5].y := 275;
dtmSubPoints[5].AreaSize := 5;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[5].Tolerance := 15;

dtmSubPoints[6].x := 928;
dtmSubPoints[6].y := 259;
dtmSubPoints[6].AreaSize := 2;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[6].Tolerance := 15;

dtmSubPoints[7].x := 937;
dtmSubPoints[7].y := 243;
dtmSubPoints[7].AreaSize := 2;
dtmSubPoints[7].AreaShape := 0;
dtmSubPoints[7].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[7].Tolerance := 15;

dtmSubPoints[8].x := 889;
dtmSubPoints[8].y := 276;
dtmSubPoints[8].AreaSize := 2;
dtmSubPoints[8].AreaShape := 0;
dtmSubPoints[8].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[8].Tolerance := 15;

dtmSubPoints[9].x := 873;
dtmSubPoints[9].y := 275;
dtmSubPoints[9].AreaSize := 2;
dtmSubPoints[9].AreaShape := 0;
dtmSubPoints[9].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[9].Tolerance := 15;

dtmSubPoints[10].x := 860;
dtmSubPoints[10].y := 275;
dtmSubPoints[10].AreaSize := 2;
dtmSubPoints[10].AreaShape := 0;
dtmSubPoints[10].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[10].Tolerance := 15;
end;

5:
begin
SetArrayLength(dtmSubPoints, 9);
dtmMainPoint.x := 883;
dtmMainPoint.y := 290;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 6842471;
dtmMainPoint.Tolerance := 500;

dtmSubPoints[0].x := 883;
dtmSubPoints[0].y := 290;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 6842471;
dtmSubPoints[0].Tolerance := 500;

dtmSubPoints[1].x := 889;
dtmSubPoints[1].y := 320;
dtmSubPoints[1].AreaSize := 8;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_MineRockColor);
dtmSubPoints[1].Tolerance := 15;

dtmSubPoints[2].x := 908;
dtmSubPoints[2].y := 286;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[2].Tolerance := 15;

dtmSubPoints[3].x := 926;
dtmSubPoints[3].y := 321;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 933;
dtmSubPoints[4].y := 259;
dtmSubPoints[4].AreaSize := 4;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[4].Tolerance := 15;

dtmSubPoints[5].x := 912;
dtmSubPoints[5].y := 234;
dtmSubPoints[5].AreaSize := 4;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[5].Tolerance := 15;

dtmSubPoints[6].x := 863;
dtmSubPoints[6].y := 312;
dtmSubPoints[6].AreaSize := 7;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := AutoColor(SRL_MineRockColor);
dtmSubPoints[6].Tolerance := 15;

dtmSubPoints[7].x := 900;
dtmSubPoints[7].y := 314;
dtmSubPoints[7].AreaSize := 8;
dtmSubPoints[7].AreaShape := 0;
dtmSubPoints[7].Color := AutoColor(SRL_MineRockColor);
dtmSubPoints[7].Tolerance := 15;

dtmSubPoints[8].x := 866;
dtmSubPoints[8].y := 290;
dtmSubPoints[8].AreaSize := 6;
dtmSubPoints[8].AreaShape := 0;
dtmSubPoints[8].Color := AutoColor(SRL_MineRockColor);
dtmSubPoints[8].Tolerance := 15;
end;

6:
begin
SetArrayLength(dtmSubPoints, 10);
dtmMainPoint.x := 900;
dtmMainPoint.y := 298;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 1721433;
dtmMainPoint.Tolerance := 500;

dtmSubPoints[0].x := 900;
dtmSubPoints[0].y := 298;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 1721433;
dtmSubPoints[0].Tolerance := 500;

dtmSubPoints[1].x := 921;
dtmSubPoints[1].y := 282;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[1].Tolerance := 15;

dtmSubPoints[2].x := 933;
dtmSubPoints[2].y := 297;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[2].Tolerance := 15;

dtmSubPoints[3].x := 940;
dtmSubPoints[3].y := 317;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 926;
dtmSubPoints[4].y := 268;
dtmSubPoints[4].AreaSize := 4;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[4].Tolerance := 15;

dtmSubPoints[5].x := 944;
dtmSubPoints[5].y := 246;
dtmSubPoints[5].AreaSize := 4;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[5].Tolerance := 15;

dtmSubPoints[6].x := 927;
dtmSubPoints[6].y := 228;
dtmSubPoints[6].AreaSize := 4;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[6].Tolerance := 15;

dtmSubPoints[7].x := 940;
dtmSubPoints[7].y := 231;
dtmSubPoints[7].AreaSize := 4;
dtmSubPoints[7].AreaShape := 0;
dtmSubPoints[7].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[7].Tolerance := 15;

dtmSubPoints[8].x := 933;
dtmSubPoints[8].y := 266;
dtmSubPoints[8].AreaSize := 4;
dtmSubPoints[8].AreaShape := 0;
dtmSubPoints[8].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[8].Tolerance := 15;

dtmSubPoints[9].x := 922;
dtmSubPoints[9].y := 221;
dtmSubPoints[9].AreaSize := 3;
dtmSubPoints[9].AreaShape := 0;
dtmSubPoints[9].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[9].Tolerance := 15;
end;

7:
begin
SetArrayLength(dtmSubPoints, 10);
dtmMainPoint.x := 885;
dtmMainPoint.y := 296;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 1721433;
dtmMainPoint.Tolerance := 500;

dtmSubPoints[0].x := 885;
dtmSubPoints[0].y := 296;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 1721433;
dtmSubPoints[0].Tolerance := 500;

dtmSubPoints[1].x := 920;
dtmSubPoints[1].y := 282;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[1].Tolerance := 15;

dtmSubPoints[2].x := 935;
dtmSubPoints[2].y := 306;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[2].Tolerance := 15;

dtmSubPoints[3].x := 928;
dtmSubPoints[3].y := 268;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 944;
dtmSubPoints[4].y := 244;
dtmSubPoints[4].AreaSize := 4;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[4].Tolerance := 15;

dtmSubPoints[5].x := 924;
dtmSubPoints[5].y := 228;
dtmSubPoints[5].AreaSize := 4;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[5].Tolerance := 15;

dtmSubPoints[6].x := 932;
dtmSubPoints[6].y := 298;
dtmSubPoints[6].AreaSize := 4;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[6].Tolerance := 15;

dtmSubPoints[7].x := 945;
dtmSubPoints[7].y := 318;
dtmSubPoints[7].AreaSize := 4;
dtmSubPoints[7].AreaShape := 0;
dtmSubPoints[7].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[7].Tolerance := 15;

dtmSubPoints[8].x := 963;
dtmSubPoints[8].y := 323;
dtmSubPoints[8].AreaSize := 4;
dtmSubPoints[8].AreaShape := 0;
dtmSubPoints[8].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[8].Tolerance := 15;

dtmSubPoints[9].x := 934;
dtmSubPoints[9].y := 229;
dtmSubPoints[9].AreaSize := 4;
dtmSubPoints[9].AreaShape := 0;
dtmSubPoints[9].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[9].Tolerance := 15;
end;

end;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

{procedures / functions}

procedure VarrockCLRMineOre;
var
X, Y : Integer;
TimeLimit : Integer;
RockTPA : TPointArray;
RockATPA: T2DPointArray;
InventoryCheck : Integer;
RockColor : Integer;
begin
FindNormalRandoms;
if not LoggedIn then Exit;
InventoryCheck := InvCount;
Antiban;
ColorToleranceSpeed(1);
SetRun(True);
SetAngle(True);
case Players[CurrentPlayer].Strings[0] of
'Iron': RockColor := IronOreColor;
'Copper': RockColor := CopperOreColor;
'Tin': RockColor := TinOreColor;
end;
FindColorsSpiralTolerance(X, Y, RockTPA, RockColor, MSX1, MSY1, MSX2, MSY2, 7);
if (Length(RockTPA) >= 5) then
begin
SortTPAFrom(RockTPA, Point(MSCX, MSCY));
RockATPA := TPAtoATPAEx(RockTPA, 20, 10);
MiddleTPAEx(RockATPA[0], X, Y);
MMouse(X, Y, 4, 4);
if WaitUpTextMulti(['ine', 'ron'], 300) then
begin
Mouse(X, Y, 4, 4, True);
TimeLimit := 0;
while not InvCount = InventoryCheck + 1 do
begin
IncEx(TimeLimit, 100);
Wait(TimeLimit);
if TimeLimit >= Players[CurrentPlayer].Integers[1] * 1000 then
Break;
end;
end;
end;
end;

function VarrockCLRFixPlayer : Boolean;
var
TheDDTM : Integer;
X, Y : Integer;
NearbyRock : String;
begin
if not LoggedIn then Exit;
DDTMTolerance := 10;
NearbyRock := Players[CurrentPlayer].Strings[0];
case NearbyRock of
'Iron': TheDDTM := SetDDTM(5);
'Copper': TheDDTM := SetDDTM(6);
'Tin': TheDDTM := SetDDTM(7);
end;
repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
IncEx(DDTMTolerance, 5)
else
begin
Mouse(X, Y + 10, 3, 3, True);
Flag;
DDTMTolerance := 10;
Result := True;
Break;
end;
until DDTMTolerance >= 50;
DDTMTolerance := 10;
FreeDTM(TheDDTM);
end;

procedure VarrockCLRWalk(Destination : String);
var
X, Y : Integer;
BankerDots : Integer;
TheDDTM : Integer;
TimeLimit : Integer;
begin
case Destination of

'Bank':
begin
if not LoggedIn then Exit;
MarkTime(TimeLimit);
ClickNorth(True);
DDTMTolerance := 15;
TheDDTM := SetDDTM(5);
repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
IncEx(DDTMTolerance, 5)
else
begin
Mouse(X, Y + 10, 3, 3, True);
Flag;
DDTMTolerance := 10;
Break;
end;
until DDTMTolerance >= 50;
DDTMTolerance := 10;
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(1);
repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
IncEx(DDTMTolerance, 5)
else
begin
Mouse(X, Y, 4, 4, True);
Flag;
Break;
end;
until (DDTMTolerance = 50) or (TimeFromMark(TimeLimit) >= 15000);
DDTMTolerance := 15;
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(2);
repeat
if RadialWalkAutoColor(0, 345, 370, 74, 1, 1) then
Flag;
until (DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) or (TimeFromMark(TimeLimit) >= 30000);
while not RS_OnMinimap(X, Y) do
begin
Inc(Y);
Inc(X);
end;
Mouse(X, Y + Random(10), 4, 4, True);
Flag;
Wait(1000 + Random(400));
FreeDTM(TheDDTM);
BankerDots := DTMFromString('78DA639CCACCC060C4C8800C1E3D7AC4F0052' +
'804136504A9B180F058A0627FFE3041E4606A6612A1662E508D25013' +
'5138830A797B01A00885D127E');

RadialWalkAutoColor(0, 256, 274, 60, 1, 1);
if not (DTMRotated(BankerDots, X, Y, MMX1, MMCY, MMX2, MMY2)) or (FindSymbol(X, Y, 'bank')) then
repeat
if RadialWalkAutoColor(0, 256, 274, 50, 1, 1) then
Wait(780);
until (DTMRotated(BankerDots, X, Y, MMX1, MMCY, MMX2, MMY2)) or (FindSymbol(X, Y, 'bank'));
while not RS_OnMinimap(X, Y) do
begin
Dec(Y);
Inc(X);
end;
Mouse(X + 6, Y, 4, 4, True);
Flag;
FreeDTM(BankerDots);
end;

'MiningArea':
begin
if not LoggedIn then Exit;
MarkTime(TimeLimit);
ClickNorth(True);
DDTMTolerance := 15;
TheDDTM := SetDDTM(3);
repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMCY) then
IncEx(DDTMTolerance, 5)
else
begin
while not RS_OnMinimap(X, Y) do
begin
Dec(X);
Inc(Y);
end;
Mouse(X, Y + Random(10), 4, 4, True);
Flag;
Break;
end;
until (DDTMTolerance = 50) or (TimeFromMark(TimeLimit) >= 15000);
DDTMTolerance := 15;
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(4);
repeat
if RadialWalkAutoColor(0, 78, 103, 64, 1, 1) then
Wait(1000);
until (DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) or (TimeFromMark(TimeLimit) >= 30000);
while not RS_OnMinimap(X, Y) do
begin
Dec(X);
Dec(Y);
end;
Mouse(X, Y, 4, 4, True);
Wait(500);
if not FlagPresent then
MFF(X, Y, 1, 1);
Flag;
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(5);
SymbolAccuracy := 0.5;
RadialWalkAutoColor(0, 160, 183, 66, 1, 1);
RadialWalkAutoColor(0, 164, 188, 61, 1, 1);
repeat
RadialWalkAutoColor(0, 164, 188, 61, 1, 1);
MFF(X, Y, 1, 1);
until (DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) or (FindSymbol(X, Y, 'mine')) or (TimeFromMark(TimeLimit) >= 45000);
if not (DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
while not RS_OnMinimap(X, Y) do
begin
Dec(Y);
Inc(X);
end;
Mouse(X, Y, 4, 4, True);
Flag;
FreeDTM(TheDDTM);
SymbolAccuracy := 1.0;
end else
begin
Mouse(X, Y, 4, 4, True);
Flag;
FreeDTM(TheDDTM);
SymbolAccuracy := 1.0;
end;
MarkTime(TimeLimit);
Wait(1500);
if VarrockCLRFixPlayer then Exit;
end;
end;
end;

procedure VarrockCLRBank;
var
Attempts : Integer;
TotalAttempts : Integer;
begin
for TotalAttempts := 0 to 3 do
begin
if not LoggedIn then Exit;
Wait(1200 + Random(3000));
OpenBank('veb', False, False);
Wait(900 + Random(1000));
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
if not BankScreen then
for Attempts := 0 to 3 do
begin
InPin(Players[CurrentPlayer].Pin);
if BankScreen then Break;
end;
if Players[CurrentPlayer].Booleans[0] = True then
DepositAll;
if Players[CurrentPlayer].Booleans[0] = False then
Deposit(2, 28, True);
Inc(Players[CurrentPlayer].Banked);
if not InvFull then
Break;
end;
end;

{*********************************Reflection***********************************}
function VarrockRFLTMineOre : String; // Obj Hooks are Outdated.
var
RockType : TRSObjectArray;
AnimationTime : Integer;
begin
R_FindRandoms;
case Result of
'Iron': RockType := GetObjectsByID([11954, 11557, 11956, 11556, 11555, 11955], OBJECT_TYPE_INTERACTABLE, 25);
'Copper': RockType := GetObjectsByID([11954, 11557, 11956, 11556, 11555, 11955], OBJECT_TYPE_INTERACTABLE, 25);
'Tin': RockType := GetObjectsByID([11954, 11557, 11956, 11556, 11555, 11955], OBJECT_TYPE_INTERACTABLE, 25);
end;
if Length(RockType) >= 1 then
begin
Mouse(RockType[0].Tile.x, RockType[0].Tile.y, 3, 3, True);
while GetAnimation = 624 do
begin
if (AnimationTime >= 30) then
Break;
Inc(AnimationTime);
Wait(1000);
end;
end;
end;

function VarrockRFLTLoadPath(Path : String) : TTileArray;
begin
case Path of

'Bank':
begin
SetLength(Result, 7);
Result := [Tile(3293, 3381), Tile(3291, 3396), Tile(3289, 3410),
Tile(3286, 3422), Tile(3276, 3428), Tile(3262, 3428),
Tile(3254, 3420)];
end;

'MiningArea':
begin
SetLength(Result, 8);
Result := [Tile(3261, 3428), Tile(3276, 3428), Tile(3287, 3422),
Tile(3291, 3407), Tile(3292, 3391), Tile(3293, 3383),
Tile(3290, 3374), Tile(3286, 3368)];
end;

end;
end;

function VarrockRFLTFixPlayer : String;
begin
Result := Players[CurrentPlayer].Strings[0];
case Result of
'Iron': WalkToTile(Tile(3286, 3368), 0, 0);
'Copper': WalkToTile(Tile(3288, 3363), 0, 0);
'Tin': WalkToTile(Tile(3283, 3363), 0, 0);
end;
end;


procedure VarrockRFLTWalk(Destination : String);
begin
R_MakeCompass('N');
case Destination of
'Bank':
begin
WalkPath(VarrockRFLTLoadPath('Bank'));
end;
'MiningArea':
begin
WalkPath(VarrockRFLTLoadPath('MiningArea'));
end;
end;
end;

procedure VarrockRFLTBank; // procedure seems to not work.
var
Attempts : Integer;
begin
R_OpenBankBooth('veb');
if R_PinScreen then
InPin(Players[CurrentPlayer].Pin);
if not R_BankScreen then
for Attempts := 0 to 3 do
begin
InPin(Players[CurrentPlayer].Pin);
if R_BankScreen then Break;
end;
Deposit(2, 28, True);
Inc(Players[CurrentPlayer].Banked);
end;

{**************************Progress Report*************************************}

procedure ProgressReport;
var
Var1 : Integer;
begin
Writeln('');
Writeln('***************************************************************');
Writeln('I Varrock East Mine + Bank Progress Report I');
Writeln(' Version ' + VersionNumber);
Writeln('I Made By: Heavenguard [in Honor of Cigue] I');
if ReflectionWorking = True then
Writeln('I Script is using Reflection I');
if ReflectionWorking = False then
Writeln('I Script is using Color I');
Writeln(' Total Script Run Time: ' + TimeRunning );
Writeln('***************************************************************');

for Var1 := 0 to HowManyPlayers - 1 do
with Players[Var1] do
begin
Writeln(' Player ' + IntToStr(Var1 + 1) );
Writeln(' Rock Type: ' + Players[Var1].Strings[0] );
Writeln('Player ' + IntToStr(Var1 + 1) + ' Banked ' + IntToStr(Players[Var1].Banked) + ' Loads ');
Writeln('That should be about ' + IntToStr(Players[Var1].Banked * 28) + ' Ores, give or take.');
if Players[Var1].Strings[0] = 'Iron' then
Writeln('That should also be about ' + IntToStr(Players[Var1].Banked * 28 * 35) + ' Mining Experience.');
if Players[Var1].Strings[0] = 'Copper' then
Writeln('That should also be about ' + IntToStr(Players[Var1].Banked * 28 * 17) + ' Mining Experience.');
if Players[Var1].Strings[0] = 'Tin' then
Writeln('That should also be about ' + IntToStr(Players[Var1].Banked * 28 * 18) + ' Mining Experience.');
Writeln('Player ' + IntToStr(Var1 + 1) +' took ' + IntToStr(Players[Var1].Worked) + ' Breaks.');
if Active = False then
Writeln('Player ' + IntToStr(Var1 + 1) +' is not Active. ')
else
Writeln('Player ' + IntToStr(Var1 + 1) +' is Active.');
Writeln('----------------------------------------------------------------');
end;
Writeln('----------------------------------------------------------------');
Writeln('');
end;

{*******************************Main Loops**************************************}

procedure MainLoopCLR;
var
Var1 : Integer;
Var2 : Integer;
begin
repeat
for Var1 := 0 to PlayersActive do
begin
if not LoggedIn then LoginPlayer;
for Var2 := 0 to (Players[CurrentPlayer].Integers[0] - 1) do
begin
VarrockCLRFixPlayer;
repeat
VarrockCLRMineOre;
until InvFull;
VarrockCLRWalk('Bank');
VarrockCLRBank;
ProgressReport;
VarrockCLRWalk('MiningArea');
Breaking;
end;
Logout;
NextPlayer(True);
end;
until AllPlayersInactive;
end;

procedure MainLoopRFLT;
var
Var1 : Integer;
Var2 : Integer;
begin
repeat
for Var1 := 0 to PlayersActive do
begin
if not LoggedIn then LoginPlayer;
for Var2 := 0 to (Players[CurrentPlayer].Integers[0] - 1) do
begin
VarrockRFLTFixPlayer;
repeat
VarrockCLRMineOre;
until InvFull;
WalkToTile(Tile(3288, 3373), 4, 0);
VarrockRFLTWalk('Bank');
VarrockCLRBank;
ProgressReport;
VarrockRFLTWalk('MiningArea');
Breaking;
end;
Logout;
NextPlayer(True);
end;
until AllPlayersInactive;
end;

begin
Cleardebug;
Writeln('Thanks for using my script! Feedback is key to scripts performance.');
DeclarePlayers;
SetupSRL;
SetupReflectionEx(False);
if ReflectionWorking = True then
MainLoopRFLT;
if ReflectionWorking = False then
MainLoopCLR;
end.

{My very first real script, a Varrock East Mine + Banker, does not work anymore}
program VE_Mine_And_Banker;
{.include SRL/SRL/misc/SMART.scar}
{.include SRL/SRL.scar}

{Heavenguards Varrock East Mine + Banker}
{Make Sure to Post Progress Reports! Errors := Needed. I Will Fix Them, Please Encounter them for Me}

{My First Script :D, First time Scripting, Great Practice}
{This Script was only made to Practice TPA's
{I am not going to Apply for SRL Membership with this Script, its only for Practice}
{I also wanted to take this Line to say Sorry to Naum and JAD... I am Ashamed. Please understand that I wanted to be Understood.

// -------------------------------------------People To Thank :D---------------------------------------------------------------------//
{*YoHoJo : You have given me one of the most important things I needed, Motivation, I cant thank you enough. <3 you.
*YoHoJo : Thanks Also for your EnterMiningArea Procedure, Saved me a handfull of Work :D Thanks for that Equation with Logging In!
*YoHoJo : Thanks Also for the Account you let me Borrow for Testing :D, Thanks dude :D Thanks for Helping with SRL Stats as Well :D
---------------------------------------------------------------------------------
*Coh3n : You have taught me the basics I know. Been there for me, and helped me all of the time, God bless you :D, and your Tutorials. Also, Thanks for your Feedback :D
*Naum : The Master of SCAR, It was a blessing to have someone with his Knowledge to help/guide me All the Way. God Bless you :D, I owe you a big one.
*ZephyrsFury : Unbeatable 1 on 1 Support. Love you buddy. Have a safe Trip.
----------------------------------------------------------------------------------
*Dans The Man, IceFire908, Nava2, WhoCares357 : Without your help, I would not have learned as much as I did. Thank you.
----------------------------------------------------------------------------------
*AwkwardSaw : Thanks for helping me fix up some Errors on my First Try :D, I Fixed them, Thanks a Bunch.
*N1Ke : Thanks for Help on IRC :D
*Cigue: I have Noticed Your Dedication to Making Scripts, You make me Want to Strive for the best.
*TooTTooT : Luv you Buddy, Thanks for the help when I needed it while Fixing Beta.
*TooTTooT : Thanks for Helping me Setup SRL Stats. Luv you again man.
*JAD : Im Sorry for what I said to you. Please do Forgive me. =[ }
{<----------------- Thanks to all of my SRL Family for the Motivation ----------------->}
// ----------------------------------------------------------------------------------------------------------------------------------//

// -----------------------------------------What To Do-------------------------------------------------------------------------------//
{Place your Character[s] in Varrock East Mine, Near the Iron Ore.}
{Please Keep your Pick~Axe equipped, or in First Slot(Space) in bag. When the Script Banks, it deposites Slots 2-28. Anything in those Slots will be Banked}
{Have some open Areas in your Bank for Gems Just in case.}
{Fill Out The AutoLoginMark in Constants for AutoLogging}
{Fill Out the Player Forms, and Run the Script.}
{Make sure you checked out the Things to Remember on the Download Page. It Explains the Break System a little more}
// ----------------------------------------------------------------------------------------------------------------------------------//

var
A, I, Z : Integer; {Global Variables, used for Main Loop}
RandomWait : Integer; {Global Variable, used for Mining Ore}
LoadsBanked, LoadsDropped : Integer; {Global Variables, used for Progress Report}
PlayerReadyToMine : Boolean; {Global Variable, Used for Pick Detection}
DDTMTolerance : Integer; {Global Variable, used for DDTM Tolerance Settings}
Error, SmallError : Boolean; {Global Variables, used to mark if an Error Occured.}
Tip : String; {Global Variable, used to remind simple errors that Occured while Running}
Reason : String; {Global Variable, used to Explain why the Script Errored}
RandomBreak, NumberOfBreaks, BreakTime, OverallBreakTime, TotalBreakTime : Integer; {Global Variables, used for Breaking}
Stats_UserID, Stats_Password, Stats_ScriptID, Stats_Link: string; {Global Variables, Used for Stats System}
Stats_LastTime: Integer; {Global Variable, Used for Stats System}
Stats_CustomVars: array [1..2] of Integer; {Global Variable, Used for Stats System}
StartTime, NumberOfAutoLogins : Integer; {Global Variables, Used for AutoLogin}

const
YourStatsUserID = ''; // User ID # from scriptmanager.freehostia.com Don't need to fill if you don't have one.
YourStatsPass = ''; // Your pass from scriptmanager.freehostia.com Don't need to fill if you don't have one.
AutoLoginMark = 4; // Used for AutoLogin. This will be the Time to Wait [In Minutes] Before the Player tries to Login Again.
VersionNumber = 1.09; // Please don't touch this. :D <3 you.

procedure DeclarePlayers;
begin

HowManyPlayers := 1; // How many Players to work with, Remember to fill in Their forms >.>
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; // Start Player in Array , Default [0].

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Nickname. Example. Username : Sally. Nickname : ally. 4 Letters of the Username non capitilized.
Active := True; // Leave as True if you plan on using this Character.
Pin := ''; // Bank have a Pin #? if not, leave blank, ''.
Booleans[0] := False; // Are you a Member? False for Non-Member, True for Member.
Integers[0] := 19; // World you want to log into. Please Keep in Mind that This World will be used for all Players. Keep it Static.
Booleans[1] := True; // Signed Client? True for Yes, False for No.
Booleans[2] := False; // High Detail? Not Recommended. False for No , True for Yes.
Integers[1] := 15; // Loads to Bank.
Integers[2] := 30; // Loads to PowerMine.
Integers[3] := RandomWait; // Time to Wait [In Seconds [1, 2, 3, etc.] before Mining another Ore. Leave as RandomWait for a Random Wait.
Booleans[3] := True; // Want This Character to Take Breaks? True for Yes, False for No. Make sure you Set the Integers[5] to Whatever is needed.
Integers[4] := RandomBreak; // Break Time [In Minutes], Feel Free to Incorperate Random Minutes. Leave as RandomBreak for a Randomized Amount, Else Change to what you Desire.
Integers[5] := 4; // Chance of Breaking, 1 to 100. 1 = 100%, Breaks Everytime. 100 = 1 % Chance of Taking a Break, Little Breaking. 100 = Low Chance, 3 = Medium Chance, 1 = Each Time.
end; // The Percentage is Calculated : 100 / Integers[4] = Percent of Break Occuring. 100 / 2 = 50%. 100 / 3 = 33.3%. 100 / 4 = 25%.
// The Above Percentage is Used After the Script is finished Mining its Ores, and gets a Full Inventory.


// --------- This is if you have more then 1 Account, 0 is the first, 1 is the second, 2 is the third... Etc.
// Remove the { } //Between the With-Do and End to Release the Comment Brackets.

{with Players[1] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Nickname. Example. Username : Sally. Nickname : ally. 4 Letters of the Username non capitilized.
Active := True; // Leave as True if you plan on using this Character.
Pin := ''; // Bank have a Pin #? if not, leave blank, ''.
Booleans[0] := False; // Are you a Member? False for Non-Member, True for Member.
Integers[0] := 19; // World you want to log into. Please Keep in Mind that This World will be used for all Players. Keep Static.
Booleans[1] := True; // Signed Client? True for Yes, False for No.
Booleans[2] := False; // High Detail? Not Recommended. False for No , True for Yes.
Integers[1] := 10; // Loads to Bank.
Integers[2] := 15; // Loads to PowerMine.
Integers[3] := 2000; // Time to Wait before Mining another Ore. 1000 Milliseconds := 1 Second.
Booleans[3] := True; // Want This Charcter to Take Breaks? True for Yes, False for No. Make sure you Set the Integers[5] to Whatever is needed.
Integers[4] := RandomBreak; // Break Time [In Minutes], Feel Free to Incorperate Random Minutes. Leave as RandomBreak for a Randomized Amount, Else Change to what you Desire.
Integers[5] := 4; // Chance of Breaking, 1 to 100. 1 = 100%, Breaks Everytime. 100 = 1 % Chance of Taking a Break, Little Breaking. 100 = Low Chance, 3 = Medium Chance, 1 = Each Time.
end; // The Percentage is Calculated : 100 / Integers[4] = Percent of Break Occuring. 100 / 2 = 50%. 100 / 3 = 33.3%. 100 / 4 = 25%.
// The Above Percentage is Used After the Script is finished Mining its Ores, and gets a Full Inventory.

{with Players[2] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Nickname. Example. Username : Sally. Nickname : ally. 4 Letters of the Username non capitilized.
Active := True; // Leave as True if you plan on using this Character.
Pin := ''; // Bank have a Pin #? if not, leave blank, ''.
Booleans[0] := False; // Are you a Member? False for Non-Member, True for Member.
Integers[0] := 19; // World you want to log into. Please Keep in Mind that This World will be used for all Players. Keep Static.
Booleans[1] := True; // Signed Client? True for Yes, False for No.
Booleans[2] := False; // High Detail? Not Recommended. False for No , True for Yes.
Integers[1] := 10; // Loads to Bank.
Integers[2] := 15; // Loads to PowerMine.
Integers[3] := 2000; // Time to Wait before Mining another Ore. 1000 Milliseconds := 1 Second.
Booleans[3] := True; // Want This Charcter to Take Breaks? True for Yes, False for No. Make sure you Set the Integers[5] to Whatever is needed.
Integers[4] := RandomBreak; // Break Time [In Minutes], Feel Free to Incorperate Random Minutes. Leave as RandomBreak for a Randomized Amount, Else Change to what you Desire.
Integers[5] := 4; // Chance of Breaking, 1 to 100. 1 = 100%, Breaks Everytime. 100 = 1 % Chance of Taking a Break, Little Breaking. 100 = Low Chance, 3 = Medium Chance, 1 = Each Time.
end; // The Percentage is Calculated : 100 / Integers[4] = Percent of Break Occuring. 100 / 2 = 50%. 100 / 3 = 33.3%. 100 / 4 = 25%.
// The Above Percentage is Used After the Script is finished Mining its Ores, and gets a Full Inventory.

{with Players[3] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Nickname. Example. Username : Sally. Nickname : ally. 4 Letters of the Username non capitilized.
Active := True; // Leave as True if you plan on using this Character.
Pin := ''; // Bank have a Pin #? if not, leave blank, ''.
Booleans[0] := False; // Are you a Member? False for Non-Member, True for Member.
Integers[0] := 19; // World you want to log into. Please Keep in Mind that This World will be used for all Players. Keep Static.
Booleans[1] := True; // Signed Client? True for Yes, False for No.
Booleans[2] := False; // High Detail? Not Recommended. False for No , True for Yes.
Integers[1] := 10; // Loads to Bank.
Integers[2] := 15; // Loads to PowerMine.
Integers[3] := 2000; // Time to Wait before Mining another Ore. 1000 Milliseconds := 1 Second.
Booleans[3] := True; // Want This Charcter to Take Breaks? True for Yes, False for No. Make sure you Set the Integers[5] to Whatever is needed.
Integers[4] := RandomBreak; // Break Time [In Minutes], Feel Free to Incorperate Random Minutes. Leave as RandomBreak for a Randomized Amount, Else Change to what you Desire.
Integers[5] := 4; // Chance of Breaking, 1 to 100. 1 = 100%, Breaks Everytime. 100 = 1 % Chance of Taking a Break, Little Breaking. 100 = Low Chance, 3 = Medium Chance, 1 = Each Time.
end; // The Percentage is Calculated : 100 / Integers[4] = Percent of Break Occuring. 100 / 2 = 50%. 100 / 3 = 33.3%. 100 / 4 = 25%.
// The Above Percentage is Used After the Script is finished Mining its Ores, and gets a Full Inventory.}

for I := 0 to HowManyPlayers - 1 do
begin
Players[I].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
LampSkill := 'mining';
end;

end;

{*******************************************************************************
procedure Stats_CheckOutput(s: string);
By: Nielsie95.
Description: ???
*******************************************************************************}
procedure Stats_CheckOutput(s: string);
var
i: Integer;
sa: TStringArray;
begin
sa := Explode(#10, s);
for i := 0 to High(sa) do
if (Trim(sa[i]) <> '') then
if StartsWith('ERROR(1)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_UserID := '';
Stats_Password := '';
end
else if StartsWith('ERROR(2)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_ScriptID := '';
end
else
WriteLn('STATS: "' + sa[i] + '"');

end;

{*******************************************************************************
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
By: Nielsie95.
Description: Gets script info from the online server.
*******************************************************************************}
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
var
Client: Integer;
s: string;
sa: TStringArray;
begin
Result := False;
if (Stats_ScriptID = '') then
Exit;

Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getinfo');
AddPostVariable (Client, 'sID', Stats_ScriptID);

s := PostHTTPPageEx(Client, Stats_Link);
sa := Explode(#10'GLUE'#10, s);
if (Length(sa) = 5) then
begin
Result := True;
Version := sa[0];
News := sa[1];
Link := sa[2];
OutDated := sa[3] = '1';
LastUpdate_HoursAgo := StrToIntDef(sa[4], -1);
end
else
Stats_CheckOutput(s);

FreeHTTPClient(Client );
end;

var
Stats_GlobalVars: array[1..24] of Integer;

{*******************************************************************************
procedure Stats_SendReport;
By: Nielsie95.
Description: Sends global vars to server.
*******************************************************************************}
procedure Stats_SendReport;
var
i, Client, Time: Integer;
s: string;
begin
if (Stats_UserID = '') and (Stats_Password = '') and (Stats_ScriptID = '') then
Exit;

Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'submit');

Time := (GetTimeRunning - Stats_LastTime) div 1000 div 60;
if (Time < 5) then
Time := 0
else
Stats_LastTime := GetTimeRunning;
AddPostVariable(Client, 'sTime', IntToStr(Time));

if (Stats_UserID <> '') and (Stats_Password <> '') then
begin
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
end
else
begin
AddPostVariable(Client, 'uID', '-1');
AddPostVariable(Client, 'uPass', '');
end;

if (Stats_ScriptID <> '') then
begin
AddPostVariable (Client, 'sID', Stats_ScriptID);

for i := Low(Stats_CustomVars) to High(Stats_CustomVars) do
begin
AddPostVariable(Client, 'rndCustom' + IntToStr(i), IntToStr(Stats_CustomVars[i]));
Stats_CustomVars[i] := 0;
end;
end
else
begin
AddPostVariable (Client, 'sID', '-1');
end;

for i := Low(Stats_GlobalVars) to High(Stats_GlobalVars) do
begin
case i of
1: s := IntToStr(SRL_Logs - Stats_GlobalVars[i]);
2: s := IntToStr(Banks - Stats_GlobalVars[i]);
3: s := IntToStr(RandSolved[rand_Death] - Stats_GlobalVars[i]);
else if ((i - 3) < Length(RandSolved) - 1 {for Death}) then
s := IntToStr(RandSolved[i - 3] - Stats_GlobalVars[i]);
end;
AddPostVariable(Client, 'rndGlobal' + IntToStr(i), s);
Stats_GlobalVars[i] := Stats_GlobalVars[i] + StrToInt(s);
end;

s := PostHTTPPageEx(Client, Stats_Link);
Stats_CheckOutput(s);
FreeHTTPClient(Client);

if (SRL_Procs[srl_OnSendStats] <> nil) then
SRL_Procs[srl_OnSendStats]();
end;

{*******************************************************************************
procedure Stats_SendAccountInfo;
By: Nielsie95.
Description: Sends your personal player info to server.
*******************************************************************************}
procedure Stats_SendAccountInfo;
var
i, Client: Integer;
Accounts: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;

Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'setaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
if (Stats_ScriptID <> '') then
AddPostVariable (Client, 'sID', Stats_ScriptID)
else
AddPostVariable (Client, 'sID', '-1');

SetLength(Accounts, HowManyPlayers);
for i := 0 to HowManyPlayers - 1 do
Accounts[i] := Implode('.|?stat?|.', [Players[i].Name, Players[i].Loc, IntToStr(Integer(Players[i].Active))]);

AddPostVariable(Client, 'accInfo', Implode(#10'ACC'#10, Accounts));
Stats_CheckOutput(PostHTTPPageEx(Client, Stats_Link));
FreeHTTPClient(Client);
end;

{*******************************************************************************
procedure Stats_ManageAccounts;
By: Nielsie95.
Description: ????
*******************************************************************************}
procedure Stats_ManageAccounts;
var
i, ii, Client: Integer;
s: string;
Accounts, Stats: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;

Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
AddPostVariable (Client, 'sID', '-1');

s := PostHTTPPageEx(Client, Stats_Link);
Accounts := Explode(#10'ACC'#10, s);
for i := 0 to High(Accounts) do
begin
Stats := Explode('.|?stat?|.', Accounts[i]);
if (Length(Stats) = 3) then
begin
for ii := 0 to HowManyPlayers - 1 do
if (LowerCase(Players[ii].Name) = LowerCase(Stats[0])) then
begin
Players[ii].Loc := Stats[1];
Players[ii].Active := Stats[2] = '1';
Break;
end;
end
else
begin
Stats_CheckOutput(s);
Break;
end;
end;

FreeHTTPClient(Client);
stats_SendAccountInfo;
end;
{ You may see Writeln's in my Script Bracketed, Those are just for Testing. }

Procedure DS(TDisguise : String; TStatus : String); {Just Combines Disguise and Status Together}
begin
Disguise(TDisguise);
Status(TStatus);
end;

function FindIronOreColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.15);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 2238782, MSX1, MSY1, MSX2, MSY2, 7);
if (Length(arP) = 0) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 1.37) and (X <= 5.60) and (Y >= 1.23) and (Y <= 4.94) and (Z >= 0.91) and (Z <= 3.36) then
begin
Result := arC[i];
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;

function FindVarrockRC: Integer; {AutoColor Function Made from my SetSettings Procedure}
var {FindVarrockRoadColor for Long:D}
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(7.05, 0.39);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 8553339, MMX1, MMY1, MMX2, MMY2, 7);
if (Length(arP) = 0) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 15.91) and (X <= 25.81) and (Y >= 16.72) and (Y <= 27.38) and (Z >= 16.06) and (Z <= 28.61) then
begin
Result := arC[i];
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;

function FindDirtRC: Integer; {DirtRoadColor ACF Made from my Previous Procedure}
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.61, 0.65);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 6522257, MMX1, MMY1, MMX2, MMY2, 4);
if (Length(arP) = 0) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 19.23) and (X <= 24.95) and (Y >= 20.39) and (Y <= 26.21) and (Z >= 12.80) and (Z <= 17.60) then
begin
Result := arC[i];
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

end;

function FindRocksColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.19, 0.69);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 2179173, MMX1, MMY1, MMX2, MMY2, 11);
if (Length(arP) = 0) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 3.02) and (X <= 13.51) and (Y >= 2.82) and (Y <= 11.28) and (Z >= 1.03) and (Z <= 4.39) then
begin
Result := arC[i];
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

end;

Function AutoLogin : Boolean; {Simple AutoLogin Function In case of Disconnectivity. Make Sure the Constant is Filled.}
var
Z : Integer;
TimeToWait : Integer;
begin

while not (RSReady) do
Wait(250);

Wait(Random(200)); {Added In this Very Small Wait To Reduce the Chance of a False Positive LoggedIn.}

if not LoggedIn then
begin
DS('AutoLogin' , 'AutoLogin in Effect, Will Log in Character in ' + (IntToStr(AutoLoginMark)) + ' Minutes.');
Inc(NumberOfAutoLogins);
MarkTime(Z);

TimeToWait := (AutoLoginMark * 1000);
Wait(TimeToWait * 60);

if not LoggedIn then
LoginPlayer;

Wait(3000 + Random(7000));

StartTime := TimeFromMark(Z);
Result := True;
end;

end;

Procedure Antiban; {Just Simple AntiBan Combined with AntiRandom}
begin
case Random(70) of
0: RandomRClick;
1: HoverSkill('mining', False);
2: PickUpMouse;
4: RandomMovement;
5: BoredHuman;
6: ExamineInv;
end;
AutoLogin;
end;

function SetDDTM(DDTMNumber: Integer) : Integer; {Sets our DDTM}
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..9] of TDTMPointDef;
TempTDTM: TDTM;
begin

case DDTMNumber of

1: {Used for CheckPoint 1. The First WalkPoint in the Function WalkToBank}
begin
dtmMainPoint.x := 953;
dtmMainPoint.y := 235;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindVarrockRC;
dtmMainPoint.Tolerance := DDTMTolerance;

dtmSubPoints[0].x := 953;
dtmSubPoints[0].y := 235;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindVarrockRC;
dtmSubPoints[0].Tolerance := DDTMTolerance;

dtmSubPoints[1].x := 949;
dtmSubPoints[1].y := 228;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindVarrockRC;
dtmSubPoints[1].Tolerance := DDTMTolerance;

dtmSubPoints[2].x := 970;
dtmSubPoints[2].y := 247;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindVarrockRC;
dtmSubPoints[2].Tolerance := DDTMTolerance;

dtmSubPoints[3].x := 972;
dtmSubPoints[3].y := 256;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindVarrockRC;
dtmSubPoints[3].Tolerance := DDTMTolerance;

dtmSubPoints[4].x := 968;
dtmSubPoints[4].y := 240;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := FindVarrockRC;
dtmSubPoints[4].Tolerance := DDTMTolerance;
end;

2: {Used for CheckPoint 2. The Intersection Area in the Function WalkToBank}
begin
dtmMainPoint.x := 1108;
dtmMainPoint.y := 113;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindVarrockRC;
dtmMainPoint.Tolerance := 300;

dtmSubPoints[0].x := 1108;
dtmSubPoints[0].y := 113;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindVarrockRC;
dtmSubPoints[0].Tolerance := DDTMTolerance;

dtmSubPoints[1].x := 1121;
dtmSubPoints[1].y := 140;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindVarrockRC;
dtmSubPoints[1].Tolerance := DDTMTolerance;

dtmSubPoints[2].x := 1111;
dtmSubPoints[2].y := 128;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindVarrockRC;
dtmSubPoints[2].Tolerance := DDTMTolerance;

dtmSubPoints[3].x := 1113;
dtmSubPoints[3].y := 92;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindVarrockRC;
dtmSubPoints[3].Tolerance := DDTMTolerance;

dtmSubPoints[4].x := 1118;
dtmSubPoints[4].y := 90;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := FindVarrockRC;
dtmSubPoints[4].Tolerance := DDTMTolerance;

dtmSubPoints[5].x := 1091;
dtmSubPoints[5].y := 112;
dtmSubPoints[5].AreaSize := 1;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := FindVarrockRC;
dtmSubPoints[5].Tolerance := DDTMTolerance;

dtmSubPoints[6].x := 1091;
dtmSubPoints[6].y := 109;
dtmSubPoints[6].AreaSize := 1;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := FindVarrockRC;
dtmSubPoints[6].Tolerance := DDTMTolerance;

dtmSubPoints[7].x := 1077;
dtmSubPoints[7].y := 109;
dtmSubPoints[7].AreaSize := 1;
dtmSubPoints[7].AreaShape := 0;
dtmSubPoints[7].Color := FindVarrockRC;
dtmSubPoints[7].Tolerance := DDTMTolerance;

dtmSubPoints[8].x := 1105;
dtmSubPoints[8].y := 109;
dtmSubPoints[8].AreaSize := 1;
dtmSubPoints[8].AreaShape := 0;
dtmSubPoints[8].Color := FindVarrockRC;
dtmSubPoints[8].Tolerance := DDTMTolerance;

dtmSubPoints[9].x := 1075;
dtmSubPoints[9].y := 111;
dtmSubPoints[9].AreaSize := 1;
dtmSubPoints[9].AreaShape := 0;
dtmSubPoints[9].Color := FindVarrockRC;
dtmSubPoints[9].Tolerance := DDTMTolerance;
end;

end;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

{-Procedure : EnterMiningArea
-Made [96%] By : YoHoJo , Edited [4%] By : Heavenguard [Added in Length Check, Changed L/W Boxing To Make it work for V.E Mine :D]
-Walks Into the Iron Ore Area.}
Procedure EnterMiningArea;
var
IronOreTPA : TPointArray;
MiningFence: TPointArray;
MiningFenceBox: T2DPointArray;
MidMinePt: TPoint;
Revolution, X, Y: Integer;
begin

if AutoLogin then
IncEx(Revolution, GetSystemTime -StartTime)
else
FindNormalRandoms;

Wait(Random(4000));
MarkTime(Revolution);

ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.11, 0.26);

repeat
if AutoLogin then
IncEx(Revolution, GetSystemTime - StartTime)
else
FindNormalRandoms;
FindColorsSpiralTolerance(X, Y, IronOreTPA, 2436162, MSX1, MSY1, MSX2, MSY2, 5);
if Length(IronOreTPA) >= 15 then
Exit;
until (TimeFromMark(Revolution) >= 10000);

SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);

ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(24.53, 21.34);
X := MMCX;
Y := MMCY;

FindColorsSpiralTolerance(X, Y, MiningFence, 16119785, MMX1, MMCY - 10 , MMX2, MMCY + 10, 2);

if AutoLogin then
IncEx(Revolution, GetSystemTime - StartTime)
else
FindNormalRandoms;

if (Length(MiningFence) >= 22) then
begin


if AutoLogin then
IncEx(Revolution, GetSystemTime - StartTime)
else
FindNormalRandoms;

SetColorSpeed2Modifiers(0.2,0.2);
ColorToleranceSpeed(1);

MiningFenceBox := TPAtoATPAEx(MiningFence, 70, 70);
MidMinePt := MiddleTPA(MiningFenceBox[0]);

if not AutoLogin then
FindNormalRandoms;

Mouse(MidMinePt.x, MidMinePt.y - 28, 0, 0, True);
Flag;

if not AutoLogin then
FindNormalRandoms;

if TimeFromMark(Revolution) >= 15000 then
begin
Reason := ('Failed To Enter Mining Area [EnterMiningArea]. Terminating Script');
Error := True;
Exit;
end;

end;

end;

Function CheckForPickAxe : Boolean; {Simply Checks to See if Player has a PickAxe}
var
X, Y : Integer;
F2PPickAxe, P2PPickAxe : Integer; {F2P = Bronze to Rune, P2P = Dragon}
begin
DS('Checking for Pick', 'Checking to Make Sure Pick is in Inventory or Equipped');

if not AutoLogin then
FindNormalRandoms;

F2PPickAxe := DTMFromString('78DA8DD03B0A80400C04D05D2D3CA258B9FE4' +
'1100FE717410B2D2C14BC9283B085854E52A4088F908C36AE5297' +
'56EF729E6EA73A8639884960766252988D980C6621A6809988296' +
'17A626AC19E0A66F8369ECDA725C6084C00D311E30BEF19056626' +
'268259057FEDC484302731394CF36F6E18B21651');


P2PPickAxe := DTMFromString('78DA63AC67616068616440058C4824906E04A' +
'A6926A0A60DA8A69E809A4EA09A5A026A2600D59412503311A8A6' +
'84809A494035C504D44C25C29C3940359544A84923A0A60FA8269' +
'7809A5EA09A2C026AA600D5A4E256C30DA2A7E3770F58CD34A09A' +
'02FC6A008CC80FC9');

GameTab(25);

if (FindDTM(F2PPickAxe, X, Y, MIX1, MIY1, MIX2, MIY2)) or (FindDTM(P2PPickAxe, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
Result := True;
FreeDTM(F2PPickAxe);
FreeDTM(P2PPickAxe);
PlayerReadyToMine := True;
Exit;
end else
begin
GameTab(26);

if (FindDTM(F2PPickAxe, X, Y, 563, 284, 612, 322)) or (FindDTM(P2PPickAxe, X, Y, 563, 284, 612, 322)) then
begin
Result := True;
FreeDTM(F2PPickAxe);
FreeDTM(P2PPickAxe);
PlayerReadyToMine := True;
Exit;
end else
begin
FreeDTM(F2PPickAxe);
FreeDTM(P2PPickAxe);
Reason := ('Pick Detection for Current Player Failed, Cannot Continue.');
Error := True;
Exit;
end;

end;

end;

Function Mine_Ore : Boolean; {Mines the Ore :D}
var
X, Y : Integer;
T, Z : Integer;
ColorTolerance : Integer;
IronOreTPA : TPointArray;
IronOreATPA : T2DPointArray;
begin

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

DS('Mining Ore', 'Mine_Ore, Mining Ore until Inventory is Full');
MarkTime(T);

Players[CurrentPlayer].Loc := 'Mining Area';

ColorToleranceSpeed(1);
SetRun(True);
SetAngle(True);

FindColorsSpiralTolerance(X, Y, IronOreTPA, FindIronOreColor, MSX1, MSY1, MSX2, MSY2, 7);
{Writeln('IronOreTPA : ' + (IntToStr(Length(IronOreTPA))));}
{DebugTPA(IronOreTPA, '');}
if (Length(IronOreTPA) >= 10) then
begin
IronOreATPA := TPAtoATPAEx(IronOreTPA, 9, 10);
{DebugATPA(IronOreATPA,'');}
MiddleTPAEx(IronOreATPA[0], X, Y);
MMouse(X, Y, 4, 4);

if WaitUpText('ine', 300) then
begin
Mouse(X, Y, 4, 4, True);

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

if (Players[CurrentPlayer].Integers[3] = RandomWait) then
Wait(Random(5000))
else
Wait(Players[CurrentPlayer].Integers[3] * 1000);
end;

end;

end;

Procedure Drop_Ore; {Drops All of the Ores it finds in the Inventory. Used when Player is Powermining}
var
T : Integer;
OreDTM : Integer;
begin
MarkTime(T);

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

if (LoadsDropped) = (Players[CurrentPlayer].Integers[2]) then
Exit;

DS('Dropping Ores', 'Dropping All Ores in Inventory');

OreDTM := DTMFromString('78DA636C62666058C8C8800A98C0244C94B10' +
'5A8662E01355D44A8E905AA994A40CD04A09AE904D4CC04AA9945' +
'40CD02A09AF904D4CC06AA594540CD4422D4F401D56C24C25F84D' +
'4B41261572350CD72026AE612113ED3088733003887125A');

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;


if (InvFull) then
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

ClickAllItemsExcept('DTM', OreDTM, 'rop', [], Random(500), []);
Inc(LoadsDropped);
FreeDTM(OreDTM);
end;

if (TimeFromMark(T) >= 120000) then
Exit;

end;


Function WalkToBank : Boolean; {Walks to the Bank ... Lets hope it Works This Time :D}
var
T, R : Integer;
X, Y : Integer;
BankDTM : Integer;
BankRoadTPA, DirtRoadTPA: TPointArray;
BankRoadATPA, DirtRoadATPA : T2DPointArray;
DDTMCheckPoint1, DDTMCheckPoint2 : Integer;
RWTolerance : Integer;
begin
MarkTime(T);

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

Players[CurrentPlayer].Loc := 'Walking To Bank';
DS('Walking To Bank', 'WalkToBank, Walking To Bank :D');
Mouse(543, 23, 4, 4, True);
SetRun(True);
SetAngle(True);

DDTMTolerance := 7;
DDTMCheckPoint1 := SetDDTM(1);
Players[CurrentPlayer].Loc := 'Walking to Point 1, WalkToBank, Also Known as CheckPoint 1';
repeat

if (DTMRotated(DDTMCheckPoint1, X, Y, MMCX, MMY1, MMX2, MMCY)) then
begin
Mouse(X, Y, 4, 4, True);
Wait(400);
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Break;
end else
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
IncEx(DDTMTolerance, 10);
DDTMCheckPoint1 := SetDDTM(1);
end;

until ((DDTMTolerance) >= 47) or (TimeFromMark(T) >= 60000);

if (DDTMTolerance >= 47) then
begin
Tip := ('DDTM Tolerance for CheckPoint 1 Walking to Bank Exceeded 47... Used RadialWalking Method.');
SmallError := True;
RWTolerance := 7;

repeat

if not RadialWalkTolerance(FindVarrockRC, 26, 38, 71, 1, 1, RWTolerance) then
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
IncEx(RWTolerance, 7);
end else
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
RWTolerance := 7;
Break;
end;

until (RWTolerance) >= 50;

end;

if RWTolerance >= 50 then
begin
Tip := ('Radial Walk Tolerance Settings for CheckPoint 1 Walking to Bank Exceeded 50...Used Estimated Co-ord Click');
SmallError := True;
Mouse(662, 33, 4, 4, True);
Flag;
end;

if (TimeFromMark(T) >= 60000) then
begin
Reason := ('Time Exceeded for CheckPoint 1, Walking to Bank ... Terminating Script');
Error := True;
Exit;
end;

FreeDTM(DDTMCheckPoint1);
RWTolerance := 7;
Players[CurrentPlayer].Loc := 'Heading Up The Road after Point 1, Towards Check Point 2, The Intersection, WalkToBank';

// - This RadialWalk is Used to make it to a Area CheckPoint so the 2nd DDTM does not Fail - //
// ------------------------------------------------------------------------------------------- //
R := 0;

repeat

begin
if not (RadialWalkTolerance(FindVarrockRC, 342, 369, 73, 1, 1, RWTolerance)) then
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
IncEx(RWTolerance, 7);
end else
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Inc(R);
Wait(Random(2000));
end;
end;

until (R = 3) or (TimeFromMark(T) >= 80000);

if (TimeFromMark(T) >= 80000) then
begin
Reason := ('Time Exceeded for Mini CheckPoint 1.5, Walking to Bank ... Terminating Script');
Error := True;
Exit;
end;
// -------------------------------------------------------------------------------------------- //

DDTMTolerance := 4;
DDTMCheckPoint2 := SetDDTM(2);
RWTolerance := 7;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

repeat

begin

if DTMRotated(DDTMCheckPoint2, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(X, Y, 4, 4, True);
Wait(400);
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Break;
end else
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

IncEx(DDTMTolerance, 10);
DDTMCheckPoint2 := SetDDTM(2);

if (DDTMTolerance) >= 50 then

if not (RadialWalkTolerance(FindVarrockRC, 342, 369, 73, 1, 1, RWTolerance)) then
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
IncEx(RWTolerance, 7);
end else
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
RWTolerance := 7;
DDTMTolerance := 7;
DDTMCheckPoint2 := SetDDTM(2);
end;

if (RWTolerance) >= 50 then
begin
Tip := ('RadialWalking Tolerance Limit Reached/Exceeded while Walking To Bank, Used Estimated Click');
SmallError := True;
Mouse(609, 18, 4, 4, True);
Flag;
RWTolerance := 7;
DDTMTolerance := 7;
DDTMCheckPoint2 := SetDDTM(2);
end;

end;

end;

until (TimeFromMark(T) >= 120000);

if (TimeFromMark(T) >= 120000) then
begin
Reason := ('Time Exceeded for Walking to CheckPoint 2, Walking to Bank ... Terminating Script');
Error := True;
Exit;
end;

FreeDTM(DDTMCheckPoint2);

DDTMTolerance := 7;
RWTolerance := 7;
BankDTM := DTMFromString('78DA63AC646260286140019525250C3A8C0C0' +
'C40C4F01F0818416A2A20724C50357FFE40588C503E632D116A4A' +
'89505348580D005A351238');
Players[CurrentPlayer].Loc := 'Walking On Road 2, Straight Towards The Bank, After CheckPoint 2, WalkToBank';

repeat

FindColorsTolerance(BankRoadTPA, FindVarrockRC, MMX1, MMY1, MMCX, MMY2, 15);
if (Length(BankRoadTPA) >= 50) then
begin
SortTPAFrom(BankRoadTPA, Point(599, 83));
BankRoadATPA := TPAtoATPAEx(BankRoadTPA, 10, 5);
MiddleTPAEx(BankRoadATPA[0], X, Y);

Mouse(X - Random(10), Y + Random(3), 4, 4, True);

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

Flag;

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

end else
begin

if not RadialWalkTolerance(FindVarrockRC, 259, 284, 49, 1, 1, RWTolerance) then
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
IncEx(RWTolerance, 7);
end else
begin
RWTolerance := 7;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
end;

if (RWTolerance) >= 50 then
begin
Tip := ('RadialWalking Tolerance Limit Reached/Exceeded while Walking To Bank, Using Estimated Co-Ord Clicking');
SmallError := True;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Mouse(860, 278, 4, 4, True);
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
end;
end;

until (DTMRotated(BankDTM, X, Y, MMX1, MMCY, MMX2, MMY2)) or (FindSymbol(X, Y, 'Bank')) or (TimeFromMark(T) >= 140000);

if (DTMRotated(BankDTM, X, Y, MMX1, MMCY, MMX2, MMY2)) then
begin
Tip := ('Used Bank DTM to Walk into the Bank');
SmallError := True;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Mouse(X, Y, 4, 4, True);
Wait(400);
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
FreeDTM(BankDTM);
Result := True;
Exit;
end;

if (FindSymbol(X, Y, 'Bank')) then
begin
Tip := ('Used Bank Symbol to Walk into the Bank');
SmallError := True;
Mouse(X, Y, 4, 4, True);
Wait(400);
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
if (DTMRotated(BankDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(X, Y, 4, 4, True);
Wait(400);
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;;
FreeDTM(BankDTM);
Result := True;
Exit;
end else
begin
Tip := ('Did not Re-Locate Bank DTM After using BankSymbol');
SmallError := True;
Result := True;
Exit;
end;
end;

if (TimeFromMark(T) >= 140000) then
begin
Reason := ('Time Exceeded for Walking to the Bank after CheckPoint 2(WalkToBank) ... Terminating Script');
Error := True;
Exit;
end;

end;

Function Bank_Ore : Boolean; {Banks the Ore :D}
var
T : Integer;
X, Y : Integer;
BankDTM : Integer;
begin

DS('Banking Ore', 'Bank_Ore, Banking Slots 2-28');

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

Players[CurrentPlayer].Loc := 'Varrock East Bank';

MarkTime(T);
Wait(Random(1500));

OpenBank('veb', True, True);

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

BankDTM := DTMFromString('78DA63AC646260286140019525250C3A8C0C0' +
'C40C4F01F0818416A2A20724C50357FFE40588C503E632D116A4A' +
'89505348580D005A351238');

SymbolAccuracy := 0.5;

if not BankScreen then
for A := 0 to 3 do
begin

if DTMRotated(BankDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin

Mouse(X, Y, 4, 4, True);
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Wait(Random(1400));
OpenBank('veb', True, True);

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

if BankScreen then
begin
FreeDTM(BankDTM);
Break;
end;

end else
begin

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

if FindSymbol(X, Y, 'Bank') then
begin

Mouse(X, Y, 4, 4, True);
Flag;

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

Wait(Random(1400));
OpenBank('veb', True, True);

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

if BankScreen then
begin
FreeDTM(BankDTM);
SymbolAccuracy := 0.8;
Break;
end;

if TimeFromMark(T) >= 100000 then
Exit;

if A = 3 then
Exit;

end;
end;
end;

if BankScreen then

repeat

if InvFull then
Deposit(2, 28, True)
else
begin
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Inc(LoadsBanked);
Result := True;
Exit;
end;

until (TimeFromMark(T) >= 120000);

if (TimeFromMark(T) >= 120000) then
Exit;

end;

Function WalkToMine : Boolean; { 95% Re~Written, Only kept DTM for the First Point. Everything else is 100% TPA's.}
var
T, R : Integer;
X, Y : Integer;
WalkPoint1DTM : Integer;
RoadOneTPA, RoadTwoTPA, RocksTPA : TPointArray;
DirtRoadTPA : TPointArray;
RoadOneATPA, RoadTwoATPA, RocksATPA : T2DPointArray;
begin

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

Players[CurrentPlayer].Loc := 'Walking to Mining Area';

DS('Walking To Mine', 'Walking Back to Mining Area :D');
MarkTime(T);
ColorToleranceSpeed(1);
Mouse(543, 23, 4, 4, True);
SetAngle(True);
SetRun(True);

WalkPoint1DTM := DTMFromString('78DA63DCC7CCC0F085010574F47532E830323' +
'00011C37F20609C055423C308966382AAF9F307C26284F219A7E2' +
'5703C67309AB010053900FA8');
Players[CurrentPlayer].Loc := 'In Bank, Searching for DTM to Walk to First Point';

if not DTMRotated(WalkPoint1DTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
begin
Tip := ('WalkPoint1DTM Failed, WalkToMine, Used Estimated Co-Ord Click.');
SmallError := True;
Mouse(650, 51, 4, 4, True);
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Flag;
Wait(Random(3000));
end else
begin
Mouse(X, Y, 4, 4, True);
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
end;

FreeDTM(WalkPoint1DTM);
R := 0;
Players[CurrentPlayer].Loc := 'On Road 1, WalkToMine, Walking Directly To CheckPoint 1, Intersection';

repeat

FindColorsTolerance(RoadOneTPA, FindVarrockRC, 645, 83, 675, 95, 15);

if (Length(RoadOneTPA) >= 5) then
begin

FindColorsTolerance(DirtRoadTPA, FindDirtRC, 623, 75, 666, 104, 15);
FilterPointsPie(DirtRoadTPA, 84, 108, 11, 38, MMCX, MMCY);

if (Length(DirtRoadTPA) >= 25) then
Break;

SortTPAFrom(RoadOneTPA, Point(658, 83));
RoadOneATPA := TPAtoATPAEx(RoadOneTPA, 4, 5);
SortATPAFrom(RoadOneATPA, Point(658, 83));
MiddleTPAEx(RoadOneATPA[0], X, Y);
Mouse(X + 2, Y - 1, 4, 4, True);

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

Flag;

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

end else
Break;

until (TimeFromMark(T) >= 15000);

if (TimeFromMark(T) >= 15000) then
begin
Reason := ('Time Exceeded for Walking to CheckPoint 1, Walking to Mine ... Continuing Script');
SmallError := True;
end;

Players[CurrentPlayer].Loc := 'On Road 2, WalkToMine, Walking Directly To CheckPoint 2, Mining Area';

repeat

FindColorsTolerance(RocksTPA, FindRocksColor, 565, 84, 625, 151, 10);

if (Length(RocksTPA) >= 100) then
begin
RocksATPA := SplitTPAEx(RocksTPA, 20, 30);
MiddleTPAEx(RocksATPA[0], X, Y);
Mouse(X - 1, Y - 5, 4, 4, True);

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

Flag;

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

EnterMiningArea;
Result := True;
Break;
end;

if (FindSymbol(X, Y, 'Mining Spot')) then
begin
Tip := ('Used Mining Symbol to Enter Mining Area');
SmallError := True;
Mouse(X, Y, 4, 4, True);
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
Flag;
if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;
EnterMiningArea;
Result := True;
Break;
end;

FindColorsTolerance(RoadTwoTPA, FindVarrockRC, 626, 111, 664, 145, 15);

if (Length(RoadTwoTPA) >= 30) then
begin
RoadTwoATPA := TPAtoATPAEx(RoadTwoTPA, 10, 8);
SortATPAFrom(RoadTwoATPA, Point(627, 108));
MiddleTPAEx(RoadTwoATPA[0], X, Y);
Mouse(X - Random(2), Y + Random(26), 4, 4, True);

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

Flag;

if AutoLogin then
IncEx(T, GetSystemTime - StartTime)
else
FindNormalRandoms;

end;

until (TimeFromMark(T) >= 90000);

if (TimeFromMark(T) >= 90000) then
begin
Reason := ('Time Exceeded(90 Seconds) for Walking to Mining Area [CheckPoint 2], WalkToMine, Terminated Script');
Error := True;
Exit;
end;

end;

Procedure ProgressReport; {Progress Report, Simple as it gets, Will add more (Locations etc.) In Later}
begin
SRLRandomsReport;
Writeln(''); // Used for Spacing.
Writeln(' Heavenguards V.E. Miner + Banker ');
Writeln(' Version: ' + FloatToStr(VersionNumber));
Writeln(' SRL / Villavu ');
Writeln(' Progress Report ');
Writeln(' ------------------------------------');
Writeln(' Time Running: ' + TimeRunning);
Writeln(' Current Player: ' + IntToStr(CurrentPlayer));
Writeln(' Location: ' + (Players[CurrentPlayer].Loc));
if (LoadsDropped < Players[CurrentPlayer].Integers[2]) then
Writeln(' Power-Mining?: ' + 'True')
else
Writeln(' Power-Mining?: ' + 'False');
Writeln(' Loads to Bank: ' + IntToStr(Players[CurrentPlayer].Integers[1]));
Writeln(' Loads to Drop: ' + IntToStr(Players[CurrentPlayer].Integers[2]));
Writeln(' Loads Banked: ' + IntToStr(LoadsBanked));
Writeln(' Loads Dropped: ' + IntToStr(LoadsDropped));
Writeln(' Breaks Taken: ' + IntToStr(NumberOfBreaks));
Writeln(' Total Break Time: ' + MStoTime(TotalBreakTime, Time_Formal));


Writeln(' <Feedback> ');
if (SmallError) then
Writeln(' Tip: '+ Tip);
if (Error) then
Writeln(' Error: '+ Reason);
if (Error) = False then
Writeln(' No Errors to Report');
if (NumberOfAutoLogins >= 1) then
Writeln(' AutoLogins : ' + IntToStr(NumberOfAutoLogins));
if (NumberOfAutoLogins = 0) then
Writeln(' No AutoLogins Were Needed/Used');


Stats_CustomVars[1] := (LoadsBanked);
Stats_CustomVars[2] := (LoadsDropped);

end;

begin {Main Loop}
ClearDebug;
DeclarePlayers;

Smart_Server := Players[CurrentPlayer].Integers[0];
Smart_Members := Players[CurrentPlayer].Booleans[0];
Smart_Signed := Players[CurrentPlayer].Booleans[1];
Smart_SuperDetail := Players[CurrentPlayer].Booleans[2];

SetupSRL;

Stats_Link := 'http://scriptmanager.freehostia.com/submit.php';
Stats_ScriptID := '25';
Stats_UserID := YourStatsUserID;
Stats_Password := YourStatsPass;
SRLRandomsReport;
Stats_SendReport;
Stats_ManageAccounts;

TotalBreakTime := 0;
NumberOfAutoLogins := 0;

while not (RSReady) do
Wait(250);

for A := 1 to HowManyPlayers do
begin

if not LoggedIn then
LoginPlayer;

PlayerReadyToMine := False;
LoadsBanked := 0;
LoadsDropped := 0;

for I := 0 to Players[CurrentPlayer].Integers[1] do // For 0 to Loads to Bank do.
begin

repeat

if not LoggedIn then
LoginPlayer;

if (PlayerReadyToMine = False) then
CheckForPickAxe;

if Error then
begin
DS('Error Occured', 'Error Occured Unfortunatly, Check the Progress Report');
ProgressReport;
Stats_SendReport;
if HowManyPlayers >= 2 then
begin
Players[CurrentPlayer].Active := False;
Logout;
NextPlayer(False);
LoginPlayer;
end else
TerminateScript;
end;

if not AutoLogin then
FindNormalRandoms;

Mine_Ore; // Mines the Ore :D

if not AutoLogin then
FindNormalRandoms;

if (Players[CurrentPlayer].Booleans[3] = True) then // Breakage.
begin
if (InvFull) then
begin
DS('Break Mode', 'Taking a Break');

if Random(Players[CurrentPlayer].Integers[5]) = 1 then
begin
LogOut;

if ((Players[CurrentPlayer].Integers[4]) = RandomBreak) then
BreakTime := (Random(80) * 60)
else
BreakTime := ((Players[CurrentPlayer].Integers[4]) * 60);

Wait(BreakTime * 1000);
LoginPlayer;
OverallBreakTime := (BreakTime * 1000);
Inc(NumberOfBreaks);
IncEx(TotalBreakTime, OverallBreakTime);
end;
end;
end;


for Z := 0 to Players[CurrentPlayer].Integers[2] do // PowerMining Attempts.
begin
if (LoadsDropped) = (Players[CurrentPlayer].Integers[2]) then
Break;

if InvFull then
begin
if not AutoLogin then
FindNormalRandoms;
Drop_Ore;
if AutoLogin then
FindNormalRandoms;
ProgressReport;
Stats_SendReport;
end;
end;

if Error then
begin
DS('Error Occured', 'Error Occured Unfortunatly, Check the Progress Report');
ProgressReport;
Stats_SendReport;
if HowManyPlayers >= 2 then
begin
Players[CurrentPlayer].Active := False;
Logout;
NextPlayer(False);
LoginPlayer;
end else
TerminateScript;
end;

until (LoadsDropped = Players[CurrentPlayer].Integers[2]) and (InvFull); // Stops after LoadsDropped is Completed.

if not AutoLogin then
FindNormalRandoms;

WalkToBank;

if not AutoLogin then
FindNormalRandoms;

if Error then
begin
DS('Error Occured', 'Error Occured Unfortunatly, Check the Progress Report');
ProgressReport;
Stats_SendReport;
if HowManyPlayers >= 2 then
begin
Players[CurrentPlayer].Active := False;
Logout;
NextPlayer(False);
LoginPlayer;
end else
TerminateScript;
end;

if not AutoLogin then
FindNormalRandoms;

Bank_Ore;

if not AutoLogin then
FindNormalRandoms;

ProgressReport;
Stats_SendReport;

if Error then
begin
DS('Error Occured', 'Error Occured Unfortunatly, Check the Progress Report');
ProgressReport;
Stats_SendReport;

if HowManyPlayers >= 2 then
begin
Players[CurrentPlayer].Active := False;
Logout;
NextPlayer(False);
LoginPlayer;
end else
TerminateScript;
end;

if not AutoLogin then
FindNormalRandoms;

WalkToMine;

if not AutoLogin then
FindNormalRandoms;

if Error then
begin
DS('Error Occured', 'Error Occured Unfortunatly, Check the Progress Report');
ProgressReport;
Stats_SendReport;

if HowManyPlayers >= 2 then
begin
Players[CurrentPlayer].Active := False;
Logout;
NextPlayer(False);
LoginPlayer;
end else
TerminateScript;
end;

end; // Ends the For-To-Do Loop for the Individual Char.


if HowManyPlayers > 1 then
begin
Players[CurrentPlayer].Active := False;
Logout;
NextPlayer(False);
LoginPlayer;
end else
TerminateScript;

end; // Ends the For - To - Do Loop for the Whole Cast.
end.

Wanted

2010-07-25 23:17:26

Yes, obviously you have a lot of interesting in scripting. I think it's time we expanded your resources to beyond the SRL Membership gates.

Goodluck, we are expecting great things from you.

Awkwardsaw

2010-07-25 23:18:58

didnt you apply before, and you where let in, but didnt because registration was closed?

but if it matters still, yes :)

Wanted

2010-07-25 23:20:55

From: Awkwardsaw
didnt you apply before, and you where let in, but didnt because registration was closed?

but if it matters still, yes :)


His records show nothing about applying before.

I believe you're thinking of Frement's Application.

Awkwardsaw

2010-07-25 23:24:08

From: IceFire908
His records show nothing about applying before.

I believe you're thinking of Frement's Application.


i could have swore heaven applied too :o

Wanted

2010-07-25 23:26:15

From: Awkwardsaw
i could have swore heaven applied too :o


I thought the same, but apparently not

Anyways, I'm almost 100% positive you're thinking about this.

Awkwardsaw

2010-07-25 23:31:59

hmm, o well :p

he has a nice script. he shouldnt have any problem anyways :)

Nava2

2010-07-26 00:00:52

No because you forgot how much I halped. :<

noidea

2010-07-26 00:04:46

yes, but I dont like DDTMs. They takes lots of memory. Also, I dont like aca, but you are definitely ready.

Nava2

2010-07-26 00:13:56

In your DDTM procedure, please set the colours to variables so you aren't constantly calling SRL_Autocolor. It will make the procedure MUCH faster.

NCDS

2010-07-26 00:49:46

It's not bad. You should credit ACA when you use it too though ;)

I vote yes, you deserve to be in.

Blumblebee

2010-07-26 01:38:34

script is mediocre(ish, I didn't look at it too hard but there is some stuff I don't like about it), but your commitment and activity around the forums deserves a yes. Goodluck

cycrosism

2010-07-26 03:24:46

Looks good, yes.

ZephyrsFury

2010-07-26 03:48:37

Yessir! You're great!

Tickyy

2010-07-26 04:23:36

Yes, GL.

Sabzi

2010-07-26 04:30:02

Moar new member!
Yes.
(I have read the script and comments, I'm not only joking here.)

Heavenguard

2010-07-26 07:30:22

:D thanks for all the positive feedback, I didnt even know that making a Color Variable would speed up the DDTM's xD, I will do so immediately! @Nava, Im so sorry D: will most def fix. This is the First time im applying for members, i didnt apply with the previous script because I felt it wasn't "Perfect", but no script is perfect =[. I shall credit ACA as its helped me a great deal in my scripting experience. Thank you all so much for the positive feedback.

Wizzup?

2010-07-26 07:38:48

You learn quick. :)
Yes.

Gu3st...

2010-07-26 10:32:02

oh wow

of course!

Rick

2010-07-26 11:22:21

Yes, great attitude towards learning.

bugger0001

2010-07-26 14:12:33

Hmm…I like most of the script, but there is one thing I absolutely hate about your DDTMs:
  begin
SetArrayLength(dtmSubPoints, 4);
dtmMainPoint.x := 949;
dtmMainPoint.y := 217;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := AutoColor(SRL_VarrockRoadColor);
dtmMainPoint.Tolerance := DDTMTolerance;

dtmSubPoints[0].x := 949;
dtmSubPoints[0].y := 217;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[0].Tolerance := DDTMTolerance;

dtmSubPoints[1].x := 942;
dtmSubPoints[1].y := 211;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[1].Tolerance := DDTMTolerance;

dtmSubPoints[2].x := 969;
dtmSubPoints[2].y := 244;
dtmSubPoints[2].AreaSize := 6;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[2].Tolerance := DDTMTolerance;

dtmSubPoints[3].x := 967;
dtmSubPoints[3].y := 227;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[3].Tolerance := DDTMTolerance;
end;

Now here's how I'd do it:

begin
SetArrayLength(dtmSubPoints, 4);
ArrX := [949, 942, 969, 967];
ArrY := [217, 211, 244, 227];
Area := [3, 3, 6, 2];
Color := AutoColor(SRL_VarrockRoadColor);
dtmMainPoint.x := 949;
dtmMainPoint.y := 217;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := Color;
dtmMainPoint.Tolerance := DDTMTolerance;

for i := 0 to 3 do
begin
dtmSubPoints[i].x := ArrX[i];
dtmSubPoints[i].y := ArrY[i];
dtmSubPoints[i].AreaSize := Area[i];
dtmSubPoints[i].AreaShape := 0;
dtmSubPoints[i].Color := Color;
dtmSubPoints[i].Tolerance := DDTMTolerance;
end;
end;

But all in all it is still a YES. GL

Heavenguard

2010-07-26 14:36:07

From: bugger0001
Hmm…I like most of the script, but there is one thing I absolutely hate about your DDTMs:
  begin
SetArrayLength(dtmSubPoints, 4);
dtmMainPoint.x := 949;
dtmMainPoint.y := 217;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := AutoColor(SRL_VarrockRoadColor);
dtmMainPoint.Tolerance := DDTMTolerance;

dtmSubPoints[0].x := 949;
dtmSubPoints[0].y := 217;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[0].Tolerance := DDTMTolerance;

dtmSubPoints[1].x := 942;
dtmSubPoints[1].y := 211;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[1].Tolerance := DDTMTolerance;

dtmSubPoints[2].x := 969;
dtmSubPoints[2].y := 244;
dtmSubPoints[2].AreaSize := 6;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[2].Tolerance := DDTMTolerance;

dtmSubPoints[3].x := 967;
dtmSubPoints[3].y := 227;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := AutoColor(SRL_VarrockRoadColor);
dtmSubPoints[3].Tolerance := DDTMTolerance;
end;

Now here's how I'd do it:

begin
SetArrayLength(dtmSubPoints, 4);
ArrX := [949, 942, 969, 967];
ArrY := [217, 211, 244, 227];
Area := [3, 3, 6, 2];
Color := AutoColor(SRL_VarrockRoadColor);
dtmMainPoint.x := 949;
dtmMainPoint.y := 217;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := Color;
dtmMainPoint.Tolerance := DDTMTolerance;

for i := 0 to 3 do
begin
dtmSubPoints[i].x := ArrX[i];
dtmSubPoints[i].y := ArrY[i];
dtmSubPoints[i].AreaSize := Area[i];
dtmSubPoints[i].AreaShape := 0;
dtmSubPoints[i].Color := Color;
dtmSubPoints[i].Tolerance := DDTMTolerance;
end;
end;

But all in all it is still a YES. GL


:duh: Wow im so stupid, I knew I should have done that. Thanks so much. Will Fix. Some SubPoints do have a different Color then others, but overall yes, that method will be used.

bugger0001

2010-07-26 14:46:22

Well, if different colors, then have an array for colors aswell ;)

noidea

2010-07-26 16:02:31

Who are the idiots voting no without saying anything? You should be disallowed to vote.

Wanted

2010-07-26 18:10:18

From: noidea
Who are the idiots voting no without saying anything? You should be disallowed to vote.


People have been trolling the votes for a long time I think we should check and see if it's the same people doing it by looking at the previous polls

noidea

2010-07-26 21:42:13

From: IceFire908
People have been trolling the votes for a long time I think we should check and see if it's the same people doing it by looking at the previous polls


Its sad it comes to this.

Dynamite

2010-07-26 22:24:51

Yes.

EvilChicken!

2010-07-26 22:39:03

bugger0001 said what I was thinking regarding your DDTMs. And, as others also mentioned, the most advanced functions you have in your scripts, are generated by ACAv2. I'm still leaning towards a yes because of your general attitude and how well it shows that you actually want to script and how much you want to be a productive member of this society – but I will not vote, because this a prime example, in my eyes, of how far SRL membership applications are from being black & white. If it was up to me, I'd let you polish some more on your scripts and re-apply in a single week, .. but then again, it's not up to me solemnly.
Not that I think my opinions matter for the outcome, seeing as how the poll is showing 19 pro and 2 con, but at least you have my opinion. Please don't take it personally, I intend only the best for you and the society.

Heavenguard

2010-07-26 23:18:44

From: EvilChicken!
bugger0001 said what I was thinking regarding your DDTMs. And, as others also mentioned, the most advanced functions you have in your scripts, are generated by ACAv2. I'm still leaning towards a yes because of your general attitude and how well it shows that you actually want to script and how much you want to be a productive member of this society – but I will not vote, because this a prime example, in my eyes, of how far SRL membership applications are from being black & white. If it was up to me, I'd let you polish some more on your scripts and re-apply in a single week, .. but then again, it's not up to me solemnly.
Not that I think my opinions matter for the outcome, seeing as how the poll is showing 19 pro and 2 con, but at least you have my opinion. Please don't take it personally, I intend only the best for you and the society.


I Completely understand and appreciate your Opinion EvilChicken. Thanks for putting so much thought into it. Well, Color has to have good colors lol, but I definitely need to use more methods, and I Will. Thank you so much. Your opinion will have a great effect on my outcome as a scripter.

Daniel

2010-07-27 03:19:00

How much of this script did you actually write yourself? Because judging by your skill level you displayed to me on IRC, you seem much of a beginner…

Coh3n

2010-07-27 05:59:32

Yes. :)

Heavenguard

2010-07-27 07:50:19

[QUOTE=Dan's The Man;726996]How much of this script did you actually write yourself? Because judging by your skill level you displayed to me on IRC, you seem much of a beginner…[/QUOTE]

I don't see how you can judge my skill level based on IRC =/ I'm pretty sure I just asked you a question [I was very stressed, as I did try to solve the problem on my own] and I wont describe the way you answered it to me. Idk, maybe I got the wrong IRC name for you, but I do recall being told im "absolutely new and [B]think[/B] I can script without even knowing the basics of the basics." Maybe asking for help in the first place is wrong… that seems to be the impression i obtained while obtaining help from you. Although you did help me with this simple problem, you left me feeling even more stressed then how it was when i just asked for a little help. [The problem was a simple DeclarePlayers procedure, I didnt really understand some of its functions and procedures fully to use them in a loop]. Maybe I seem much of a beginner in your eyes, and maybe thats why you -would- give me a No on this poll. im sorry to say that if what I showed you here [which I wrote by myself =/, it was not hard at all] and my countless hours of Tutorial Reading and MSN Help, is not enough to say that I know something about scripting, then so be it.

Thank you for your feedback, and that was just my opinion.

3Garrett3

2010-07-27 18:11:11

First thing's first:

I like your use of the Player / integer array for the method of breaking and such, although it makes the script a little harder to read (memorizing Integers[0] and [1] etc). The logic seems well thought out, and I like it.

All of the autocolour functions have been commented on, so I will leave that alone.

In your DDTMs, I noticed that you have like 10 points for each one. Why would you need this many points? I use 4 subpoints on all of my DDTMs and they always work fine. More points means that the DDTM will be slower to find, and it will take longer to load, which defeats a point of a DDTM really.

You also don't even use them in a dynamic manner. A correct DDTM should have a dynamic value for AreaSize and a dynamic Tol. Meaning that if you don't find the DDTM with a small AreaSize and small Tolerance, it will reload it with a larger area and larger Tolerance, making the script more accurate.


dtmSubPoints[0].x := 885;
dtmSubPoints[0].y := 296;
dtmSubPoints[0].AreaSize := ASize;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RColour;
dtmSubPoints[0].Tolerance := Tol;

Something along those lines would be better at effectively being a DDTM.

You should also declare your road colors as a local var, rather than loading it each time you load a point, it will significantly slow down your DDTMs. And your tolerance should be much lower than 15 and such if you are using an autocolour.

In your FindRock procedure, you simply only check the first ATPA value, and then quit. If that isn't a rock, what will happen? You should check every ATPA found and break out of a loop when you find the correct rock.

IE

for i := 0 to High(ATPA) do
begin
MMouse(ATPA[i], etc)
If Uptextmatch then
begin
stuff
exit;
end;
end;

That way, it should find it better, rather than only checking one ATPA.

In your FixPlayer color function, I'm not sure if just changing the DTMTolerance will work, I've never done it that way. I always thought you had to reload the DDTM. Things may have changed though, or I might have always been wrong. Who knows.


while not RS_OnMinimap(X, Y) do
begin
Inc(Y);
Inc(X);
end;

This probably creates a large amount of lag, there isn't a wait while it's increasing variables. I'd put a Wait(1) in there just so the script doesn't go overboard, because the variables will be 0,0 if the DTM isn't found, and have to be increased a large amount before they are found on the minimap. Actually, I doubt this even works, because it will increase them at the same rate, and they will not likely be at the minimap. It will only create coords like (25,25) not anything that will go on the minimap, I don't think..

Your colour walking also has lots of points that will continue on walking even if it isn't successful, and will go through a lot of code if the first part doesn't work. I think you need to look at making the walking procedure a function and returning false if it doesn't work, and work on making it come out of any potential endless loops (I can see a couple that might happen) and any loops that may end up wrecking your walking, for example:


repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
IncEx(DDTMTolerance, 5)
else
begin
Mouse(X, Y + 10, 3, 3, True);
Flag;
DDTMTolerance := 10;
Break;
end;
until DDTMTolerance >= 50;

Will repeat until it is found or the tolerance goes above 50. What happens if it is above 50 and doesn't find it? Ie the DDTM is broken or there is something messed up in which it isn't found for some reason or another (maybe the autocolour fails). It will continue trying to walk the next step even if it didn't walk this one, which means the walking will fail. I think you reallllly need to work on more failsafes in the walking. I know you're probably going to tell me that you have Reflection as your main walking method, but that really isn't good enough for me. Anyone can pump out reflection walking. My reflection fisher took 4 hours of work to make, and doesn't really show much skill.

I want to base my vote off of the colour skill only, but I have to look over the reflection too. I can leave detailed feedback if you'd like but I'm out of time for right now. I'll just mention one word: Failsafes!

Sorry that most of it is negative, but you can learn more from that kind of constructive criticism than from saying what I like anyway.

I'm holding my vote btw. You seem to want to learn, but there are a lot of things that I would like to have improved.

Heavenguard

2010-07-27 18:26:18

From: 3Garrett3
First thing's first:

I like your use of the Player / integer array for the method of breaking and such, although it makes the script a little harder to read (memorizing Integers[0] and [1] etc). The logic seems well thought out, and I like it.

All of the autocolour functions have been commented on, so I will leave that alone.

In your DDTMs, I noticed that you have like 10 points for each one. Why would you need this many points? I use 4 subpoints on all of my DDTMs and they always work fine. More points means that the DDTM will be slower to find, and it will take longer to load, which defeats a point of a DDTM really.

You also don't even use them in a dynamic manner. A correct DDTM should have a dynamic value for AreaSize and a dynamic Tol. Meaning that if you don't find the DDTM with a small AreaSize and small Tolerance, it will reload it with a larger area and larger Tolerance, making the script more accurate.


dtmSubPoints[0].x := 885;
dtmSubPoints[0].y := 296;
dtmSubPoints[0].AreaSize := ASize;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RColour;
dtmSubPoints[0].Tolerance := Tol;

Something along those lines would be better at effectively being a DDTM.

You should also declare your road colors as a local var, rather than loading it each time you load a point, it will significantly slow down your DDTMs. And your tolerance should be much lower than 15 and such if you are using an autocolour.

In your FindRock procedure, you simply only check the first ATPA value, and then quit. If that isn't a rock, what will happen? You should check every ATPA found and break out of a loop when you find the correct rock.

IE

for i := 0 to High(ATPA) do
begin
MMouse(ATPA[i], etc)
If Uptextmatch then
begin
stuff
exit;
end;
end;

That way, it should find it better, rather than only checking one ATPA.

In your FixPlayer color function, I'm not sure if just changing the DTMTolerance will work, I've never done it that way. I always thought you had to reload the DDTM. Things may have changed though, or I might have always been wrong. Who knows.


while not RS_OnMinimap(X, Y) do
begin
Inc(Y);
Inc(X);
end;

This probably creates a large amount of lag, there isn't a wait while it's increasing variables. I'd put a Wait(1) in there just so the script doesn't go overboard, because the variables will be 0,0 if the DTM isn't found, and have to be increased a large amount before they are found on the minimap. Actually, I doubt this even works, because it will increase them at the same rate, and they will not likely be at the minimap. It will only create coords like (25,25) not anything that will go on the minimap, I don't think..

Your colour walking also has lots of points that will continue on walking even if it isn't successful, and will go through a lot of code if the first part doesn't work. I think you need to look at making the walking procedure a function and returning false if it doesn't work, and work on making it come out of any potential endless loops (I can see a couple that might happen) and any loops that may end up wrecking your walking, for example:


repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
IncEx(DDTMTolerance, 5)
else
begin
Mouse(X, Y + 10, 3, 3, True);
Flag;
DDTMTolerance := 10;
Break;
end;
until DDTMTolerance >= 50;

Will repeat until it is found or the tolerance goes above 50. What happens if it is above 50 and doesn't find it? Ie the DDTM is broken or there is something messed up in which it isn't found for some reason or another (maybe the autocolour fails). It will continue trying to walk the next step even if it didn't walk this one, which means the walking will fail. I think you reallllly need to work on more failsafes in the walking. I know you're probably going to tell me that you have Reflection as your main walking method, but that really isn't good enough for me. Anyone can pump out reflection walking. My reflection fisher took 4 hours of work to make, and doesn't really show much skill.

I want to base my vote off of the colour skill only, but I have to look over the reflection too. I can leave detailed feedback if you'd like but I'm out of time for right now. I'll just mention one word: Failsafes!

Sorry that most of it is negative, but you can learn more from that kind of constructive criticism than from saying what I like anyway.

I'm holding my vote btw. You seem to want to learn, but there are a lot of things that I would like to have improved.



program HMS;
{$DEFINE SMARt}
{$i srl\srl.scar}
{$i reflection\reflection.simba}
//{$i srl/srl/misc/debug.scar}

{ Made in Honor of Cigue, you rock buddy. }

{Big Thank you to my Buddies Coh3n [AutoColors], Wizzup[IRC-Simba Help],
and of course ZephyrsFury[MSN Help], Nava2 [IRC Help]. Another Thank you to
ILuffsYews for his IRC Help with Reflection.
This script was Resurrected as a Celebration of MSI Pheonix.}

{Global Constants}
const
ReflectionWorking = True; // If Reflection is not working, make it False.
VersionNumber = '1.00'; // No Need to Touch.

{Global Variables}
var
DDTMTolerance : Integer;

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

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Loc := 'Varrock East Mine'; // Where is your player starting from? ['Varrock East Mine', 'Varrock East Bank']
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
Integers[0] := 10; // Set the Amount of Loads the Player Banks.
Integers[1] := 2; // Max Seconds to Wait while Mining an Ore.
Integers[2] := 10; // How Many Minutes should this player take a break for?
Integers[3] := 5; // After How Many Loads Should this Player take a Break?
Strings[0] := 'Copper'; // Ore to Mine, Valid Arguments = ['Iron','Copper','Tin'].
Booleans[0] := False; // True if Pickaxe is Equipped, False if not.
//If False, Keep Pickaxe in First Inventory Slot!
Booleans[1] := True; // Player Takes Breaks? True for Yes, False for no.
end;

// To Use more then 1 Player, Take out the { sign next to with .. do.
{with Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Loc := 'Varrock East Mine';// Where is your player starting from? Valid Arguments = ['Varrock East Mine', 'Varrock East Bank']
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
Integers[0] := 10; // Set the Amount of Loads the Player Banks.
Integers[1] := 4; // Max Seconds to Wait while Mining an Ore.
Integers[2] := 20; // How Many Minutes should this player take a break for?
Integers[3] := 20; // After How Many Loads Should this Player take a Break?
Strings[0] := 'Tin'; // Ore to Mine, Valid Arguments = ['Iron','Copper','Tin'].
Booleans[0] := True; // True if Pickaxe is Equipped, False if not.
//If False, Keep Pickaxe in First Inventory Slot!
Booleans[1] := True; // Player Takes Breaks? True for Yes, False for no.
end;

{with Players[2] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Loc := 'Varrock East Mine' // Where is your player starting from? Valid Arguments = ['Varrock East Mine', 'Varrock East Bank']
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
Integers[0] := 10; // Set the Amount of Loads the Player Banks.
Integers[1] := 2; // Max Seconds to Wait while Mining an Ore.
Integers[2] := 10; // How Many Minutes should this player take a break for?
Integers[3] := 5; // After How Many Loads Should this Player take a Break?
Strings[0] := 'Iron'; // Ore to Mine, Valid Arguments = ['Iron','Copper','Tin'].
Booleans[0] := False; // True if Pickaxe is Equipped, False if not.
//If False, Keep Pickaxe in First Inventory Slot!
Booleans[1] := True; // Player Takes Breaks? True for Yes, False for no.
end;

{with Players[3] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Loc := 'Varrock East Mine' // Where is your player starting from? Valid Arguments = ['Varrock East Mine', 'Varrock East Bank']
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
Integers[0] := 10; // Set the Amount of Loads the Player Banks.
Integers[1] := 2; // Max Seconds to Wait while Mining an Ore.
Integers[2] := 10; // How Many Minutes should this player take a break for?
Integers[3] := 5; // After How Many Loads Should this Player take a Break?
Strings[0] := 'Iron'; // Ore to Mine, Valid Arguments = ['Iron','Copper','Tin'].
Booleans[0] := False; // True if Pickaxe is Equipped, False if not.
//If False, Keep Pickaxe in First Inventory Slot!
Booleans[1] := True; // Player Takes Breaks? True for Yes, False for no.
end;

{To Add More Players, Copy and Paste a With .. Do Statement just above this,
and change the Player Number. Example: Players[4]}

end;

procedure Antiban;
begin
case Random(70) of
0: RandomRClick;
1: HoverSkill('mining', False);
2: PickUpMouse;
4: RandomMovement;
5: BoredHuman;
6: ExamineInv;
end;
end;

function Breaking : Integer;
begin
if Players[CurrentPlayer].Booleans[1] = True then
begin
if Players[CurrentPlayer].Banked Mod Players[CurrentPlayer].Integers[3] = 0 then
begin
Result := Players[CurrentPlayer].Integers[2];
LogOut;
Wait(Result * 60000);
LoginPlayer;
Inc(Players[CurrentPlayer].Worked);
end;
end;
end;

{************************************ Color ***********************************}

{AutoColor Functions}
function IronOreColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.13);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 2041922, MSX1, MSY1, MSX2, MSY2, 8);
if (Length(arP) = 0) then
begin
{Writeln('Failed to find the color, no result.');}
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.33) and (X <= 6.14) and (Y >= 1.21) and (Y <= 5.19) and (Z >= 0.90) and (Z <= 3.51) then
begin
Result := arC[i];
{Writeln('AutoColor = ' + IntToStr(arC[i]));}
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
{if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');}
end;

function CopperOreColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.06);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 3891080, MSX1, MSY1, MSX2, MSY2, 10);
if (Length(arP) = 0) then
begin
{Writeln('Failed to find the color, no result.');}
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 8.66) and (X <= 23.73) and (Y >= 7.94) and (Y <= 21.55) and (Z >= 3.54) and (Z <= 9.23) then
begin
Result := arC[i];
{Writeln('AutoColor = ' + IntToStr(arC[i]));}
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
{if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');}
end;

function TinOreColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.16, 0.07);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 7105907, MSX1, MSY1, MSX2, MSY2, 20);
if (Length(arP) = 0) then
begin
{Writeln('Failed to find the color, no result.');}
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 4.46) and (X <= 34.31) and (Y >= 4.59) and (Y <= 35.39) and (Z >= 4.91) and (Z <= 37.38) then
begin
Result := arC[i];
{Writeln('AutoColor = ' + IntToStr(arC[i]));}
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
{if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');}
end;

{DDTM}

function SetDDTM(Number : Integer) : Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array of TDTMPointDef;
TempTDTM: TDTM;
ArrX, ArrY : TIntegerArray;
Area : TIntegerArray;
Color : TIntegerArray;
Tol : TIntegerArray;
Var1, VRC, LRC, MRC : Integer;
begin
VRC := AutoColor(SRL_VarrockRoadColor);
LRC := AutoColor(SRL_LightDirtRoadColor);
MRC := AutoColor(SRL_MineRockColor);

case Number of
1:
begin
SetArrayLength(dtmSubPoints, 4);
ArrX := [949, 942, 969, 967];
ArrY := [217, 211, 244, 227];
Area := [3, 3, 6, 2];
Color := [VRC, VRC, VRC, VRC]
dtmMainPoint.x := 949;
dtmMainPoint.y := 217;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := VRC;
dtmMainPoint.Tolerance := DDTMTolerance;

for Var1 := 0 to 3 do
begin
dtmSubPoints[Var1].x := ArrX[Var1];
dtmSubPoints[Var1].y := ArrY[Var1];
dtmSubPoints[Var1].AreaSize := Area[Var1];
dtmSubPoints[Var1].AreaShape := 0;
dtmSubPoints[Var1].Color := Color[Var1];
dtmSubPoints[Var1].Tolerance := DDTMTolerance;
end;
end;

2:
begin
SetArrayLength(dtmSubPoints, 5);
ArrX := [874, 973, 928, 918, 909];
ArrY := [226, 235, 229, 285, 207];
Area := [3, 8, 8, 4, 4];
Color := [VRC, LRC, LRC, VRC, VRC];

dtmMainPoint.x := 874;
dtmMainPoint.y := 226;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := VRC;
dtmMainPoint.Tolerance := 15;

for Var1 := 0 to 4 do
begin
dtmSubPoints[Var1].x := ArrX[Var1];
dtmSubPoints[Var1].y := ArrY[Var1];
dtmSubPoints[Var1].AreaSize := Area[Var1];
dtmSubPoints[Var1].AreaShape := 0;
dtmSubPoints[Var1].Color := Color[Var1];
dtmSubPoints[Var1].Tolerance := 15;
end;
end;

3:
begin
SetArrayLength(dtmSubPoints, 3);
ArrX := [961, 892, 884];
ArrY := [239, 219, 239];
Area := [1, 1, 1];
Color := [VRC, VRC, VRC];

dtmMainPoint.x := 961;
dtmMainPoint.y := 239;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := VRC;
dtmMainPoint.Tolerance := DDTMTolerance;

for Var1 := 0 to 2 do
begin
dtmSubPoints[Var1].x := ArrX[Var1];
dtmSubPoints[Var1].y := ArrY[Var1];
dtmSubPoints[Var1].AreaSize := Area[Var1];
dtmSubPoints[Var1].AreaShape := 0;
dtmSubPoints[Var1].Color := Color[Var1];
dtmSubPoints[Var1].Tolerance := DDTMTolerance;
end;
end;

4:
begin
SetArrayLength(dtmSubPoints, 10);
ArrX := [937, 944, 932, 926, 911, 897, 928, 937, 889, 873, 860];
ArrY := [337, 312, 298, 276, 276, 275, 259, 243, 276, 275, 275];
Area := [5, 2, 6, 2, 3, 5, 2, 2, 2, 2];
Color := [VRC, VRC, VRC, VRC, VRC, VRC, VRC, VRC, VRC, VRC];
dtmMainPoint.x := 961;
dtmMainPoint.y := 239;
dtmMainPoint.AreaSize := 5;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := VRC;
dtmMainPoint.Tolerance := 15;

for Var1 := 0 to 9 do
begin
dtmSubPoints[Var1].x := ArrX[Var1];
dtmSubPoints[Var1].y := ArrY[Var1];
dtmSubPoints[Var1].AreaSize := Area[Var1];
dtmSubPoints[Var1].AreaShape := 0;
dtmSubPoints[Var1].Color := Color[Var1];
dtmSubPoints[Var1].Tolerance := 15;
end;
end;

5:
begin
SetArrayLength(dtmSubPoints, 9);
ArrX := [883, 889, 908, 926, 933, 912, 863, 900, 866];
ArrY := [290, 320, 286, 321, 259, 234, 312, 314, 290];
Area := [0, 8, 4, 4, 4, 4, 7, 8, 6];
Color := [6842471, MRC, VRC, VRC, VRC, VRC, MRC, MRC, MRC];
Tol := [500, 15, 15, 15, 15, 15, 15, 15, 15]
dtmMainPoint.x := 883;
dtmMainPoint.y := 290;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := VRC;
dtmMainPoint.Tolerance := 500;

for Var1 := 0 to 8 do
begin
dtmSubPoints[Var1].x := ArrX[Var1];
dtmSubPoints[Var1].y := ArrY[Var1];
dtmSubPoints[Var1].AreaSize := Area[Var1];
dtmSubPoints[Var1].AreaShape := 0;
dtmSubPoints[Var1].Color := Color[Var1];
dtmSubPoints[Var1].Tolerance := Tol[Var1];
end;
end;

6:
begin
SetArrayLength(dtmSubPoints, 10);
ArrX := [900, 921, 933, 940, 926, 944, 927, 940, 933, 922]
ArrY := [298, 282, 297, 317, 268, 246, 228, 231, 266, 221]
Area := [0, 4, 4, 4, 4, 4, 4, 4, 4, 3]
Color := [1721433, VRC, VRC, VRC, VRC, VRC, VRC, VRC, VRC, VRC]
Tol := [500, 15, 15, 15, 15, 15, 15, 15, 15, 15]
dtmMainPoint.x := 900;
dtmMainPoint.y := 298;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 1721433;
dtmMainPoint.Tolerance := 500;

for Var1 := 0 to 9 do
begin
dtmSubPoints[Var1].x := ArrX[Var1];
dtmSubPoints[Var1].y := ArrY[Var1];
dtmSubPoints[Var1].AreaSize := Area[Var1];
dtmSubPoints[Var1].AreaShape := 0;
dtmSubPoints[Var1].Color := Color[Var1];
dtmSubPoints[Var1].Tolerance := Tol[Var1];
end;
end;


7:
begin
SetArrayLength(dtmSubPoints, 10);
ArrX := [885, 920, 935, 928, 944, 932, 945, 963, 934, 922]
ArrY := [296, 282, 306, 268, 244, 298, 318, 323, 229, 221]
Area := [0, 4, 4, 4, 4, 4, 4, 4, 4, 4]
Color := [1721433, VRC, VRC, VRC, VRC, VRC, VRC, VRC, VRC, VRC]
Tol := [500, 15, 15, 15, 15, 15, 15, 15, 15, 15]
dtmMainPoint.x := 885;
dtmMainPoint.y := 296;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 1721433;
dtmMainPoint.Tolerance := 500;

for Var1 := 0 to 9 do
begin
dtmSubPoints[Var1].x := ArrX[Var1];
dtmSubPoints[Var1].y := ArrY[Var1];
dtmSubPoints[Var1].AreaSize := Area[Var1];
dtmSubPoints[Var1].AreaShape := 0;
dtmSubPoints[Var1].Color := Color[Var1];
dtmSubPoints[Var1].Tolerance := Tol[Var1];
end;
end;

end;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

{procedures / functions}

procedure VarrockCLRMineOre;
var
X, Y : Integer;
TimeLimit : Integer;
RockTPA : TPointArray;
RockATPA: T2DPointArray;
InventoryCheck : Integer;
RockColor : Integer;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
InventoryCheck := InvCount;
Antiban;
ColorToleranceSpeed(1);
SetRun(True);
SetAngle(True);
case Players[CurrentPlayer].Strings[0] of
'Iron': RockColor := IronOreColor;
'Copper': RockColor := CopperOreColor;
'Tin': RockColor := TinOreColor;
end;
FindColorsSpiralTolerance(X, Y, RockTPA, RockColor, MSX1, MSY1, MSX2, MSY2, 7);
if (Length(RockTPA) >= 5) then
begin
SortTPAFrom(RockTPA, Point(MSCX, MSCY));
RockATPA := TPAtoATPAEx(RockTPA, 20, 10);
MiddleTPAEx(RockATPA[0], X, Y);
MMouse(X, Y, 4, 4);
if WaitUpTextMulti(['ine', 'ron'], 300) then
begin
Mouse(X, Y, 4, 4, True);
TimeLimit := 0;
while not InvCount = InventoryCheck + 1 do
begin
IncEx(TimeLimit, 100);
Wait(100);
if TimeLimit >= Players[CurrentPlayer].Integers[1] * 1000 then
Break;
end;
end;
end;
end;

function VarrockCLRFixPlayer : Boolean;
var
TheDDTM : Integer;
X, Y : Integer;
NearbyRock : String;
begin
if not LoggedIn then Exit;
DDTMTolerance := 10;
NearbyRock := Players[CurrentPlayer].Strings[0];
case NearbyRock of
'Iron': TheDDTM := SetDDTM(5);
'Copper': TheDDTM := SetDDTM(6);
'Tin': TheDDTM := SetDDTM(7);
end;
repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
IncEx(DDTMTolerance, 5)
else
begin
Mouse(X, Y + 10, 3, 3, True);
Flag;
DDTMTolerance := 10;
Result := True;
Break;
end;
until DDTMTolerance >= 50;
DDTMTolerance := 10;
FreeDTM(TheDDTM);
end;

procedure VarrockCLRWalk(Destination : String);
var
X, Y : Integer;
BankerDots : Integer;
TheDDTM : Integer;
TimeLimit : Integer;
begin
case Destination of

'Bank':
begin
if not LoggedIn then Exit;
MarkTime(TimeLimit);
ClickNorth(True);
DDTMTolerance := 15;
TheDDTM := SetDDTM(5);
repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
IncEx(DDTMTolerance, 5)
else
begin
Mouse(X, Y + 10, 3, 3, True);
Flag;
DDTMTolerance := 10;
Break;
end;
until DDTMTolerance >= 50;
DDTMTolerance := 10;
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(1);
repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2) then
IncEx(DDTMTolerance, 5)
else
begin
Mouse(X, Y, 4, 4, True);
Flag;
Break;
end;
until (DDTMTolerance = 50) or (TimeFromMark(TimeLimit) >= 15000);
DDTMTolerance := 15;
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(2);
repeat
if RadialWalkAutoColor(0, 345, 370, 74, 1, 1) then
Flag;
until (DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) or (TimeFromMark(TimeLimit) >= 30000);
while not RS_OnMinimap(X, Y) do
begin
Inc(Y);
Inc(X);
end;
Mouse(X, Y + Random(10), 4, 4, True);
Flag;
Wait(1000 + Random(400));
FreeDTM(TheDDTM);
BankerDots := DTMFromString('78DA639CCACCC060C4C8800C1E3D7AC4F0052' +
'804136504A9B180F058A0627FFE3041E4606A6612A1662E508D25013' +
'5138830A797B01A00885D127E');

RadialWalkAutoColor(0, 256, 274, 60, 1, 1);
if not (DTMRotated(BankerDots, X, Y, MMX1, MMCY, MMX2, MMY2)) or (FindSymbol(X, Y, 'bank')) then
repeat
if RadialWalkAutoColor(0, 256, 274, 50, 1, 1) then
Wait(780);
until (DTMRotated(BankerDots, X, Y, MMX1, MMCY, MMX2, MMY2)) or (FindSymbol(X, Y, 'bank'));
while not RS_OnMinimap(X, Y) do
begin
Dec(Y);
Inc(X);
end;
Mouse(X + 6, Y, 4, 4, True);
Flag;
FreeDTM(BankerDots);
end;

'MiningArea':
begin
if not LoggedIn then Exit;
MarkTime(TimeLimit);
ClickNorth(True);
DDTMTolerance := 15;
TheDDTM := SetDDTM(3);
repeat
if not DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMCY) then
IncEx(DDTMTolerance, 5)
else
begin
while not RS_OnMinimap(X, Y) do
begin
Dec(X);
Inc(Y);
end;
Mouse(X, Y + Random(10), 4, 4, True);
Flag;
Break;
end;
until (DDTMTolerance = 50) or (TimeFromMark(TimeLimit) >= 15000);
DDTMTolerance := 15;
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(4);
repeat
if RadialWalkAutoColor(0, 78, 103, 64, 1, 1) then
Wait(1000);
until (DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) or (TimeFromMark(TimeLimit) >= 30000);
while not RS_OnMinimap(X, Y) do
begin
Dec(X);
Dec(Y);
end;
Mouse(X, Y, 4, 4, True);
Wait(500);
if not FlagPresent then
MFF(X, Y, 1, 1);
Flag;
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(5);
SymbolAccuracy := 0.5;
RadialWalkAutoColor(0, 160, 183, 66, 1, 1);
RadialWalkAutoColor(0, 164, 188, 61, 1, 1);
repeat
RadialWalkAutoColor(0, 164, 188, 61, 1, 1);
MFF(X, Y, 1, 1);
until (DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) or (FindSymbol(X, Y, 'mine')) or (TimeFromMark(TimeLimit) >= 45000);
if not (DTMRotated(TheDDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
while not RS_OnMinimap(X, Y) do
begin
Dec(Y);
Inc(X);
end;
Mouse(X, Y, 4, 4, True);
Flag;
FreeDTM(TheDDTM);
SymbolAccuracy := 1.0;
end else
begin
Mouse(X, Y, 4, 4, True);
Flag;
FreeDTM(TheDDTM);
SymbolAccuracy := 1.0;
end;
MarkTime(TimeLimit);
Wait(1500);
if VarrockCLRFixPlayer then Exit;
end;
end;
end;

procedure VarrockCLRBank;
var
Attempts : Integer;
TotalAttempts : Integer;
begin
for TotalAttempts := 0 to 3 do
begin
if not LoggedIn then Exit;
Wait(1200 + Random(3000));
OpenBank('veb', False, False);
Wait(900 + Random(1000));
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
if not BankScreen then
for Attempts := 0 to 3 do
begin
InPin(Players[CurrentPlayer].Pin);
if BankScreen then Break;
end;
if Players[CurrentPlayer].Booleans[0] = True then
DepositAll;
if Players[CurrentPlayer].Booleans[0] = False then
Deposit(2, 28, True);
Inc(Players[CurrentPlayer].Banked);
if not InvFull then
Break;
end;
end;

{*********************************Reflection***********************************}
function VarrockRFLTMineOre : String; // Obj Hooks are Outdated.
var
RockType : TRSObjectArray;
AnimationTime : Integer;
begin
R_FindRandoms;
case Result of
'Iron': RockType := GetObjectsByID([11954, 11557, 11956, 11556, 11555, 11955], OBJECT_TYPE_INTERACTABLE, 25);
'Copper': RockType := GetObjectsByID([11954, 11557, 11956, 11556, 11555, 11955], OBJECT_TYPE_INTERACTABLE, 25);
'Tin': RockType := GetObjectsByID([11954, 11557, 11956, 11556, 11555, 11955], OBJECT_TYPE_INTERACTABLE, 25);
end;
if Length(RockType) >= 1 then
begin
Mouse(RockType[0].Tile.x, RockType[0].Tile.y, 3, 3, True);
while GetAnimation = 624 do
begin
if (AnimationTime >= 30) then
Break;
Inc(AnimationTime);
Wait(1000);
end;
end;
end;

function VarrockRFLTLoadPath(Path : String) : TTileArray;
begin
case Path of

'Bank':
begin
SetLength(Result, 7);
Result := [Tile(3293, 3381), Tile(3291, 3396), Tile(3289, 3410),
Tile(3286, 3422), Tile(3276, 3428), Tile(3262, 3428),
Tile(3254, 3420)];
end;

'MiningArea':
begin
SetLength(Result, 8);
Result := [Tile(3261, 3428), Tile(3276, 3428), Tile(3287, 3422),
Tile(3291, 3407), Tile(3292, 3391), Tile(3293, 3383),
Tile(3290, 3374), Tile(3286, 3368)];
end;

end;
end;

function VarrockRFLTFixPlayer : String;
begin
Result := Players[CurrentPlayer].Strings[0];
case Result of
'Iron': WalkToTile(Tile(3286, 3368), 0, 0);
'Copper': WalkToTile(Tile(3288, 3363), 0, 0);
'Tin': WalkToTile(Tile(3283, 3363), 0, 0);
end;
end;


procedure VarrockRFLTWalk(Destination : String);
begin
if not LoggedIn then Exit;
R_MakeCompass('N');
case Destination of
'Bank':
begin
WalkPath(VarrockRFLTLoadPath('Bank'));
end;
'MiningArea':
begin
WalkPath(VarrockRFLTLoadPath('MiningArea'));
end;
end;
end;

procedure VarrockRFLTBank; // procedure seems to not work.
var
Attempts : Integer;
begin
R_OpenBankBooth('veb');
if R_PinScreen then
InPin(Players[CurrentPlayer].Pin);
if not R_BankScreen then
for Attempts := 0 to 3 do
begin
InPin(Players[CurrentPlayer].Pin);
if R_BankScreen then Break;
end;
if Players[CurrentPlayer].Booleans[0] = True then
DepositAll;
if Players[CurrentPlayer].Booleans[0] = False then
Deposit(2, 28, True);
Inc(Players[CurrentPlayer].Banked);
end;

{**************************Progress Report*************************************}

procedure ProgressReport;
var
Var1 : Integer;
begin
Writeln('');
Writeln('***************************************************************');
Writeln('I Varrock East Mine + Bank Progress Report I');
Writeln(' Version ' + VersionNumber);
Writeln('I Made By: Heavenguard I');
if ReflectionWorking = True then
Writeln('I Script is using Reflection I');
if ReflectionWorking = False then
Writeln('I Script is using Color I');
Writeln(' Total Script Run Time: ' + TimeRunning );
Writeln('***************************************************************');

for Var1 := 0 to HowManyPlayers - 1 do
with Players[Var1] do
begin
Writeln(' Player ' + IntToStr(Var1 + 1) );
Writeln(' Rock Type: ' + Players[Var1].Strings[0] );
Writeln('Player ' + IntToStr(Var1 + 1) + ' Banked ' + IntToStr(Players[Var1].Banked) + ' Loads ');
Writeln('That should be about ' + IntToStr(Players[Var1].Banked * 28) + ' Ores, give or take.');
if Players[Var1].Strings[0] = 'Iron' then
Writeln('That should also be about ' + IntToStr(Players[Var1].Banked * 28 * 35) + ' Mining Experience.');
if Players[Var1].Strings[0] = 'Copper' then
Writeln('That should also be about ' + IntToStr(Players[Var1].Banked * 28 * 17) + ' Mining Experience.');
if Players[Var1].Strings[0] = 'Tin' then
Writeln('That should also be about ' + IntToStr(Players[Var1].Banked * 28 * 18) + ' Mining Experience.');
Writeln('Player ' + IntToStr(Var1 + 1) +' took ' + IntToStr(Players[Var1].Worked) + ' Breaks.');
if Active = False then
Writeln('Player ' + IntToStr(Var1 + 1) +' is not Active. ')
else
Writeln('Player ' + IntToStr(Var1 + 1) +' is Active.');
Writeln('----------------------------------------------------------------');
end;
Writeln('----------------------------------------------------------------');
Writeln('');
end;

{*******************************Main Loops**************************************}

procedure MainLoopCLR;
var
Var1 : Integer;
Var2 : Integer;
begin
repeat
for Var1 := 0 to PlayersActive do
begin
if not LoggedIn then LoginPlayer;
if Players[CurrentPlayer].Loc = 'Varrock East Bank' then
begin
VarrockCLRWalk('MiningArea');
Players[CurrentPlayer].Loc := 'Varrock East Mine';
end;
for Var2 := 0 to (Players[CurrentPlayer].Integers[0] - 1) do
begin
VarrockCLRFixPlayer;
repeat
VarrockCLRMineOre;
until InvFull;
VarrockCLRWalk('Bank');
VarrockCLRBank;
ProgressReport;
VarrockCLRWalk('MiningArea');
Breaking;
end;
Logout;
NextPlayer(True);
end;
until AllPlayersInactive;
end;

procedure MainLoopRFLT;
var
Var1 : Integer;
Var2 : Integer;
begin
repeat
for Var1 := 0 to PlayersActive do
begin
if not LoggedIn then LoginPlayer;
if Players[CurrentPlayer].Loc = 'Varrock East Bank' then
begin
VarrockRFLTWalk('MiningArea');
Players[CurrentPlayer].Loc := 'Varrock East Mine';
end;
for Var2 := 0 to (Players[CurrentPlayer].Integers[0] - 1) do
begin
if LoggedIn then
begin
VarrockRFLTFixPlayer;
repeat
VarrockCLRMineOre;
until InvFull;
WalkToTile(Tile(3288, 3373), 4, 0);
VarrockRFLTWalk('Bank');
VarrockCLRBank;
ProgressReport;
VarrockRFLTWalk('MiningArea');
Breaking;
end;
end;
Logout;
NextPlayer(True);
end;
until AllPlayersInactive;
end;

begin
Cleardebug;
Writeln('Thanks for using my script! Feedback is key to scripts performance.');
DeclarePlayers;
SetupSRL;
SetupReflectionEx(False);
if ReflectionWorking = True then
MainLoopRFLT;
if ReflectionWorking = False then
MainLoopCLR;
end.
Should have posted this fixed version up.

Garrett, thank you so much for critisism. I deeply appreciate it. I did not plan on using reflection at all when I made this script. Your right, more failsafes were definetely neccessary, such as I did in my second script that i posted, I should have used RadialWalkAutoColor, and then an estimated co-ordinate click as a final. The reason my DDTMs are so long is because I found that the more subpoints that you use in a DDTM, the more accurate it becomes. Rather then the script searching and finding 4 things [which it will do a lot] that mistake it for the DDTM, it will search more then 7 for the tricky areas, and it will make no doubt when it finds it, and yeah im stupid D: i should have fixed that Mining procedure more, but I kept it as the single ATPA as the OreColor can usually go pretty far, and its not only bounded to the rock. So it only finds the OreColor thats closest to it :X, im gonna fix this bro.

Thank you again Garrett. Thank you for the awesome feedback.

RAM

2010-07-27 18:34:25

Yes ! :)

3Garrett3

2010-07-27 19:32:32

From: Heavenguard

Should have posted this fixed version up.

Garrett, thank you so much for critisism. I deeply appreciate it. I did not plan on using reflection at all when I made this script. Your right, more failsafes were definetely neccessary, such as I did in my second script that i posted, I should have used RadialWalkAutoColor, and then an estimated co-ordinate click as a final. The reason my DDTMs are so long is because I found that the more subpoints that you use in a DDTM, the more accurate it becomes. Rather then the script searching and finding 4 things [which it will do a lot] that mistake it for the DDTM, it will search more then 7 for the tricky areas, and it will make no doubt when it finds it, and yeah im stupid D: i should have fixed that Mining procedure more, but I kept it as the single ATPA as the OreColor can usually go pretty far, and its not only bounded to the rock. So it only finds the OreColor thats closest to it :X, im gonna fix this bro.

Thank you again Garrett. Thank you for the awesome feedback.


I'm not going to look through the script you just posted, I'm really pressed for time, but I will tell you that I thank you for the immediate response to my advice. I meant the criticism only in a constructive manner, and you definitely understood that.

I was holding my vote before, but you've earned yourself a yes from me.

Daniel

2010-07-28 04:49:04

From: Heavenguard
I don't see how you can judge my skill level based on IRC =/

I can judge your skill level by the level of questions you ask.

From: Heavenguard
I'm pretty sure I just asked you a question and I wont describe the way you answered it to me. Idk, maybe I got the wrong IRC name for you, but I do recall being told im "absolutely new and think I can script without even knowing the basics of the basics."

I didn't say that. I said something along the lines of that you are of beginner level and should further indulge yourself in the tutorials present here.

From: Heavenguard
Maybe asking for help in the first place is wrong… that seems to be the impression i obtained while obtaining help from you.

Help is what we are for. However, we will only help you with the very basics with which you asked me by linking to a tutorial of beginner standard.

From: Heavenguard
Maybe I seem much of a beginner in your eyes, and maybe thats why you -would- give me a No on this poll.

You were of beginner level not knowing how to use a For loop correctly and not knowing that a variable can not contain any parameters, even when I gave you a practical example of both.

Now hush and continue on with the application. Appliances are not for arguments.

Heavenguard

2010-07-28 10:52:28

[QUOTE=Dan's The Man;727194]I can judge your skill level by the level of questions you ask.


I didn't say that. I said something along the lines of that you are of beginner level and should further indulge yourself in the tutorials present here.


Help is what we are for. However, we will only help you with the very basics with which you asked me by linking to a tutorial of beginner standard.


You were of beginner level not knowing how to use a For loop correctly and not knowing that a variable can not contain any parameters, even when I gave you a practical example of both.

Now hush and continue on with the application. Appliances are not for arguments.

Thank you for clearing that up. Much appreciated. I will hold my response to this reply as you stated its not for argument.

Cigue

2010-07-28 17:42:04

[QUOTE=Dan's The Man;727194]I can judge your skill level by the level of questions you ask.[/QUOTE]

And I think we all can judge his willingness to improve by the fact that he [B]asks[/B] questions.

As for HeavenGuard :

[SIZE="7"]Yes![/SIZE]

You have helped a lot of people a lot around this community, not just on a scripting level but also by treating others with respect, I've seen you write many times that SRL was like a family for you and I think that this makes you a jewel in the rough.

About the script, it definitely shows that you have understood enough of SRL to produce something useful. Even if you have made some mistakes, they've been pointed to you (and I'm deeply convinced that you will listen to your critics!), and I know you will keep improving on this script and others.

You're also the first person I've seen use DDTMs in a script. I personally could never make them work. :)

Anyway, I am all for letting you in on the condition that you keep striving for improvement like you always do :D

(also, my name's in there :D Awesome !)

If you like, we could work together on improving small parts of your scripts, like the parts that have already been pointed out and others that haven't.

I also would like to produce something in collaboration with you, I have seen you use Reflection and DDTMs, two barriers I haven't got arround to cross yet.

I think by now it is safe to say Welcome to SRL Members !

Heavenguard

2010-07-28 20:48:46

From: Cigue
And I think we all can judge his willingness to improve by the fact that he asks questions.

As for HeavenGuard :

Yes!

You have helped a lot of people a lot around this community, not just on a scripting level but also by treating others with respect, I've seen you write many times that SRL was like a family for you and I think that this makes you a jewel in the rough.

About the script, it definitely shows that you have understood enough of SRL to produce something useful. Even if you have made some mistakes, they've been pointed to you (and I'm deeply convinced that you will listen to your critics!), and I know you will keep improving on this script and others.

You're also the first person I've seen use DDTMs in a script. I personally could never make them work. :)

Anyway, I am all for letting you in on the condition that you keep striving for improvement like you always do :D

(also, my name's in there :D Awesome !)

If you like, we could work together on improving small parts of your scripts, like the parts that have already been pointed out and others that haven't.

I also would like to produce something in collaboration with you, I have seen you use Reflection and DDTMs, two barriers I haven't got arround to cross yet.

I think by now it is safe to say Welcome to SRL Members !


:D, thanks so much Cigue, im not gonna say im an SRL Member yet since I clearly am not :P, but I will definitely love to work in collaboration with you. As for helping to improve the small parts on my script, I would be so gratified. You can definetly teach me ALOT of things that you know [Seriously, you know your Math and stuff:P]. Thanks so much for the kind words Cigue, and thank you for the feedback.

Rich

2010-07-29 12:23:54

Is there any point in leaving voting open? 27 - 2

Heavenguard

2010-08-03 05:31:13

If I am allowed to ask, how long does the voting process normally last for anyway? im not impatient at all :P and I understand that everyone needs to have time to vote, but the last post was about 6 days ago. The last vote i would say about 5 days ago =].

tico2

2010-08-03 06:04:39

From: Heavenguard
If I am allowed to ask, how long does the voting process normally last for anyway? im not impatient at all :P and I understand that everyone needs to have time to vote, but the last post was about 6 days ago. The last vote i would say about 5 days ago =].


This poll will close on 08-09-2010 at 05:13 AM,

but since it is already decided an admin will probably close it sooner :)

Heavenguard

2010-08-03 06:59:25

From: tico2
This poll will close on 08-09-2010 at 05:13 AM,

but since it is already decided an admin will probably close it sooner :)


Thanks for clearing that up sir :D

Griff

2010-08-03 14:16:17

Doesn't look like you really need this vote but… YES!

Sir R. M8gic1an

2010-08-03 14:22:43

Welcome to Jah People :)

Been a long time since I last said this :p

~RM