Train
12-27-2010, 07:21 AM
Gnome Agility PRO!
by: Train
Hello SRL, this is my second script!
Please don't expect that much of it, but trust me, I'm VERY proud of it!
Script averages at about 5.2k exp an hour, the low exp in the screen-shot was due to me purposely messing it up and testing the relocating. :D
I hope you enjoy it as much as I do...
~ Train
{
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Gnome Tree Course =-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= v0.1 =--=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= By: Train =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= ** Instructions =--=
=--= * 1. Be at the beginning of the course. =
=--= **** If you don't start at the beginning of the course, it should find =
=--= itself and continue on from there, but after lots of mouse =
=--= movement. =
=--= * 2. Don't be in an over crowded world. =
=--= * 3. Be on Safe Mode with Min. Graphics. =
=--= **** To get in safe mode without using smart, hold "s" while Runescape =
=--= is loading. =
=--= * 4. Have LIGHT WEIGHT gear on. =
=--= **** Spottier Cape, Boots of Lightness, etc. =
=--= * 5. If you wish to run, have run ENABLED before starting the script. =
=--= **** It will not enable run automatically! =
=--= * 6. Report errors and post progress reports! :D. =
=--= **** If you're going to use it on your MAIN, please watch it and make =
=--= sure it doesn't mess up majorly before leaving it alone. =
=--= * 4. START LOGGED OUT, OR LOGGED IN WITH YOUR CAMERA ANGLE UP!!! =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= **** POST PROGRESS REPORTS ! **** =--=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= * Change Log =
=-= v0.1 =
******* Initial script. =
BETA relocating, not SUPER...SUPER reliable... yet the script =
doesn't fail...almost...ever. :D =
Multi-player compatibility. =
=
******* Comments. =
Walking back to beginning is more of a "guess", as the colours =
will sometimes be wrong and it will click somewhere, if this =
happens, just go to a different world. :D =
=-= v0.2 =
******* Script. =
Added a SetAngle(True) on Login, increased wait with the mouse =
movements to reduce misclicks from lag. =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
}
Reports:
Running For: 6 Hours, 9 Minutes and 18 Seconds
Laps Completed: 391
Total EXP Gained: 33821.5
[xxx] 21915187
Laps: 391
Exp Gained: 33821.5
Exp P/H: 5,556
stopped myself ;)
Running For: 5 Hours, 13 Minutes and 52 Seconds
Laps Completed: 340
Total EXP Gained: 29410
[---------] 18830391
Laps: 340
Exp Gained: 29410
Exp P/H: 5,623
My first reflection. Hope you like it. 1-37 agility in 5 hours, love you man, (not in a gay way).
Running For: 2 Hours, 57 Minutes and 25 Seconds
Laps Completed: 156
Total EXP Gained: 13494
[un7b5nh78uhn] 10615790
Laps: 156
Exp Gained: 13494
Exp P/H: 4,576
Very good!
Running For: 1 Hours, 46 Minutes and 58 Seconds
Laps Completed: 123
Total EXP Gained: 10639.5
[************] 6417303
Laps: 123
Exp Gained: 10639.5
Exp P/H: 5,969
Same world, had a flawless run:
Running For: 1 Hours, 31 Minutes and 35 Seconds
Laps Completed: 102
Total EXP Gained: 8823
[***********'] 5458959
Laps: 102
Exp Gained: 8823
Exp P/H: 5,818
Running For: 40 Minutes and 38 Seconds
Laps Completed: 47
Total EXP Gained: 4065.5
[************] 2414053
Laps: 47
Exp Gained: 4065.5
Exp P/H: 6,063
46-48 with the script. You should make one for Agility Pyramid. Level requirement is 30, isn't it better exp also?
Me:
http://i56.tinypic.com/vzj5hk.jpg
program Gnome_Tree_Course;
{$DEFINE SMART} // Comment this out if you wish to not use SMART.
{$i SRL\SRL.scar}
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Integers[0] := 20; // Laps until player switch/logout (+/- random 5)
Players[0].Integers[1] := 1500; // Total laps to do.
Players[0].Active := True;
Players[0].Member := True;
end;
{
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Gnome Tree Course =-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= v0.1 =--=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= By: Train =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= ** Instructions =--=
=--= * 1. Be at the beginning of the course. =
=--= **** If you don't start at the beginning of the course, it should find =
=--= itself and continue on from there, but after lots of mouse =
=--= movement. =
=--= * 2. Don't be in an over crowded world. =
=--= * 3. Be on Safe Mode with Min. Graphics. =
=--= **** To get in safe mode without using smart, hold "s" while Runescape =
=--= is loading. =
=--= * 4. Have LIGHT WEIGHT gear on. =
=--= **** Spottier Cape, Boots of Lightness, etc. =
=--= * 5. If you wish to run, have run ENABLED before starting the script. =
=--= **** It will not enable run automatically! =
=--= * 6. Report errors and post progress reports! :D. =
=--= **** If you're going to use it on your MAIN, please watch it and make =
=--= sure it doesn't mess up majorly before leaving it alone. =
=--= * 4. START LOGGED OUT, OR LOGGED IN WITH YOUR CAMERA ANGLE UP!!! =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= **** POST PROGRESS REPORTS ! **** =--=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= * Change Log =
=-= v0.1 =
******* Initial script. =
BETA relocating, not SUPER...SUPER reliable... yet the script =
doesn't fail...almost...ever. :D =
Multi-player compatibility. =
=
******* Comments. =
Walking back to beginning is more of a "guess", as the colours =
will sometimes be wrong and it will click somewhere, if this =
happens, just go to a different world. :D =
=-= v0.2 =
******* Script. =
Added a SetAngle(True) on Login, increased wait with the mouse =
movements to reduce misclicks from lag. =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
}
function createIntArray(int, len: LongInt): array of Integer;
var
i: LongInt;
arr: TIntegerArray;
begin
SetLength(arr, len);
for i := 0 to len - 1 do
arr[i] := int;
Result := arr;
end;
procedure DrawOnSMARTEx(arrText: TStringArray; Color: Integer; Font: string; base: TPoint);
var
drawImage: LongInt;
i, h, useFull: Integer;
tI, tH: LongInt;
TextTPA: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
drawImage := BitmapFromString(766, 504, '');
h := Length(arrText) - 1;
for i := 0 to h do
begin
TextTPA := LoadTextTPA(arrText[i], Font, useFull);
tH := Length(TextTPA) - 1;
for tI := 0 to tH do
TextTPA[tI] := Point(TextTPA[tI].x + base.x, TextTPA[tI].y + base.y + (i * 12));
FastSetPixels(drawImage, TextTPA, createIntArray(Color, tH + 1));
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(drawImage, Canvas, 0, 0);
FreeBitmap(drawImage);
end;
procedure DrawOnSMART(arrText: TStringArray; Color: Integer);
begin
DrawOnSMARTEx(arrText, Color, StatChars, Point(25, 50));
end;
function LocateLog(var x, y: Integer): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03, 0.25);
FindColorsTolerance(TPA, 666702, MSX1, MSY1, MSX2, MSY2, 8);
if (Length(TPA) > 0) then
begin
ATPA := TPAtoATPAEx(TPA, 40, 10);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('across')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function LocateFence(var x, y: Integer; sort: TPoint): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.28, 0.76);
FindColorsTolerance(TPA, 1252130, MSX1, MSY1, MSX2, MSY2, 8);
if (Length(TPA) > 0) then
begin
ATPA := TPAtoATPAEx(TPA, 60, 35);
SortATPAFromFirstPoint(ATPA, sort);
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('over')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function LocateBranch(var x, y: Integer; sort: TPoint): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.04, 0.54);
FindColorsTolerance(TPA, 2313055, MSX1, MSY1, MSX2, MSY2, 15);
if (Length(TPA) > 0) then
begin
ATPA := TPAtoATPAEx(TPA, 10, 8);
SortATPAFromFirstPoint(ATPA, sort);
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('limb')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function LocateRope(var x, y: Integer; nearUs: Boolean): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03, 0.08);
FindColorsTolerance(TPA, 4810882, MSX1, MSY1, MSX2, MSY2, 11);
if (Length(TPA) > 0) then
begin
ATPA := TPAtoATPAEx(TPA, 10, 3);
if (nearUs) then
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY))
else
SortATPAFromFirstPoint(ATPA, Point(100, 180));
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('rope')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function LocateTube(var x, y: Integer): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.14, 0.08);
FindColorsTolerance(TPA, 5855837, MSX1, MSY1, MSX2, MSY2, 31);
if (Length(TPA) > 0) then
begin
ATPA := TPAToATPAEx(TPA, 30, 30);
SortATPAFromFirstPoint(ATPA, Point(202, 72));
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('eeze')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
procedure locateToLog;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.42, 1.17);
FindColorsTolerance(TPA, 1719114, MMX1, MMY1, MMX2, MMY2, 7);
if (Length(TPA) > 0) then
begin
ATPA := SplitTPA(TPA, 5);
SortATPASize(ATPA, True);
for i := 0 to High(ATPA) do
begin
tempPoint := MiddleTPA(ATPA[i]);
if (Distance(tempPoint.x, tempPoint.y, MMCX, MMCY) < 20) then
Continue;
Mouse(tempPoint.x, tempPoint.y - 15, 5, 8, True);
Wait(250 + Random(150));
Flag;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
Wait(1500 + Random(1500));
Exit;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function doLog: Boolean;
var
x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
Result := LocateLog(x, y);
if (Result) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 7000 + random(2000);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 255) do
begin
FindNormalRandoms;
MakeCompass('s');
Wait(Random(50));
end;
if (CountColor(0, 8, 450, 245, 458) = 255) then
Wait(500 + Random(300));
end;
end;
function doFence: Boolean;
var
i, x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
for i := 1 to 3 do
if (LocateFence(x, y, Point(MSCX, MSCY))) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 4500 + random(1500);
while (GetSystemTime < mark) and (not InBlack) do
begin
FindNormalRandoms;
Wait(150);
end;
if (InBlack) then
Wait(1500 + Random(250));
Exit;
end else
Wait(Random(250));
end;
function doFence2: Boolean;
var
i, x, y: Integer;
mark: LongInt;
didSet: Boolean;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
didSet := False;
for i := 1 to 2 do
if (LocateFence(x, y, Point(0, MSCY))) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 5500 + Random(1500);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 143) do
begin
if (not didSet) then
begin
SetAngle(True);
didSet := True;
end;
FindNormalRandoms;
Wait(Random(250));
end;
if (CountColor(0, 8, 450, 245, 458) = 143) then
if (not didSet) then
begin
SetAngle(True);
didSet := True;
end else
Wait(3000 + Random(1000));
Exit;
end else
Wait(Random(250));
end;
function doBranch: Boolean;
var
i, x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
for i := 1 to 3 do
if (LocateBranch(x, y, Point(MSCX, MSCY))) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 5500 + random(500);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 158) do
begin
Wait(Random(50));
FindNormalRandoms;
end;
if (CountColor(0, 8, 450, 245, 458) = 158) then
Wait(1500 + Random(150));
Exit;
end else
Wait(Random(250));
end;
function doBranch2: Boolean;
var
x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
if (LocateBranch(x, y, Point(145, 135))) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickNorth(False);
mark := GetSystemTime + 4000 + random(2000);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 155) do
begin
FindNormalRandoms;
Wait(Random(50));
end;
if (CountColor(0, 8, 450, 245, 458) = 155) then
Wait(800 + Random(250));
Exit;
end else
Wait(Random(250));
end;
function doRope(nearUs: Boolean): Boolean;
var
x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
if (LocateRope(x, y, nearUs)) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 5500 + Random(1500);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 125) do
begin
FindNormalRandoms;
Wait(Random(250));
end;
if (CountColor(0, 8, 450, 245, 458) = 125) then
begin
WriteLn('''Cannot reach!''');
Result := doRope(True);
Exit;
end;
Exit;
end else
Wait(Random(250));
end;
function doTube: Boolean;
var
i, x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
for i := 1 to 3 do
if (LocateTube(x, y)) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 5500 + Random(1500);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 166) do
begin
Wait(Random(250));
FindNormalRandoms;
end;
if (CountColor(0, 8, 450, 245, 458) = 166) then
begin
WriteLn('''In use!''');
Result := doTube;
Exit;
end;
Exit;
end else
Wait(Random(250));
end;
function attempToRelocate: Boolean; // Not SUPER reliable... but the script doesn't FAIL often anyways. ;)
begin
Result := False;
if (InRange(CountColor(SRL_GetBlackBackground, MMX1, MMY1, MMX2, MMY2), 16000, 17000)) then
begin
if (doBranch) then
if (doRope(False)) then
if (doBranch2) then
if (doFence2) then
if (doTube) then
begin
Result := True;
Exit;
end else
Exit
else
Exit
else
Exit
else
Exit
else
Exit;
end else
if (InRange(CountColor(SRL_GetBlackBackground, MMX1, MMY1, MMX2, MMY2), 17000, 18000)) then
begin
if (doRope(False)) then
if (doBranch2) then
if (doFence2) then
if (doTube) then
begin
Result := True;
Exit;
end else
Exit
else
Exit
else
Exit
else
Exit;
end else
begin
locateToLog;
Result := True;
end;
end;
function numFormat(str: string): string;
var
i, h, count: Integer;
begin
h := Length(str);
for i := h downto 1 do
begin
if (str[i] = '.') then
begin
count := 0;
Result := '';
Continue;
end;
if (count >= 3) then
begin
Result := ',' + Result;
count := 0;
end;
Result := str[i] + Result;
Inc(count);
end;
end;
function gestimateEXPGained: string;
begin
Result := numFormat(FloatToStr(Players[CurrentPlayer].Integers[2] * 86.5));
end;
function msRuntime: LongInt;//useless. :D
begin
Result := PlayerWorked(CurrentPlayer);
end;
function expPerHour: string;
begin
Result := numFormat(FloatToStr(Round((Players[CurrentPlayer].Integers[2] * 86.5) * (1000 * 60 * 60) / msRuntime)));
end;
function TotalLaps: Integer;
var
i, h: Integer;
begin
Result := 0;
for i := 0 to h do
Result := Result + Players[i].Integers[2];
end;
function TotalEXP: Extended;
var
i, h: Integer;
begin
Result := 0;
for i := 0 to h do
Result := Result + (Players[i].Integers[2] * 86.5);
end;
procedure ProgressReport;
var
textArray: TStringArray;
i, h: Integer;
begin
textArray := [
'Running For: ' + TimeRunning,
'Laps Completed: ' + IntToStr(Players[CurrentPlayer].Integers[2]),
'EXP Gained: ~' + gestimateEXPGained,
'EXP/HR: ~' + expPerHour
];
{$IFDEF SMART}
DrawOnSMART(textArray, WHITE_TEXT);
{$ENDIF}
ClearDebug;
WriteLn('Running For: ' + TimeRunning);
WriteLn('Laps Completed: ' + IntToStr(TotalLaps));
WriteLn('Total EXP Gained: ' + FloatToStr(TotalEXP));
h := HowManyPlayers - 1;
for i := 0 to h do
begin
WriteLn('[' + Players[i].Name + '] ' + IntToStr(PlayerWorked(CurrentPlayer)));
WriteLn(' Laps: ' + IntToStr(Players[i].Integers[2]));
WriteLn(' Exp Gained: ' + FloatToStr(Players[i].Integers[2] * 86.5));
WriteLn(' Exp P/H: ' + numFormat(FloatToStr(Round((Players[i].Integers[2] * 86.5) * (1000 * 60 * 60) / PlayerWorked(i)))));
end;
end;
label
CourseStart;
begin
{$IFDEF SMART}
Smart_Server := 2;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL;
DeclarePlayers;
ProgressReport;
repeat
if (not LoggedIn) then
begin
LogInPlayer;
SetAngle(True);
end;
PlayerStartTime := GetSystemTime;
repeat
CourseStart:
if (not doLog) then
begin
Wait(2500 + Random(1500));
if (not doLog) then
begin
locateToLog;
if (not doLog) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
end;
end;
if (not doFence) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
if (not doBranch) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
if (not doRope(False)) then
begin
if (InRange(CountColor(SRL_GetBlackBackground, MMX1, MMY1, MMX2, MMY2), 16000, 17000)) then
begin
if (doBranch) then
begin
if (not doRope(False)) then
begin
if (not attempToRelocate) then
Logout
else
goto CourseStart;
end;
end else
if (not attempToRelocate) then
Logout
else
goto CourseStart;
end else
if (not doRope(False)) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
end;
if (not doBranch2) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
if (not doFence2) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
if (not doTube) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
Inc(Players[CurrentPlayer].Integers[2]);
Inc(Players[CurrentPlayer].Integers[3]);
ProgressReport;
locateToLog;
if (Players[CurrentPlayer].Integers[3] > Players[CurrentPlayer].Integers[0]) then
Break;
if (Players[CurrentPlayer].Integers[2] > Players[CurrentPlayer].Integers[1]) then
Logout;
until not LoggedIn;
Players[CurrentPlayer].Integers[3] := 0;
NextPlayer(LoggedIn);
until AllPlayersInActive;
end.
by: Train
Hello SRL, this is my second script!
Please don't expect that much of it, but trust me, I'm VERY proud of it!
Script averages at about 5.2k exp an hour, the low exp in the screen-shot was due to me purposely messing it up and testing the relocating. :D
I hope you enjoy it as much as I do...
~ Train
{
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Gnome Tree Course =-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= v0.1 =--=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= By: Train =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= ** Instructions =--=
=--= * 1. Be at the beginning of the course. =
=--= **** If you don't start at the beginning of the course, it should find =
=--= itself and continue on from there, but after lots of mouse =
=--= movement. =
=--= * 2. Don't be in an over crowded world. =
=--= * 3. Be on Safe Mode with Min. Graphics. =
=--= **** To get in safe mode without using smart, hold "s" while Runescape =
=--= is loading. =
=--= * 4. Have LIGHT WEIGHT gear on. =
=--= **** Spottier Cape, Boots of Lightness, etc. =
=--= * 5. If you wish to run, have run ENABLED before starting the script. =
=--= **** It will not enable run automatically! =
=--= * 6. Report errors and post progress reports! :D. =
=--= **** If you're going to use it on your MAIN, please watch it and make =
=--= sure it doesn't mess up majorly before leaving it alone. =
=--= * 4. START LOGGED OUT, OR LOGGED IN WITH YOUR CAMERA ANGLE UP!!! =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= **** POST PROGRESS REPORTS ! **** =--=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= * Change Log =
=-= v0.1 =
******* Initial script. =
BETA relocating, not SUPER...SUPER reliable... yet the script =
doesn't fail...almost...ever. :D =
Multi-player compatibility. =
=
******* Comments. =
Walking back to beginning is more of a "guess", as the colours =
will sometimes be wrong and it will click somewhere, if this =
happens, just go to a different world. :D =
=-= v0.2 =
******* Script. =
Added a SetAngle(True) on Login, increased wait with the mouse =
movements to reduce misclicks from lag. =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
}
Reports:
Running For: 6 Hours, 9 Minutes and 18 Seconds
Laps Completed: 391
Total EXP Gained: 33821.5
[xxx] 21915187
Laps: 391
Exp Gained: 33821.5
Exp P/H: 5,556
stopped myself ;)
Running For: 5 Hours, 13 Minutes and 52 Seconds
Laps Completed: 340
Total EXP Gained: 29410
[---------] 18830391
Laps: 340
Exp Gained: 29410
Exp P/H: 5,623
My first reflection. Hope you like it. 1-37 agility in 5 hours, love you man, (not in a gay way).
Running For: 2 Hours, 57 Minutes and 25 Seconds
Laps Completed: 156
Total EXP Gained: 13494
[un7b5nh78uhn] 10615790
Laps: 156
Exp Gained: 13494
Exp P/H: 4,576
Very good!
Running For: 1 Hours, 46 Minutes and 58 Seconds
Laps Completed: 123
Total EXP Gained: 10639.5
[************] 6417303
Laps: 123
Exp Gained: 10639.5
Exp P/H: 5,969
Same world, had a flawless run:
Running For: 1 Hours, 31 Minutes and 35 Seconds
Laps Completed: 102
Total EXP Gained: 8823
[***********'] 5458959
Laps: 102
Exp Gained: 8823
Exp P/H: 5,818
Running For: 40 Minutes and 38 Seconds
Laps Completed: 47
Total EXP Gained: 4065.5
[************] 2414053
Laps: 47
Exp Gained: 4065.5
Exp P/H: 6,063
46-48 with the script. You should make one for Agility Pyramid. Level requirement is 30, isn't it better exp also?
Me:
http://i56.tinypic.com/vzj5hk.jpg
program Gnome_Tree_Course;
{$DEFINE SMART} // Comment this out if you wish to not use SMART.
{$i SRL\SRL.scar}
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Integers[0] := 20; // Laps until player switch/logout (+/- random 5)
Players[0].Integers[1] := 1500; // Total laps to do.
Players[0].Active := True;
Players[0].Member := True;
end;
{
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Gnome Tree Course =-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= v0.1 =--=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= By: Train =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= ** Instructions =--=
=--= * 1. Be at the beginning of the course. =
=--= **** If you don't start at the beginning of the course, it should find =
=--= itself and continue on from there, but after lots of mouse =
=--= movement. =
=--= * 2. Don't be in an over crowded world. =
=--= * 3. Be on Safe Mode with Min. Graphics. =
=--= **** To get in safe mode without using smart, hold "s" while Runescape =
=--= is loading. =
=--= * 4. Have LIGHT WEIGHT gear on. =
=--= **** Spottier Cape, Boots of Lightness, etc. =
=--= * 5. If you wish to run, have run ENABLED before starting the script. =
=--= **** It will not enable run automatically! =
=--= * 6. Report errors and post progress reports! :D. =
=--= **** If you're going to use it on your MAIN, please watch it and make =
=--= sure it doesn't mess up majorly before leaving it alone. =
=--= * 4. START LOGGED OUT, OR LOGGED IN WITH YOUR CAMERA ANGLE UP!!! =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=--= **** POST PROGRESS REPORTS ! **** =--=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= * Change Log =
=-= v0.1 =
******* Initial script. =
BETA relocating, not SUPER...SUPER reliable... yet the script =
doesn't fail...almost...ever. :D =
Multi-player compatibility. =
=
******* Comments. =
Walking back to beginning is more of a "guess", as the colours =
will sometimes be wrong and it will click somewhere, if this =
happens, just go to a different world. :D =
=-= v0.2 =
******* Script. =
Added a SetAngle(True) on Login, increased wait with the mouse =
movements to reduce misclicks from lag. =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
}
function createIntArray(int, len: LongInt): array of Integer;
var
i: LongInt;
arr: TIntegerArray;
begin
SetLength(arr, len);
for i := 0 to len - 1 do
arr[i] := int;
Result := arr;
end;
procedure DrawOnSMARTEx(arrText: TStringArray; Color: Integer; Font: string; base: TPoint);
var
drawImage: LongInt;
i, h, useFull: Integer;
tI, tH: LongInt;
TextTPA: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
drawImage := BitmapFromString(766, 504, '');
h := Length(arrText) - 1;
for i := 0 to h do
begin
TextTPA := LoadTextTPA(arrText[i], Font, useFull);
tH := Length(TextTPA) - 1;
for tI := 0 to tH do
TextTPA[tI] := Point(TextTPA[tI].x + base.x, TextTPA[tI].y + base.y + (i * 12));
FastSetPixels(drawImage, TextTPA, createIntArray(Color, tH + 1));
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(drawImage, Canvas, 0, 0);
FreeBitmap(drawImage);
end;
procedure DrawOnSMART(arrText: TStringArray; Color: Integer);
begin
DrawOnSMARTEx(arrText, Color, StatChars, Point(25, 50));
end;
function LocateLog(var x, y: Integer): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03, 0.25);
FindColorsTolerance(TPA, 666702, MSX1, MSY1, MSX2, MSY2, 8);
if (Length(TPA) > 0) then
begin
ATPA := TPAtoATPAEx(TPA, 40, 10);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('across')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function LocateFence(var x, y: Integer; sort: TPoint): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.28, 0.76);
FindColorsTolerance(TPA, 1252130, MSX1, MSY1, MSX2, MSY2, 8);
if (Length(TPA) > 0) then
begin
ATPA := TPAtoATPAEx(TPA, 60, 35);
SortATPAFromFirstPoint(ATPA, sort);
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('over')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function LocateBranch(var x, y: Integer; sort: TPoint): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.04, 0.54);
FindColorsTolerance(TPA, 2313055, MSX1, MSY1, MSX2, MSY2, 15);
if (Length(TPA) > 0) then
begin
ATPA := TPAtoATPAEx(TPA, 10, 8);
SortATPAFromFirstPoint(ATPA, sort);
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('limb')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function LocateRope(var x, y: Integer; nearUs: Boolean): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03, 0.08);
FindColorsTolerance(TPA, 4810882, MSX1, MSY1, MSX2, MSY2, 11);
if (Length(TPA) > 0) then
begin
ATPA := TPAtoATPAEx(TPA, 10, 3);
if (nearUs) then
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY))
else
SortATPAFromFirstPoint(ATPA, Point(100, 180));
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('rope')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function LocateTube(var x, y: Integer): Boolean;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.14, 0.08);
FindColorsTolerance(TPA, 5855837, MSX1, MSY1, MSX2, MSY2, 31);
if (Length(TPA) > 0) then
begin
ATPA := TPAToATPAEx(TPA, 30, 30);
SortATPAFromFirstPoint(ATPA, Point(202, 72));
h := Length(ATPA) - 1;
for i := 0 to h do
begin
tempPoint := MiddleTPA(ATPA[i]);
MMouse(tempPoint.x, tempPoint.y, 5, 5);
Wait(180 + Random(121));
if (IsUpText('eeze')) then
begin
x := tempPoint.x;
y := tempPoint.y;
Result := True;
Exit;
end else
Continue;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
procedure locateToLog;
var
pCTS: Byte;
i, h: Integer;
pModifH, pModifS: Extended;
TPA: TPointArray;
ATPA: T2DPointArray;
tempPoint: TPoint;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
pCTS := GetToleranceSpeed;
GetToleranceSpeed2Modifiers(pModifH, pModifS);
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.42, 1.17);
FindColorsTolerance(TPA, 1719114, MMX1, MMY1, MMX2, MMY2, 7);
if (Length(TPA) > 0) then
begin
ATPA := SplitTPA(TPA, 5);
SortATPASize(ATPA, True);
for i := 0 to High(ATPA) do
begin
tempPoint := MiddleTPA(ATPA[i]);
if (Distance(tempPoint.x, tempPoint.y, MMCX, MMCY) < 20) then
Continue;
Mouse(tempPoint.x, tempPoint.y - 15, 5, 8, True);
Wait(250 + Random(150));
Flag;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
Wait(1500 + Random(1500));
Exit;
end;
end;
ColorToleranceSpeed(pCTS);
SetToleranceSpeed2Modifiers(pModifH, pModifS);
end;
function doLog: Boolean;
var
x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
Result := LocateLog(x, y);
if (Result) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 7000 + random(2000);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 255) do
begin
FindNormalRandoms;
MakeCompass('s');
Wait(Random(50));
end;
if (CountColor(0, 8, 450, 245, 458) = 255) then
Wait(500 + Random(300));
end;
end;
function doFence: Boolean;
var
i, x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
for i := 1 to 3 do
if (LocateFence(x, y, Point(MSCX, MSCY))) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 4500 + random(1500);
while (GetSystemTime < mark) and (not InBlack) do
begin
FindNormalRandoms;
Wait(150);
end;
if (InBlack) then
Wait(1500 + Random(250));
Exit;
end else
Wait(Random(250));
end;
function doFence2: Boolean;
var
i, x, y: Integer;
mark: LongInt;
didSet: Boolean;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
didSet := False;
for i := 1 to 2 do
if (LocateFence(x, y, Point(0, MSCY))) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 5500 + Random(1500);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 143) do
begin
if (not didSet) then
begin
SetAngle(True);
didSet := True;
end;
FindNormalRandoms;
Wait(Random(250));
end;
if (CountColor(0, 8, 450, 245, 458) = 143) then
if (not didSet) then
begin
SetAngle(True);
didSet := True;
end else
Wait(3000 + Random(1000));
Exit;
end else
Wait(Random(250));
end;
function doBranch: Boolean;
var
i, x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
for i := 1 to 3 do
if (LocateBranch(x, y, Point(MSCX, MSCY))) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 5500 + random(500);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 158) do
begin
Wait(Random(50));
FindNormalRandoms;
end;
if (CountColor(0, 8, 450, 245, 458) = 158) then
Wait(1500 + Random(150));
Exit;
end else
Wait(Random(250));
end;
function doBranch2: Boolean;
var
x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
if (LocateBranch(x, y, Point(145, 135))) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickNorth(False);
mark := GetSystemTime + 4000 + random(2000);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 155) do
begin
FindNormalRandoms;
Wait(Random(50));
end;
if (CountColor(0, 8, 450, 245, 458) = 155) then
Wait(800 + Random(250));
Exit;
end else
Wait(Random(250));
end;
function doRope(nearUs: Boolean): Boolean;
var
x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
if (LocateRope(x, y, nearUs)) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 5500 + Random(1500);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 125) do
begin
FindNormalRandoms;
Wait(Random(250));
end;
if (CountColor(0, 8, 450, 245, 458) = 125) then
begin
WriteLn('''Cannot reach!''');
Result := doRope(True);
Exit;
end;
Exit;
end else
Wait(Random(250));
end;
function doTube: Boolean;
var
i, x, y: Integer;
mark: LongInt;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
for i := 1 to 3 do
if (LocateTube(x, y)) then
begin
Result := True;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
mark := GetSystemTime + 5500 + Random(1500);
while (GetSystemTime < mark) and (CountColor(0, 8, 450, 245, 458) <> 166) do
begin
Wait(Random(250));
FindNormalRandoms;
end;
if (CountColor(0, 8, 450, 245, 458) = 166) then
begin
WriteLn('''In use!''');
Result := doTube;
Exit;
end;
Exit;
end else
Wait(Random(250));
end;
function attempToRelocate: Boolean; // Not SUPER reliable... but the script doesn't FAIL often anyways. ;)
begin
Result := False;
if (InRange(CountColor(SRL_GetBlackBackground, MMX1, MMY1, MMX2, MMY2), 16000, 17000)) then
begin
if (doBranch) then
if (doRope(False)) then
if (doBranch2) then
if (doFence2) then
if (doTube) then
begin
Result := True;
Exit;
end else
Exit
else
Exit
else
Exit
else
Exit
else
Exit;
end else
if (InRange(CountColor(SRL_GetBlackBackground, MMX1, MMY1, MMX2, MMY2), 17000, 18000)) then
begin
if (doRope(False)) then
if (doBranch2) then
if (doFence2) then
if (doTube) then
begin
Result := True;
Exit;
end else
Exit
else
Exit
else
Exit
else
Exit;
end else
begin
locateToLog;
Result := True;
end;
end;
function numFormat(str: string): string;
var
i, h, count: Integer;
begin
h := Length(str);
for i := h downto 1 do
begin
if (str[i] = '.') then
begin
count := 0;
Result := '';
Continue;
end;
if (count >= 3) then
begin
Result := ',' + Result;
count := 0;
end;
Result := str[i] + Result;
Inc(count);
end;
end;
function gestimateEXPGained: string;
begin
Result := numFormat(FloatToStr(Players[CurrentPlayer].Integers[2] * 86.5));
end;
function msRuntime: LongInt;//useless. :D
begin
Result := PlayerWorked(CurrentPlayer);
end;
function expPerHour: string;
begin
Result := numFormat(FloatToStr(Round((Players[CurrentPlayer].Integers[2] * 86.5) * (1000 * 60 * 60) / msRuntime)));
end;
function TotalLaps: Integer;
var
i, h: Integer;
begin
Result := 0;
for i := 0 to h do
Result := Result + Players[i].Integers[2];
end;
function TotalEXP: Extended;
var
i, h: Integer;
begin
Result := 0;
for i := 0 to h do
Result := Result + (Players[i].Integers[2] * 86.5);
end;
procedure ProgressReport;
var
textArray: TStringArray;
i, h: Integer;
begin
textArray := [
'Running For: ' + TimeRunning,
'Laps Completed: ' + IntToStr(Players[CurrentPlayer].Integers[2]),
'EXP Gained: ~' + gestimateEXPGained,
'EXP/HR: ~' + expPerHour
];
{$IFDEF SMART}
DrawOnSMART(textArray, WHITE_TEXT);
{$ENDIF}
ClearDebug;
WriteLn('Running For: ' + TimeRunning);
WriteLn('Laps Completed: ' + IntToStr(TotalLaps));
WriteLn('Total EXP Gained: ' + FloatToStr(TotalEXP));
h := HowManyPlayers - 1;
for i := 0 to h do
begin
WriteLn('[' + Players[i].Name + '] ' + IntToStr(PlayerWorked(CurrentPlayer)));
WriteLn(' Laps: ' + IntToStr(Players[i].Integers[2]));
WriteLn(' Exp Gained: ' + FloatToStr(Players[i].Integers[2] * 86.5));
WriteLn(' Exp P/H: ' + numFormat(FloatToStr(Round((Players[i].Integers[2] * 86.5) * (1000 * 60 * 60) / PlayerWorked(i)))));
end;
end;
label
CourseStart;
begin
{$IFDEF SMART}
Smart_Server := 2;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL;
DeclarePlayers;
ProgressReport;
repeat
if (not LoggedIn) then
begin
LogInPlayer;
SetAngle(True);
end;
PlayerStartTime := GetSystemTime;
repeat
CourseStart:
if (not doLog) then
begin
Wait(2500 + Random(1500));
if (not doLog) then
begin
locateToLog;
if (not doLog) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
end;
end;
if (not doFence) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
if (not doBranch) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
if (not doRope(False)) then
begin
if (InRange(CountColor(SRL_GetBlackBackground, MMX1, MMY1, MMX2, MMY2), 16000, 17000)) then
begin
if (doBranch) then
begin
if (not doRope(False)) then
begin
if (not attempToRelocate) then
Logout
else
goto CourseStart;
end;
end else
if (not attempToRelocate) then
Logout
else
goto CourseStart;
end else
if (not doRope(False)) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
end;
if (not doBranch2) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
if (not doFence2) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
if (not doTube) then
if (not attempToRelocate) then
Logout
else
goto CourseStart;
Inc(Players[CurrentPlayer].Integers[2]);
Inc(Players[CurrentPlayer].Integers[3]);
ProgressReport;
locateToLog;
if (Players[CurrentPlayer].Integers[3] > Players[CurrentPlayer].Integers[0]) then
Break;
if (Players[CurrentPlayer].Integers[2] > Players[CurrentPlayer].Integers[1]) then
Logout;
until not LoggedIn;
Players[CurrentPlayer].Integers[3] := 0;
NextPlayer(LoggedIn);
until AllPlayersInActive;
end.