Heavenguard
2010-07-25 23:13:34
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.