Caotom
2012-07-05 06:35:39
How Long have You Played Runescape?
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
N/a
What is your general programming knowledge?
I am fairly well practised in Pascal (through learning to use SRL) and I have very basic knowledge in Java (through limited exposure during an unpaid work experience).
Are you a member of any other communities?
N/a
Tell us about yourself…
Please show us one (or multiple) of your scripts.
I do use SPS walking for one of the sections as it seemed to be the most reliable way through the Karamja jungle (the rest of the walking is radial/dtm).
There are three more scripts that I have currently active to show a little more of my scripting knowledge (there will be several re-occurring procedures in them as those procedures/functions come for an include that I made for myself and I pull the things I need from it when making a script).
My Al Kharid Dragonhide Tanner:
My Rock Crab Trainer with banking (I have deleted the proggy bitmap image as it was like 2000 lines, to see it visit the thread in the fighting script forum):
And Finally my Armoured Zombie Killer that uses prayer and guthans healing:
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
N/a
What is your general programming knowledge?
I am fairly well practised in Pascal (through learning to use SRL) and I have very basic knowledge in Java (through limited exposure during an unpaid work experience).
Are you a member of any other communities?
N/a
Tell us about yourself…
From: Caotom
My name is Robert, I am from Sydney Australia and my hobbies include scripting, gaming (games such as LoL, SWTOR, WoW at one point, rs, sc2, Tera, etc.), cricket, body boarding, chilling with mates.
I am currently at school in year 11.
I enjoy participating in the srl community and helping out people in areas that I can, I aim to make most of my posts as to the point and helpful as possible, bringing up issues and suggestions where I can (instead of simply posting "hey nice script bro).
I have enjoyed working on my scripting skills and I feel that I have reached to point to apply again, my last was a tied vote 10-10 with an unofficial 11th yes which was unfortunately not able to be counted so I was turned down with a 1 week re-apply period.
My scripts are commonly made for things that I see a use for as I am more interested in the script and test it better if I actually have a use for (this was the main issue with my rock crab trainer).
My activity is only at 50-60% at the moment but it is shooting up everyday, it dropped from around 94% to 20% when I took a small break from SRL due to exams, moving and other irl commitments. This hopefully shouldn't happen again :)
~ Caotom
Please show us one (or multiple) of your scripts.
The main script that I am applying with is a nature rune crafter that uses the fairy ring method and banks in edgeville (glory tele for speed), it is slower than using summoning or the abyss but it is a safe, low requirement method.I do use SPS walking for one of the sections as it seemed to be the most reliable way through the Karamja jungle (the rest of the walking is radial/dtm).
program CaotomsFairyRingNatter;
{$define SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}
{$i SRL/SRL/misc/paintsmart.simba}
{$i sps/sps.simba}
{
Instructions:
- Start the script inside Edgeville Bank
- The following items must be visible in the opening bankscree:
- Pure Essece
- Cosmic Runes
- Astral Runes
- Air Runes
- Charged Glory amulets
- Ensure that none of the above items are the opening item for a bank tab
- Ensure that the charged glories sit higher in the bank then the uncharged ones
- Ensure you are on lunars with access to contact npc spell
- Ensure you have the dark mage unlock in contact npc spell
- Ensure that you have what pouches you will be using in you inventory
- The script only supports small medium and large pouches at this time.
- Ensure that your nature tiara is equipped
- Ensure that your dramen/lunar staff (if needed) is equipped.
}
var
x, y, fail, ContactSpell, DarkMage, T, Slot, CurrentCharge, TotalNats: Integer;
Glory, PureEss, Astral, Air, Cosmic, LarPouch, MedPouch, SmaPouch: LongInt;
AltarPath: TPointArray;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Username Here
Pass := ''; //Password Here
Pin := ''; //Bank Pin Here
BoxRewards := ['XP','xp','lamp']; //Choose Box rewards (Recommend Defult)
Active := True;
end;
end;
procedure LoadVars;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['7_11','8_11']);
Glory := BitmapFromString(8, 8, 'meJxjYmCQ2r5Taut2yY2be0UyxRct' +
'EZs9d926bTLHTwK5cCS+eKnY3HmiU6bJnj6LLA5EYvMWiE6bLnflO' +
'po4SGrmbPk797CIz56r8PgZsojk+o3iS5cDjVJ89RYoJX/rruyFSz' +
'JHj0vt3C2xdj3QVUqfv4GkHj2Rv3lb9txFmSPHmBgYgAgAN8hTKQ==');
PureEss := BitmapFromString(20, 14, 'meJyNkmsLgkAURH9f9BCpLERERE' + //I Found Bitmaps were the only reliable way to identify Runes, they have too many variances and similar colours for dtms or colour finders.
'TNNLPSROxhEf3rBoaWpVUJ5us5c+/dDaMkjJJNvEO2yT5ND0iWnZA' +
'8L4/HCimKGinPTVVd6/qONM2jbd++HwVBjIRfCQyyBAZZAgMliOv6' +
'nhfAQEnYM4ZqQLvjeMQ7DX0zAAdr2y7wH0PfFjKOlS3LAf6nQZyRr' +
'GnaiGwA3mmQcVRfrs/12kKIdxrUCwAnaxgmMmBQ28ne7i9dX84XK9' +
'Wg4jSwmvtq2hz4j0Hg8gHF8GTxN6ZTHTgNwGkYaOfYfOLxeIbQ0Nc' +
'ucDE2n2k0miDDOA2sFisD/wDzElOs');
Air := BitmapFromString(20, 14, 'meJxtktFKAmEQhd9KAulGyItAZL' +
'FMlmVZlmXZzDQz05bFTNtM04ro0eq2Z+mjgWH4E+ZiOOz3z5kzm6b' +
'dLOudd/sXvauv7x9qOLwdjabSU3k+L4rFbPaoSlm+PK12lCoOrvr0' +
'bia4Kg+L1XK5fl6/qSLTpR8MblSfTArBVbmfl+Cbzbsq6Z956S/71' +
'6qPxznFC6rg32GTJAOXXs3r+uCq4J/R2+1HEERhGEdREsep9a89/p' +
'30lPX9UHBrQHvxL7hNHnb3+tnpBOCqY8CCNvz/bOvkrN32RcSA/ca' +
'mZ4vYyQrPnncquGOA9R3zsjuLC8t9m82Wg2t6Doh/YbkXnvmvGg1v' +
'L24pOR8suREaLCfm16rVjur1Y16wuGNA/LM7uTGaW3MmbFcqB9Xq4' +
'd4XHFyiY7SszOhfWBXulg==');
Astral := BitmapFromString(17, 14, 'meJyN0lEKgkAQBuADSolYFiIiIm' +
'JWmpllImaWRPXSPTpHnasfhoYlYwvmaXc/5p9hp7PFPFrG8SpJ1mm' +
'aP+5PqrJsquq4q9t9czocznx+udyCYDYJo+kb8tXXgm3bq+cFvh8y' +
'lLznpq7r/6OKoqaoKHkSqs2mzLcViuA/BGvJsoIglGU5tu06jicht' +
'ExWpmmzornkCmQ8tlihfvZCI8MwoRjyA17jx1AgmjbUByOCUHTFIb' +
'vLRzZV1UVF5+JorPA9kA2k19NEhffdhZBCI/woZFOUvqhAxIWwEsk' +
'L8b6D0g==');
Cosmic := BitmapFromString(16, 12, 'meJyNkeEKwiAQx5/E19mHYAxZrS' +
'EiIiK21tba1iJ6yOiJOjg4TBcMfl9O/z+8O9n7w37p+2kY7uP4mOf' +
'nsrwAlmRSSAG25Am0qNTaGuPS2KW7AdhbeK6UASU88b4FTk13bq+o' +
'hLdSaoBKaz3gXENK9G5dSyEUKdheqET5qhKo4FvYHinp7OX+CApZo' +
'bK6ZM4PAFqh8u9T8pwXRbmqRLPA7LCrLNttUTAP6/0C/qgSrQ==');
MedPouch := BitmapFromString(8, 16, 'meJxlz9EKgkAQBdA/6SnoKSJkTXR' +
'NV5msMFErlUX6/89o4MIwbTBPh5l7d2n0NPqyfabUmoKmxWc232x3' +
'9OvHtHz0Q2TM5bWKn1wT2WofZ4Wr2Hlc97ZNBz8kOZ9oT+o7oha/X' +
'qcP/HwbJIpP4HU/64rAdVTgcqJdV4hLNaLwLx64VMD/84HBMpxRl+' +
'KdwTJC2L/d9Wob');
SmaPouch := BitmapFromString(9, 6, 'meJwTUdEVQULm3sFGrj56dq6aFrYi' +
'qFIQJKSkpe/ojlWKILINjrHyD8cq5RiZZBcaZxMYBVQARxAuABYgHH0=');
LarPouch := BitmapFromString(15, 13, 'meJyF0vkKgkAQBvBXiaCiww4kXT' +
'zySs2jrTQPxHz/x2hgYBl2g+D788fHzM4GvImeHSTgDcQvayflLMr' +
'NINWd8MDca5Ku9vpid5wtN3E1IMZQfPbik+U/qtoLQvDztQYYQ7EV' +
'l4ihvB/G4s5tx4Xy5D1SD/iSvQBDOWIor9suyXLDZIAxKsaxAbf9k' +
'BUls+xbO0EkTHcEjJP8xbjj8JkEVseQMDwgxdKCKtYMe6szWvsT42' +
'kElt5ZfQ2BqYRzYy09CsXi0PgxpFoJfwECkp4/');
ContactSpell := DTMFromString('mggAAAHicY2NgYNjGxMCwF4h3APF6IN4KxLuB+DFQ7gkQ32eAsF8A8XMgfv36FRgffPoLjkF8EaAcOjYCYkYcGAIAN+YacQ==');
DarkMage := DTMFromString('mggAAAHicY2NgYNjOyMCwFIhnAvFUID4GxMuBuAQolwHEVUA8HYgnAfFEIN43q46Bl5cXjrPSghi2TK5gEAHKYcOMODAEAABU5gy+');
AltarPath := [Point(3035, 4626), Point(3077, 4618), Point(3109, 4604), Point(3146, 4605), Point(3176, 4604), Point(3216, 4605), Point(3244, 4602), Point(3273, 4596)];
end;
procedure FreeVars;
begin
FreeBitmap(PureEss);
FreeBitmap(Air);
FreeBitmap(Glory);
FreeBitmap(Cosmic);
FreeBitmap(Astral);
FreeBitmap(LarPouch);
FreeBitmap(MedPouch);
FreeBitmap(SmaPouch);
FreeDTM(ContactSpell);
end;
procedure Terminate(Reason: String);
begin
//Logout;
Writeln('Script Shutting Down due to ' + Reason + '.');
TerminateScript;
FreeVars;
end;
procedure AntiRandom;
begin
if not FindNormalRandoms then
if not LoggedIn then
Terminate('Failing a random event');
end;
function Antiban(Skill: String): Boolean;
begin
if(not(LoggedIn))then
Exit;
AntiRandom;
Case Random(5000) Of
0:
begin
Writeln('Antiban');
GameTab(tab_Stats) HoverSkill(Skill, False);
Wait(400 + Random(450));
GameTab(tab_Inv);
Result := True;
end;
1:
begin
Writeln('Antiban');
GameTab(tab_Inv);
ExamineInv;
Result := True;
end;
2:
begin
Writeln('Antiban');
SleepAndMoveMouse(3500 + Random(600));
MakeCompass('n');
SetAngle(0);
Result := True;
end;
3:
begin
Writeln('Antiban');
GameTab(Tab_Stats);
Wait(3000 + Random(1500));
GameTab(tab_Inv);
Result := True;
end;
4:
begin
Writeln('Antiban');
HoverSkill('random', False);
Wait(1000 + Random(500));
GameTab(tab_Inv);
Result := True;
end;
5:
begin
Writeln('Antiban');
PickUpMouse;
MakeCompass('n');
SetAngle(0);
Result := True;
end;
6:
begin
Writeln('Antiban');
BoredHuman;
MakeCompass('n');
SetAngle(0);
Result := True;
end;
end;
end;
{Full credits to flight (this is used for the next procedure which is also by flight) }
Procedure ReturnValues(colors: TIntegerArray; var HueMods, SatMods: Extended; var color, Tolerance: Integer);
Var
h, s, t: Extended;
I,II : integer;
HSLColor : Array[1..3] of Extended;
HSL : Array[0..1] of Array[1..3] of Extended;
begin;
For I:= 1 to 3 do
begin;
HSL[0][i] := 255;
end;
For I:= 0 to High(Colors) do
begin;
ColortoHSL(Colors[i],HSLColor[1],HSLColor[2],HSLColor[3]);
For II:= 1 to 3 do
begin;
HSL[0][II] := MinE(HSLColor[II],HSL[0][II]);
HSL[1][II] := MaxE(HSLColor[II],HSL[1][II]);
end;
end;
H := (HSL[1][1] - HSL[0][1]);
S := (HSL[1][2] - HSL[0][2]);
T := (HSL[1][3] - HSL[0][3]);
try
HueMods := (H/T);
SatMods := (S/T);
Tolerance := Round(t);
except
HueMods := 0;
SatMods := 0;
Tolerance := Round(0.0);
end;
Color := HSLToColor((HSL[1][1] + HSL[0][1]) div 2,(HSL[1][2] + HSL[0][2]) div 2,(HSL[1][3] + HSL[0][3]) div 2);
end;
{ALL Credits Go to The wonderful Flight for this procdeure, I had no Idea what to look for in decayed pouches}
Function FindDecayedPouch(Var Slot: Integer): Boolean;
var
B: TBox;
TPA: TPointArray;
Hmod,Smod: Extended;
L,i,Tol,CTS,Col,X,Y: Integer;
ATPA: T2DPointArray;
begin
Result := False;
ReturnValues([3422525, 3619647, 3751234], Hmod, Smod, Col, Tol);
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hmod, SMod);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Col, MIX1, MIY1, MIX2, MIY2, Tol);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 18, 18);
SortATPAFrom(ATPA, Point(650, 330));
L := High(ATPA);
SetArrayLength(ATPA, L+1);
for i := 0 to L do
begin
B := GetTPABounds(ATPA[i]);
if (GetArrayLength(ATPA[i])>10) then
begin
MiddleTPAEx(ATPA[i], X, Y);
Slot := CoordsToItem(X, Y);
Result := True;
end;
end;
end;
procedure StartSetup(SmartWorld: Integer; ClDebug, Login: Boolean);
begin
Smart_Server := SmartWorld;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
if ClDebug = True then
ClearDebug;
if Login = True then
if not LoggedIn then LogInPlayer;
end;
function TPAFinder(Hue, Sat: Extended; Colour, Tolerance, ClickType: Integer; UpText, Options: Array of String): Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MissMouse(x, y);
Wait(RandomRange(300,400));
if IsUpTextMultiCustom(UpText) then
begin
ClickMouse2(ClickType);
ChooseOptionMulti(Options);
Result := True;
Exit;
end else
Result := False;
end;
end;
function TPASpotter(Hue, Sat: Extended; Colour, Tolerance: Integer): Boolean;
var
CTS: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
if FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Tolerance) then
Result := True
else
Result := False;
end;
function TPAFinderMM(Hue, Sat: Extended; Colour, Tolerance: Integer): Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MMX1, MMY1, MMX2, MMY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
begin
MiddleTPAEx(ATPA[i], x, y);
Mouse(x, y, 5, 5, True);
Result := True;
end;
end;
procedure RadialWalkToSymbol(Symbol: String; Colour, StartDegree, EndDegree, RadiusFromCharacter, Tol, MaxWalks: Integer; FailToTheRight, FailDownwards: Boolean);
var
x, y, Xmod, Ymod, Walks: Integer;
begin
Walks := 0;
if FailToTheRight then
Xmod := 1
else
Xmod := -1;
if FailDownwards then
Ymod := 1
else
Ymod := -1;
repeat
RadialWalkTolerance(Colour, StartDegree, EndDegree, RadiusFromCharacter, Xmod, Ymod, Tol);
Walks := Walks + 1;
until(not (RadialWalkTolerance(Colour, StartDegree, EndDegree, RadiusFromCharacter, Xmod, Ymod, Tol))) or (Walks >= MaxWalks) or (FindSymbol(x, y, Symbol))
end;
procedure RunToTele;
begin
{ RadialWalkTolerance(5131857, 90, 20, 70, 1, 1, 30); //Backup method, very unstable but more failsafes.
if RadialWalkTolerance(5001797, 70, 115, 70, 1, 1, 15) then
begin
while IsMoving do
begin
Wait(100);
AntiBan('Random');
end;
Exit;
end;
RadialWalkTolerance(5131857, 90, 20, 70, 1, 1, 30);
if RadialWalkTolerance(1600233, 220, 170, 80, 1, 1, 50) then
begin
while IsMoving do
begin
Wait(100);
AntiBan('Random');
end;
Exit;
end;
RadialWalkTolerance(5131857, 90, 20, 70, 1, 1, 30);
repeat
RadialWalkTolerance(1600233, 220, 180, 80, 1, 1, 50);
while IsMoving do
begin
Wait(100);
AntiBan('random');
end;
if TPASpotter(0.12, 0.16, 5279852, 8) then Exit;
RadialWalkTolerance(3885135, 220, 180, 80, 1, 1, 30);
until(TPASpotter(0.12, 0.16, 5279852, 8)) or (not RadialWalkTolerance(1600233, 200, 150, 80, 1, 1, 50))
}
RadialWalkTolerance(5394260, 20, 90, 70, -1, 1, 20);
while IsMoving do
Wait(10);
RadialWalkTolerance(5394260, 20, 90, 70, -1, 1, 20);
RadialWalkTolerance(6514800, 20, 120, 70, -1, 1, 10);
while IsMoving do
Wait(10);
RadialWalkTolerance(1335605, 170, 210, 70, 1, 1, 20);
if FindSymbolIn(x, y, 'arrow', 550, 80, 685, 150) then
begin
Mouse(x, y, 5, 5, True);
FFlag(2);
while IsMoving do
Wait(10);
end else
RadialWalkTolerance(5001797, 210, 160, 70, 1, -1, 20);
end;
procedure FairyTeleport;
begin
if not TPAFinder(0.12, 0.16, 5279852, 8, 1, ['airy', 'ing'], ['']) then
Terminate('Unable to Find Fairy Ring 1');
Wait(RandomRange(6000,6500));
end;
function FairyTeleport2: Boolean;
begin
TPAFinder(0.07, 4.66, 14808250, 4, 1, ['Use', 'airy', 'ring'], ['Use']);
MarkTime(Fail);
repeat
wait(50+random(100));
AntiBan('random');
until(not TabExists(25)) or (TimeFromMark(Fail) >= 10000);
if TimeFromMark(Fail) >= 10000 then
Terminate('Unable To Find Fairy Ring 2');
MissMouse(90, 165);
ClickMouse2(True); //Spaced the Double-click to make it easier to read
ClickMouse2(True);
Wait(100+random(200));
MissMouse(265, 165);
ClickMouse2(True);
ClickMouse2(True);
Wait(100+random(200));
MissMouse(425, 175);
ClickMouse2(True);
ClickMouse2(True);
MouseBox(185, 265, 335, 305, 1);
Result := True;
end;
procedure GloryTele;
begin
GameTab(26);
if WearingItem(3) then
begin
MouseEquippedItem('amulet', 0);
WaitOption('dgev', 2000);
Wait(RandomRange(4800,5800));
end;
end;
procedure RunToBank;
begin
RadialWalkTolerance(59871, 70, 150, 50, -1, 1, 20);
end;
Function EssCheck: Integer;
Begin
Result := CountItems('bmp', PureEss, [20]);
End;
Function WithdrawRunes: Boolean;
begin
if FindBitmapToleranceIn(Cosmic, X, Y, MSX1, MSY1, MSX2, MSY2, 20) then
begin
MissMouse(X, Y);
ClickMouse2(True);
end;
if FindBitmapToleranceIn(Air, X, Y, MSX1, MSY1, MSX2, MSY2, 20) then
begin
MissMouse(X, Y);
ClickMouse2(True);
ClickMouse2(True);
end;
if FindBitmapToleranceIn(Astral, X, Y, MSX1, MSY1, MSX2, MSY2, 20) then
begin
MissMouse(X, Y);
ClickMouse2(True);
Result := True;
end;
FreeBitmap(Air);
FreeBitmap(Astral);
FreeBitmap(Cosmic);
end;
procedure OpenPouch;
begin
if FindBitmapToleranceIn(SmaPouch, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
begin
MissMouse(x, y);
ClickMouse2(1);
Wait(RandomRange(300,400));
end;
if FindBitmapToleranceIn(MedPouch, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
begin
MissMouse(x, y);
ClickMouse2(1);
Wait(RandomRange(300,400));
end;
if FindBitmapToleranceIn(LarPouch, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
begin
MissMouse(x, y);
ClickMouse2(1);
Wait(RandomRange(300,400));
end;
end;
function RunToAltar: Boolean;
begin
SPS_WalkPath(AltarPath);
if FindColorSpiralTolerance(x, y, 5176743, MSX1, MSY1, MSX2, MSY2, 30) then
begin
MissMouse(x, y);
if IsUpTextMultiCustom(['nter', 'yster', 'uin']) then
begin
ClickMouse2(1);
FFlag(2);
Wait(RandomRange(1500,2000));
Result := True;
end;
end else
if FindColorSpiralTolerance(x, y, 112630, MMX1, MMY1, MMX2, MMY2, 40) then
begin
Mouse(x, y, 5, 5, True);
while IsMoving do
Wait(10);
if FindColorSpiralTolerance(x, y, 5176743, MSX1, MSY1, MSX2, MSY2, 30) then
begin
MissMouse(x, y);
if IsUpTextMultiCustom(['nter', 'yster', 'uin']) then
begin
ClickMouse2(1);
FFlag(2);
Wait(RandomRange(3500,4000));
Result := True;
end;
end else
begin
Writeln('Cannot Find Altar');
Result := False;
end;
end else
begin
Writeln('Cannot Find Altar Icon');
Result := False;
end;
end;
procedure Altar;
begin
if RunToAltar then
begin
TotalNats := TotalNats + EssCheck;
MouseBox(215, 5, 300, 15, 1);
T := 0;
MarkTime(t);
repeat
Wait(100);
AntiBan('random');
Until(TimeFromMark(t) >= 5000) or (EssCheck <= 1);
OpenPouch;
Wait(RandomRange(600,800));
if EssCheck >= 2 then
begin
TotalNats := TotalNats + EssCheck;
if TPAFinder(2.51, 0.62, 5854551, 5, 1, ['raft', 'une', 'ft-ru', 'ltar'], ['']) then
begin
T := 0;
MarkTime(t);
repeat
Wait(100);
AntiBan('random');
Until(TimeFromMark(t) >= 5000) or (EssCheck <= 1);
end else
Terminate('Unable To Find Altar');
end;
end;
end;
procedure ScrollDown;
begin
if FindColorSpiralTolerance(x, y, 3845615, 470, 65, 500, 305, 20) then
DragMouse(x, y, 1, 1, 485, 305, 10, 10);
end;
procedure OpnBank;
begin
if Bankscreen then Exit;
if not OpenBankNPC then
begin
if not TPAFinder(0.41, 0.13, 3086880, 5, 0, ['ank', 'anker'], ['ank B']) then
begin
ClickNorth(SRL_ANGLE_NONE);
TPAFinder(0.41, 0.13, 3086880, 5, 0, ['ank', 'anker'], ['ank B'])
SetAngle(0);
end;
end;
MarkTime(Fail);
repeat
Wait(100);
AntiBan('random');
until (BankScreen) or (PinScreen) or (TimeFromMark(Fail) >= 10000);
if TimeFromMark(Fail) >= 10000 then
Terminate('Unable to open bank');
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Terminate('No Pin Given');
end;
function RepairPouches: Boolean;
var
t: Integer;
aFound: Extended;
begin
Writeln('Pouches damaged, attempting to repair');
if not BankScreen then OpnBank;
if EssCheck >= 21 then
begin
if FindBitmapToleranceIn(PureEss, x, y, MSX1, MSY1, MSX2, MSY2, 20) then
begin
Mouse(x, y, 5, 5, False);
WaitOption('All', 1000);
Wait(RandomRange(500, 700));
end;
end;
WithdrawRunes;
CloseBank;
GameTab(28);
if FindDTM(ContactSpell, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MissMouse(x, y);
ClickMouse2(1);
MarkTime(t);
repeat
Wait(100);
AntiBan('random');
Until(TimeFromMark(t) >= 5000) or (FindColorSpiralTolerance(x, y, 2367253, 65, 15, 455, 35, 20));
if not FindDTMRotated(DarkMage, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
ScrollDown;
if FindDTMRotated(DarkMage, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
T := 0;
MissMouse(x, y);
ClickMouse2(1);
Result := True;
MarkTime(t);
repeat
Wait(100);
AntiBan('random');
Until(TimeFromMark(t) >= 5000) or (FindNPCChatText('ello', Nothing));
T := 0;
MarkTime(t);
repeat
ClickToContinue;
Wait(RandomRange(200,300));
until(not ClickToContinue) or (TimeFromMark(t) >= 15000);
if FindNPCChatText('epai', ClickLeft) then
Result := True
else
Terminate('Unable to find repair button');
T := 0;
MarkTime(t);
repeat
ClickToContinue;
Wait(RandomRange(200,300));
until(not ClickToContinue) or (TimeFromMark(t) >= 15000);
end else
Terminate('Failed To find dark mage contact');
end else
Terminate('Failed to find contact spell');
end;
procedure Pouching;
begin
if FindDecayedPouch(Slot) then
begin
RepairPouches;
Wait(RandomRange(300,500));
if not InvFull then
begin
OpnBank;
FindBitmapToleranceIn(PureEss, X, Y, 35, 85, 480, 295, 20);
MissMouse(x, y);
Wait(200+random(100));
if IsUpTextMultiCustom(['ure', 'ssen', 'ence', 'Pu', 're', 'esse']) then
begin
WithdrawItem(PureEss, 'bitmap', 28, 'ith', [20]);
T := 0;
MarkTime(t);
repeat
AntiBan('random');
Wait(RandomRange(20,30));
until(InvFull) or (TimeFromMark(t) >= 5000);
if not InvFull then
Terminate('Not Enough essence for full inv');
end;
end;
end;
OpnBank;
if FindBitmapToleranceIn(SmaPouch, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
begin
MissMouse(x, y);
ClickMouse2(0);
WaitOption('ill', 1500);
Wait(300+random(200));
end;
if FindBitmapToleranceIn(MedPouch, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
begin
MissMouse(x, y);
ClickMouse2(0);
WaitOption('ill', 1500);
Wait(300+random(200));
end;
if FindBitmapToleranceIn(LarPouch, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
begin
MissMouse(x, y);
ClickMouse2(0);
WaitOption('ill', 1500);
Wait(300+random(200));
end;
end;
function Charges: Integer;
var
Text, C: String;
begin
GameTab(26);
if WearingItem(3) then
begin
MouseEquippedItem('amulet', 3);
Wait(100+random(100));
Text := GetUpText;
C := Between('(', ')', Text);
if C = '' then
Result := 0
else
begin
Result := StrToInt(C);
CurrentCharge := StrToInt(C);
end;
end else
Result := 0;
end;
procedure GetGlory;
begin
Writeln('We Have ' +IntToStr(CurrentCharge) + ' charges left on our glory');
if CurrentCharge <= 0 then
begin
if InvFull then
begin
OpnBank;
if FindBitmapToleranceIn(PureEss, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
Mouse(x, y, 5, 5, True)
else
Terminate('Inv Full with no essence');
CloseBank;
end;
GameTab(26);
if WearingItem(3) then
begin
MouseEquippedItem('amulet', 1)
Wait(RandomRange(400,500));
OpnBank;
Wait(RandomRange(200,250));
if FindBitmapToleranceIn(Glory, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
begin
Mouse(x, y, 5, 5, True);
Wait(RandomRange(600,1000));
end;
end else
OpnBank;
Wait(RandomRange(300,400));
if FindBitmapToleranceIn(Glory, x, y, MSX1, MSY1, MSX2, MSY2, 20) then
Mouse(x, y, 5, 5, True)
else
Terminate('Cannot Find any glories in the bank');
Wait(RandomRange(1300,2000));
if FindBitmapToleranceIn(Glory, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
begin
MissMouse(x, y);
ClickMouse2(0);
WaitOption('ear', 1000);
Wait(randomRange(500,700));
end else
Terminate('did not withdraw a glory correctly');
CloseBank;
Wait(RandomRange(500,700));
if Charges <= 0 then
Terminate('Getting a new glory has Failed');
end;
end;
function Banking: Boolean;
begin
GetGlory;
GameTab(25);
if EssCheck >= 24 then Exit;
if not Bankscreen then OpnBank;
Wait(200+random(100));
FindBitmapToleranceIn(PureEss, X, Y, 35, 85, 480, 295, 20);
MissMouse(x, y);
Wait(200+random(100));
if IsUpTextMultiCustom(['ure', 'ssen', 'ence', 'Pu', 're', 'esse']) then
begin
WithdrawItem(PureEss, 'bitmap', 28, 'ith', [20]);
T := 0;
MarkTime(t);
repeat
AntiBan('random');
Wait(RandomRange(20,30));
until(InvFull) or (TimeFromMark(t) >= 5000);
if not InvFull then
Terminate('Not Enough essence for full inv');
Pouching;
if not InvFull then
begin
WithdrawItem(PureEss, 'bitmap', 28, 'ith', [20]);
T := 0;
MarkTime(t);
repeat
AntiBan('random');
Wait(RandomRange(20,30));
until(InvFull) or (TimeFromMark(t) >= 5000);
if not InvFull then
Terminate('Not Enough essence for full inv');
end;
Result := True;
end;
CloseBank;
end;
procedure CheckRun;
var
s: String;
begin
if GetMMLevels('run', s) <= 30 then
RestUntil(90);
SetRun(True);
end;
procedure PaintSmart;
var
Line1, Line2, Line3: String;
Image: Integer;
begin
Image := BitmapFromString(509, 128, 'meJztwkERAAAMAqDqRjOKUVZj' +
'DzjSRVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV1X8Pvm/vpQ==');
Line1 := ('You have been Running for a total of ' + TimeRunning + '');
Line2 := ('You have managed to craft ' + IntToStr(TotalNats) + ' pure essence into nature runes');
Line3 := ('You are crafting ' + IntToStr(((TotalNats) * 3600) / (GetTimeRunning / 1000)) + ' pure essence per hour!');
SMART_DrawBitmap(True, Image, Point(7, 344));
SMART_DrawText(20, 360, LoginChars, Line1, clRed);
SMART_DrawText(20, 380, LoginChars, Line2, clRed);
SMART_DrawText(20, 400, LoginChars, Line3, clRed);
FreeBitmap(Image);
end;
procedure Proggy;
begin
ClearDebug;
Writeln('|-------------------------------------------------------------|');
Writeln(' You have been Running for a total of ' + TimeRunning + '');
Writeln(' You have managed to craft ' + IntToStr(TotalNats) + ' pure essence into nature runes');
Writeln(' You are crafting ' + IntToStr(((TotalNats) * 3600) / (GetTimeRunning / 1000)) + ' pure essence per hour!');
Writeln(' Thankyou for using Caotoms Tanner :)');
Writeln('|-------------------------------------------------------------|');
SRLRandomsReport;
PaintSmart;
end;
procedure MainLoop;
begin
Banking;
CheckRun;
RunToTele;
FairyTeleport;
FairyTeleport2;
CheckRun;
Altar;
CheckRun;
Proggy;
GloryTele;
RunToBank;
end;
begin
StartSetup(56, True, True);
LoadVars;
Charges;
ClickNorth(0);
repeat
Mainloop;
Until(Not LoggedIn);
FreeVars;
end.
There are three more scripts that I have currently active to show a little more of my scripting knowledge (there will be several re-occurring procedures in them as those procedures/functions come for an include that I made for myself and I pull the things I need from it when making a script).
My Al Kharid Dragonhide Tanner:
program CaotomsTanner;
{$define SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$DEFINE SRL5}
{$i SRL/SRL/misc/paintsmart.simba}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// ///
/// Welcome To Caotom's Auto Tanner ///
/// ///
/// To run this script successfully you must beign inside the AK bank ///
/// And have your d-hides in your first bank slot ///
/// ///
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const
DragonhideColour = 'Purple'; //The colour of the dragonhide: Purple (Royal)
// Black
// Red
// Blue
// Green
var
x, y, failsafe, HidesDone, Start, PurpleColour, Fail: Integer;
Purple, Black, Red, Blue, Green: LongInt;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Username Here
Pass := ''; //Password Here
Pin := ''; //Bank Pin Here
BoxRewards := ['XP','xp','lamp'];
Active := True;
end;
end;
procedure StartSetup(SmartWorld: Integer; ClDebug, Login: Boolean);
begin
Smart_Server := SmartWorld;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
if ClDebug = True then
ClearDebug;
if Login = True then
if not LoggedIn then LogInPlayer;
end;
procedure LoadVars;
begin
Purple := BitmapFromString(18, 15, 'meJx1kesKAVEYRV/D/SGYUUQi8k' +
'9JUpokD0FueRkSiVe0srM7HanVNOac9V22rNTLPsyLXfGqn2bFDkw' +
'LbbhUNzDONUe5Bk9OeWZfKxRROEW51raCm4LvYOVcXYft4JbsxD3Z' +
'T/ItK+6lMSKLy4Km/ESUIstjeEit9kgPoAqIWAIrHMOW0nimRy2oI' +
'gpHosdA0Zq2hCOVyPoQjhEmGYpG6wNjLMsDWYtyP8oz6ugEVpUh8B' +
'EXC1wwihTLIaBwX+jUBX8tJcD7r+WCzseBkICmtSXFfy6jhvlEqYa' +
'N9ELBKB8nQ/KRFfHPEm/DSgT7');
PurpleColour := 10826359
Black := BitmapFromString(18, 15, 'meJyFkYsJgDAQQ9dQqYjjFH+I++' +
'/iQSDE9COE0l551zSX0py+uq5Hj9t2hoZxguI21lRQygIxStvGlSK' +
'h47gpRfgWGrYoVGgPFG2YPSDsr1Ib9jW+giZVijZ+I815VxutPG0K' +
'IbNR5lkdxLKsIUOqkTIfUmQReJ+KfZXSfDQQFg0hZbbtj0phQwSVP' +
'mXqz+IFNWuY/w==');
Red := BitmapFromString(18, 15, 'meJx9kt0KgzAMRi/tGoe+yxCEIe' +
'xagu//OEvztTH92eC7EJvTJEdpvcL8ttB6SQLtyERbXM4pvnJowxu' +
'PgDJEIgWJkmJF5HRIoRgskExpMElcGMUeL0dnCXtEezGQHxSnAm1t' +
'49lqPaXjJcTub2JjNKtZF1zSUQwk2yuU19IrtTF6k0280jAfhTpan' +
'3XH2wDtj+enIClDOTXFoJDmM42o2+ofCsuaEG/VI/hbVOlR+amteg' +
'oPgtgl5qc38wWP4lwH');
Blue := BitmapFromString(18, 15, 'meJxtklEKwjAQRH9tkr/mDLYeQp' +
'CCFELwXiJi8cQOGTssm8IQ0nbfZjLbksL3ktcYJDxC9zhQSxye5/E' +
'Whms4YaVKCpCjsIp6TSMkCl8PKVSSxeY9ZcpSECkINpxJIZ850xjf' +
'6yzacBSKKRzKYq6k1NNdDfXbnNlhabEoDWvDXRCIjXTZBUo2ShuBA' +
'xWLnQJkbfR5KlU7BQhITX8b9ShPUm4QjxQhIpQa9n+LEgCiejemnm' +
'IC2PdUn48C0exEERFVd0T5KBN7He23Ztvm01M/+cCQKw==');
Green := BitmapFromString(18, 15, 'meJx9klEKwzAMQz+XON1pxmAwAm' +
'WfoxR2/8tMiRLHdbOBCKHtsyxRyUFyiM+h6yeVy6NpeQsU7hcKb3H' +
'KiRoskE2ogtwaBZGCMNAikCLLntTIenGNCbUnCKb8mCcpnemiEeEE' +
'ZtR0dg0XsLh0X+1nUHUmEMac1MK7qdSu8avP4U6kUrLGP30ekvY46' +
'RWhgqyxKI+BrlJHte+747RS16oinur92EK0VYcUipXWJ9N+HMXLoZ' +
'+a9Px72w3P2yrlwC9dIFtd');
end;
procedure FreeVars;
begin
FreeBitmap(Purple);
FreeBitmap(Black);
FreeBitmap(Red);
FreeBitmap(Blue);
FreeBitmap(Green);
end;
procedure Terminate(Reason: String);
begin
Logout;
Writeln('Script Shutting Down due to ' + Reason + '.');
TerminateScript;
end;
procedure AntiRandom;
begin
if not FindNormalRandoms then
if not LoggedIn then
Terminate('Failing a random event');
end;
function Antiban(Skill: String): Boolean;
begin
if(not(LoggedIn))then
Exit;
AntiRandom;
Case Random(5000) Of
0:
begin
Writeln('Antiban');
GameTab(tab_Stats) HoverSkill(Skill, False);
Wait(400 + Random(450));
GameTab(tab_Inv);
Result := True;
end;
1:
begin
Writeln('Antiban');
GameTab(tab_Inv);
ExamineInv;
Result := True;
end;
2:
begin
Writeln('Antiban');
SleepAndMoveMouse(3500 + Random(600));
MakeCompass('n');
SetAngle(0);
Result := True;
end;
3:
begin
Writeln('Antiban');
GameTab(Tab_Stats);
Wait(3000 + Random(1500));
GameTab(tab_Inv);
Result := True;
end;
4:
begin
Writeln('Antiban');
HoverSkill('random', False);
Wait(1000 + Random(500));
GameTab(tab_Inv);
Result := True;
end;
5:
begin
Writeln('Antiban');
PickUpMouse;
MakeCompass('n');
SetAngle(0);
Result := True;
end;
6:
begin
Writeln('Antiban');
BoredHuman;
MakeCompass('n');
SetAngle(0);
Result := True;
end;
end;
end;
procedure TPAFinderMM(Hue, Sat: Extended; Colour, Tolerance: Integer);
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MMX1, MMY1, MMX2, MMY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
begin
MiddleTPAEx(ATPA[i], x, y);
Mouse(x, y, 5, 5, True);
end;
end;
function TPAFinder(Hue, Sat: Extended; Colour, Tolerance, ClickType: Integer; UpText, Options: Array of String): Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);
if WaitUpTextMulti(UpText, 450) then
begin
ClickMouse2(ClickType);
ChooseOptionMulti(Options);
Result := True;
Exit;
end else
Result := False;
end;
end;
function TPAFinderNoUp(Hue, Sat: Extended; Colour, Tolerance, ClickType: Integer; Options: Array of String): Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);
Result := True;
Exit;
end;
end;
function TPAFinderMC(Hue, Sat: Extended; Colour, Tolerance: Integer): Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MCX1, MCY1, MCX2, MCY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
Mouse(x, y, 5, 5, True);
Result := True;
end;
end;
function TPASpotterMC(Hue, Sat: Extended; Colour, Tolerance: Integer): Boolean;
var
CTS: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MCX1, MCY1, MCX2, MCY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
if FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MCX1, MCY1, MCX2, MCY2, Tolerance) then
Result := True
else
Result := False;
end;
function TPASpotterMM(Hue, Sat: Extended; Colour, Tolerance: Integer): Boolean;
var
CTS: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MMX1, MMY1, MMX2, MMY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
if FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MMX1, MMY1, MMX2, MMY2, Tolerance) then
Result := True
else
Result := False;
end;
function TPASpotter(Hue, Sat: Extended; Colour, Tolerance: Integer): Boolean;
var
CTS: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
if FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Tolerance) then
Result := True
else
Result := False;
end;
procedure OpenBanking;
begin
FailSafe := 0;
if TPAFinder(0.93, 0.19, 7697786, 3, 0, ['ank', 'anker'], ['ank B']) or OpenBankNPC then
begin
MarkTime(FailSafe);
repeat
Wait(10);
AntiBan('Random');
Until(BankScreen) or (PinScreen) or (TimeFromMark(FailSafe) >= 9500);
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Terminate('No Pin Given');
end else
begin
FindSymbol(x, y, 'Bank');
Mouse(x, y, 5, 5, True);
FFlag(6);
while IsMoving do
begin
Wait(100);
AntiBan('random');
end;
if TPAFinder(0.01, 0.05, 6645354, 3, 0, ['ank', 'anker'], ['ank B']) then
begin
MarkTime(FailSafe);
repeat
Wait(10);
AntiBan('Random');
Until(BankScreen) or (PinScreen) or (TimeFromMark(FailSafe) >= 9500);
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Terminate('No Pin Given');
end;
end;
end;
procedure HandleBank;
var
t: Integer;
begin
T := 0;
if InvCount >= 1 then
DepositAll;
wait(500);
if DragonhideColour = 'Purple' then
begin
if FindBitmapToleranceIn(Purple, x, y, MSX1, MSY1, MSX2, MSY2, 10) or TPAFinderNoUp(0.02, 0.22, PurpleColour, 2, 0, ['All', 'll'])then
begin
Mouse(x, y, 5, 5, False);
WaitOption('All', 1000);
MarkTime(T);
repeat
wait(10);
until(InvFull) or (TimeFromMark(t) >= 5000);
if not InvFull then
Terminate('Not Enough hides left to make a full Inv');
end else
Terminate('Could not find hides in bank');
end;
if DragonhideColour = 'Black' then
begin
if FindBitmapToleranceIn(Black, x, y, 25, 85, 480, 290, 10) then
begin
Mouse(x, y, 5, 5, False);
WaitOption('All', 1000);
MarkTime(T);
repeat
wait(10);
until(InvFull) or (TimeFromMark(t) >= 5000);
if not InvFull then
Terminate('Not Enough hides left to make a full Inv');
end else
Terminate('Could not find hides in bank');
end;
if DragonhideColour = 'Red' then
begin
if FindBitmapToleranceIn(Red, x, y, MSX1, MSY1, MSX2, MSY2, 10) then
begin
Mouse(x, y, 5, 5, False);
WaitOption('All', 1000);
MarkTime(T);
repeat
wait(10);
until(InvFull) or (TimeFromMark(t) >= 5000);
if not InvFull then
Terminate('Not Enough hides left to make a full Inv');
end else
Terminate('Could not find hides in bank');
end;
if DragonhideColour = 'Blue' then
begin
if FindBitmapToleranceIn(Blue, x, y, MSX1, MSY1, MSX2, MSY2, 10) then
begin
Mouse(x, y, 5, 5, False);
WaitOption('All', 1000);
MarkTime(T);
repeat
wait(10);
until(InvFull) or (TimeFromMark(t) >= 5000);
if not InvFull then
Terminate('Not Enough hides left to make a full Inv');
end else
Terminate('Could not find hides in bank');
end;
if DragonhideColour = 'Green' then
begin
if FindBitmapToleranceIn(Green, x, y, MSX1, MSY1, MSX2, MSY2, 10) then
begin
Mouse(x, y, 5, 5, False);
WaitOption('All', 1000);
MarkTime(T);
repeat
wait(10);
until(InvFull) or (TimeFromMark(t) >= 5000);
if not InvFull then
Terminate('Not Enough hides left to make a full Inv');
end else
Terminate('Could not find hides in bank');
end;
end;
function Banking: Boolean;
var
t: Integer;
begin
if not LoggedIn then Exit;
if Start >= 1 then
begin
Result := True;
Start := 0;
Exit;
end;
Start := 0;
Writeln('Banking...');
OpenBanking;
HandleBank;
MarkTime(t);
repeat
wait(10);
until(InvFull) or (TimeFromMark(t) >= 5000);
if InvFull then
Result := True;
end;
procedure WalkingTanner;
begin
TPAFinderMM(0.35, 1.17, 2905461, 3);
FFlag(6);
end;
function WalkingToTanner: Boolean;
begin
if not LoggedIn then Exit;
if RadialWalkTolerance(6916247, 0, 90, 70, 1, -1, 7) or RadialWalkTolerance(6590363, 0, 90, 70, 1, -1, 7) then
begin
AntiBan('random');
WalkingTanner;
while IsMoving do
begin
Wait(100);
AntiBan('random');
end;
if (TPASpotter(0.02, 1.35, 5533884, 8)) or (TPASpotter(0.04, 0.10, 4484249, 4)) or (TPASpotter(0.37, 1.40, 14800608, 5)) then
Result := True
else
begin
TPAFinder(0.02, 0.15, 1003887, 7, 1, ['Walk', 'alk', 'ere'], ['alk']);
Wait(1000+random(500));
while IsMoving do
begin
Wait(100);
AntiBan('random');
end;
if (TPASpotter(0.02, 1.35, 5533884, 8)) or (TPASpotter(0.04, 0.10, 4484249, 4)) or (TPASpotter(0.37, 1.40, 14800608, 5)) then
Result := True;
end;
end else
Fail := Fail + 1;
end;
function ClickTanner: Boolean;
begin
if not LoggedIn then Exit;
AntiBan('random');
if (TPAFinder(0.02, 1.35, 5533884, 8, 0, ['llis', 'Ellis'], ['Tan', 'an', 'ides', 'Hides'])) or (TPAFinder(0.04, 0.10, 4484249, 4, 0, ['Ellis', 'llis'], ['Tan', 'an', 'ides', 'Hides'])) or (TPAFinder(0.37, 1.40, 14800608, 5, 0, ['Ellis', 'llis'], ['Tan', 'an', 'ides', 'Hides'])) then
WaitColorGoneIn(9746890, MCX1, MCY1, MCX2, MCY2, 5, 10000)
else
begin
MMouse(260, 165, 4, 6);
Wait(200+random(200));
if IsUpTextMultiCustom(['llis', 'Ellis']) then
ClickMouse2(0);
WaitOptionMulti(['Tan', 'an', 'Hides', 'ides'], 1000);
WaitColorGoneIn(9746890, MCX1, MCY1, MCX2, MCY2, 5, 10000);
end;
if FindColorSpiralTolerance(x, y, 2104079, MCX1, MCY1, MCX2, MCY2, 5) then
Result := True;
end;
function Tan: Boolean;
begin
Case DragonhideColour of
'Green': begin
Failsafe := 0;
FindColorSpiralTolerance(x, y, 2849730, 490, 390, 510, 470, 5);
MMouse(x, y, 1, 1);
MarkTime(Failsafe);
repeat
wait(10);
FindNormalRandoms;
if TimeFromMark(Failsafe) >= 10000 then
Terminate('Failed To Tan');
until TPASpotterMC(0.17, 0.94, 670728, 2);
TPAFinderMC(0.17, 0.94, 670728, 2);
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Terminate('No Pin Given');
MouseItem(28, 3);
WaitUptext('eather', 45000);
end;
'Blue': begin
Failsafe := 0;
FindColorSpiralTolerance(x, y, 2849730, 490, 390, 510, 470, 5);
MMouse(x, y, 1, 1);
MarkTime(Failsafe);
repeat
wait(10);
FindNormalRandoms;
if TimeFromMark(Failsafe) >= 10000 then
Terminate('Failed To Tan');
until TPASpotterMC(0.14, 1.01, 4918282, 2);
TPAFinderMC(0.14, 1.01, 4918282, 2);
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Terminate('No Pin Given');
MouseItem(28, 3);
WaitUptext('eather', 45000);
end;
'Red': begin
Failsafe := 0;
FindColorSpiralTolerance(x, y, 2849730, 490, 390, 510, 470, 5);
MMouse(x, y, 1, 1);
MarkTime(Failsafe);
repeat
wait(10);
FindNormalRandoms;
if TimeFromMark(Failsafe) >= 10000 then
Terminate('Failed To Tan');
until TPASpotterMC(0.14, 0.58, 527418, 2);
TPAFinderMC(0.14, 0.58, 527418, 2);
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Terminate('No Pin Given');
MouseItem(28, 3);
WaitUptext('eather', 45000);
end;
'Black': begin
Failsafe := 0;
FindColorSpiralTolerance(x, y, 2849730, 490, 390, 510, 470, 5);
MMouse(x, y, 1, 1);
MarkTime(Failsafe);
repeat
wait(10);
FindNormalRandoms;
if TimeFromMark(Failsafe) >= 10000 then
Terminate('Failed To Tan');
until TPASpotterMC(0.01, 0.67, 1907998, 2);
TPAFinderMC(0.01, 0.67, 1907998, 2);
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Terminate('No Pin Given');
MouseItem(28, 3);
WaitUptext('eather', 45000);
end;
'Purple': begin
Failsafe := 0;
FindColorSpiralTolerance(x, y, 2849730, 490, 390, 510, 470, 5);
MMouse(x, y, 1, 1);
MarkTime(Failsafe);
repeat
wait(10);
FindNormalRandoms;
if TimeFromMark(Failsafe) >= 10000 then
Terminate('Failed To Tan');
until TPASpotterMC(0.06, 0.25, 5971010, 3);
TPAFinderMC(0.06, 0.25, 5971010, 3);
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
Terminate('No Pin Given');
MouseItem(28, 3);
WaitUptext('eather', 45000);
end;
end;
if IsUpText('eather') then
begin
Result := True;
HidesDone := HidesDone + 28;
end;
end;
function WalkToBank: Boolean;
begin
if not LoggedIn then Exit;
AntiBan('random');
if RadialWalkTolerance(6916247, 160, 210, 70, -1, 1, 7) or RadialWalkTolerance(6524314, 160, 210, 70, -1, 1, 15) then
begin
AntiBan('random');
if RadialWalkTolerance(6916247, 160, 210, 45, -1, 1, 7) or RadialWalkTolerance(6524314, 160, 210, 45, -1, 1, 15) then
begin
AntiBan('random');
if FindSymbol(x, y, 'Bank') then
begin
Mouse(x, y, 5, 5, True);
FFlag(2);
end else
RadialWalkTolerance(6060189, 250, 280, 60, 1, 1, 10);
while IsMoving do
begin
Wait(100);
AntiBan('random');
end;
if FindColorSpiralTolerance(x, y, 2314064, MSX1, MSY1, MSX2, MSY2, 5) then
Result := True;
end else
Fail := Fail + 1;
end else
Fail := Fail + 1;
end;
procedure PaintSmart;
var
Line1, Line2, Line3: String;
Image: Integer;
begin
Image := BitmapFromString(509, 128, 'meJztwkERAAAMAqDqRjOKUVZj' +
'DzjSRVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV1X8Pvm/vpQ==');
Line1 := ('You have been Running for a total of ' + TimeRunning + '');
Line2 := ('You have managed to Tan ' + IntToStr(HidesDone) + ' Hides');
Line3 := ('You are Tanning ' + IntToStr(((HidesDone) * 3600) / (GetTimeRunning / 1000)) + ' Hides per hour!');
SMART_DrawBitmap(True, Image, Point(7, 344));
SMART_DrawText(20, 360, LoginChars, Line1, clRed);
SMART_DrawText(20, 380, LoginChars, Line2, clRed);
SMART_DrawText(20, 400, LoginChars, Line3, clRed);
FreeBitmap(Image);
end;
procedure Proggy;
begin
ClearDebug;
Writeln('|-------------------------------------------------------------|');
Writeln(' You have been Running for a total of ' + TimeRunning + '');
Writeln(' You have managed to Tan ' + IntToStr(HidesDone) + ' Hides');
Writeln(' You are Tanning ' + IntToStr(((HidesDone) * 3600) / (GetTimeRunning / 1000)) + ' Hides per hour!');
Writeln(' Thankyou for using Caotoms Tanner :)');
Writeln('|-------------------------------------------------------------|');
SRLRandomsReport;
PaintSmart;
end;
function InvHides: Integer;
begin
if DragonhideColour = 'Purple' then
begin
if FindBitmapToleranceIn(Purple, x, y, MIX1, MIY1, MIX2, MIY2, 10) then
Result := CountItems('Bitmap', Purple, [10])
else
begin
If TPAFinderNoUp(0.02, 0.22, PurpleColour, 2, 0, ['All', 'll']) then
Result := CountItems('color', PurpleColour, [10]);
end;
end;
if DragonhideColour = 'Black' then
begin
if FindBitmapToleranceIn(Black, x, y, MIX1, MIY1, MIX2, MIY2, 10) then
Result := CountItems('Bitmap', Black, [10]);
end;
if DragonhideColour = 'Red' then
begin
if FindBitmapToleranceIn(Red, x, y, MIX1, MIY1, MIX2, MIY2, 10) then
Result := CountItems('Bitmap', Red, [10]);
end;
if DragonhideColour = 'Blue' then
begin
if FindBitmapToleranceIn(Blue, x, y, MIX1, MIY1, MIX2, MIY2, 10) then
Result := CountItems('Bitmap', Blue, [10]);
end;
if DragonhideColour = 'Green' then
begin
if FindBitmapToleranceIn(Green, x, y, MIX1, MIY1, MIX2, MIY2, 10) then
Result := CountItems('Bitmap', Green, [10]);
end;
end;
procedure CheckStart;
begin
if not FindColorSpiralTolerance(x, y, 2314064, MSX1, MSY1, MSX2, MSY2, 5) then
Terminate('Wrong Starting Location, please start at AK bank with D-hides in the opening bankscreen');
end;
procedure CheckRun;
var
s: String;
begin
if GetMMLevels('run', s) <= 30 then
RestUntil(90);
SetRun(True);
end;
procedure Mainloop;
begin
if not LoggedIn then Exit;
if BankScreen then CloseBank;
if InvHides = 28 then
begin
CheckRun;
if not FindSymbol(x, y, 'Quest') then
begin
ClickTanner;
Tan;
end else
WalkingToTanner;
end else
if FindSymbol(x, y, 'Quest') then
Banking
else
WalkToBank;
end;
begin
StartSetup(56, True, True);
ClickNorth(0);
HidesDone := 0;
Fail := 0;
CheckStart;
CheckRun;
LoadVars;
repeat
Mainloop;
Proggy;
Until(not LoggedIn) or (Fail >= 5);
Logout;
FreeVars;
end.
My Rock Crab Trainer with banking (I have deleted the proggy bitmap image as it was like 2000 lines, to see it visit the thread in the fighting script forum):
program CaotomsRockCrabber;
{$define SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}
{$i SRL/SRL/skill/fighting.simba}
{$i sps/sps.simba}
{$i SRL/SRL/misc/paintsmart.simba}
const
AttPot = 0; //Amount of doses you have (Super Att)
StrPot = 0; //Amount of doses you have (Super Str)
DefPot = 0; //Amount of doses you have (Super Def)
CombatPot = 0; //Amount of doses you have (Combat pot)
TimeUntilRefill = 10; //Time between using potions (in mins)
EatAt = 60; //HP Percent to start Eating Food
RunAt = 15; //HP Percent to run away and log
RunDirection = 'S'; //The Direction you want to run away
var
x, y, Att, Str, Def, Combat, Agro, Fail, APot,
StPot, DPot, CPot, AgroTimer, NearFence, Missing, Failsafe: Integer;
Home, ResetPoint, BackHome: TPointArray;
StartExp: Int64;
aFound: Extended;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Username Here
Pass := ''; //Password Here
Pin := '9854'; //Pin Here (Blank if no pin)
BoxRewards := ['XP','xp','lamp']; //Choose Box rewards (Recommend Defult)
Active := True;
end;
end;
procedure SetDTM;
begin
NearFence := DTMFromString('mbQAAAHicY2VgYNBlYmAwA2J7ILYEYn0gjgSKuwNxMBDHA3EqELdPns9QnuPOUJzrypDlLMLgZKvJwA8UR8eMWDAYAAA1KgiS');
end;
procedure SetSPS;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['6_3', '6_4', '7_4']);
Home := [Point(2615, 1750), Point(2621, 1740), Point(2636, 1735), Point(2653, 1740),
Point(2653, 1746), Point(2651, 1757), Point(2649, 1767), Point(2640, 1773),
Point(2624, 1772), Point(2622, 1764), Point(2626, 1757), Point(2631, 1749),
Point(2642, 1749), Point(2643, 1755), Point(2639, 1763), Point(2633, 1761),
Point(2636, 1755)];
ResetPoint := [Point(2626, 1757), Point(2629, 1770), Point(2629, 1788),
Point(2633, 1803), Point(2638, 1820), Point(2639, 1840),
Point(2641, 1851), Point(2642, 1863), Point(2643, 1885),
Point(2641, 1901)];
BackHome := [Point(2641, 1901), Point(2643, 1885), Point(2642, 1863),
Point(2641, 1851), Point(2639, 1840), Point(2638, 1820),
Point(2633, 1803), Point(2629, 1788), Point(2629, 1770),
Point(2626, 1757)];
end;
Procedure Antiban;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
Case Random(1500) Of
0:
begin
Writeln('Antiban');
GameTab(tab_Stats) HoverSkill('Hitpoints', False);
Wait(400 + Random(450));
GameTab(tab_Inv);
MouseSpeed := (RandomRange(15,20));
end;
1:
begin
Writeln('Antiban');
GameTab(tab_Inv);
ExamineInv;
MouseSpeed := (RandomRange(15,20));
end;
2:
begin
Writeln('Antiban');
SleepAndMoveMouse(3500 + Random(600));
ClickNorth(0);
MouseSpeed := (RandomRange(15,20));
end;
3:
begin
Writeln('Antiban');
GameTab(Tab_Stats);
Wait(3000 + Random(1500));
GameTab(tab_Inv);
MouseSpeed := (RandomRange(15,20));
end;
4:
begin
Writeln('Antiban');
HoverSkill('random', False);
Wait(1000 + Random(500));
GameTab(tab_Inv);
MouseSpeed := (RandomRange(15,20));
end;
5:
begin
Writeln('Antiban');
PickUpMouse;
MouseSpeed := (RandomRange(15,20));
end;
6:
begin
Writeln('Antiban');
BoredHuman;
ClickNorth(0);
MouseSpeed := (RandomRange(15,20));
end;
end;
end;
function RadialWalkToEndHouse(Colour, StartDegree, EndDegree, RadiusFromCharacter, Tol, MaxWalks: Integer; FailToTheRight, FailDownwards: Boolean): Boolean;
var
x, y, Xmod, Ymod, Walks: Integer;
begin
Walks := 0;
if FailToTheRight then
Xmod := 1
else
Xmod := -1;
if FailDownwards then
Ymod := 1
else
Ymod := -1;
repeat
RadialWalkTolerance(Colour, StartDegree, EndDegree, RadiusFromCharacter, Xmod, Ymod, Tol);
Walks := Walks + 1;
until(not RadialWalkTolerance(Colour, StartDegree, EndDegree, RadiusFromCharacter, Xmod, Ymod, Tol)) or (Walks >= MaxWalks) or (FindSymbol(x, y, 'Portal'));
end;
function RadialWalkToEnd(Colour, StartDegree, EndDegree, RadiusFromCharacter, Tol, MaxWalks: Integer; FailToTheRight, FailDownwards: Boolean): Boolean;
var
x, y, Xmod, Ymod, Walks: Integer;
begin
Walks := 0;
if FailToTheRight then
Xmod := 1
else
Xmod := -1;
if FailDownwards then
Ymod := 1
else
Ymod := -1;
repeat
RadialWalkTolerance(Colour, StartDegree, EndDegree, RadiusFromCharacter, Xmod, Ymod, Tol);
Walks := Walks + 1;
until(not RadialWalkTolerance(Colour, StartDegree, EndDegree, RadiusFromCharacter, Xmod, Ymod, Tol)) or (Walks >= MaxWalks) or (FindSymbol(x, y, 'Quest'));
end;
procedure AttPotion;
begin
if FindColorSpiralTolerance(x, y, 11679798, MIX1, MIY1, MIX2, MIY2, 15) then
begin
Mouse(x, y, 2, 2, True);
MarkTime(Att);
APot := APot + 1;
end else
Writeln('Could Not Find Super Attack Potion');
end;
procedure StrPotion;
begin
if FindColorSpiralTolerance(x, y, 11053488, MIX1, MIY1, MIX2, MIY2, 15) then
begin
Mouse(x, y, 2, 2, True);
MarkTime(Str);
StPot := StPot + 1;
end else
Writeln('Could Not Find Super Strength Potion');
end;
procedure DefPotion;
begin
if FindColorSpiralTolerance(x, y, 3642549, MIX1, MIY1, MIX2, MIY2, 15) then
begin
Mouse(x, y, 2, 2, True);
MarkTime(Def);
DPot := DPot + 1;
end else
Writeln('Could Not Find Super Defence Potion');
end;
procedure CombatPotion;
begin
if FindColorSpiralTolerance(x, y, 6203764, MIX1, MIY1, MIX2, MIY2, 15) then
begin
Mouse(x, y, 2, 2, True);
MarkTime(Combat);
CPot := CPot + 1;
end else
Writeln('Could Not Find Combat Potion');
end;
procedure PotUp;
begin
if not LoggedIn then Exit;
if (TimeFromMark(Att) > TimeUntilRefill * 60000) or
(TimeFromMark(Str) > TimeUntilRefill * 60000) or
(TimeFromMark(Def) > TimeUntilRefill * 60000) or
(TimeFromMark(Combat) > TimeUntilRefill * 60000) then
begin
if (TimeFromMark(Att) > TimeUntilRefill * 60000) then
if APot < AttPot then AttPotion;
Wait(RandomRange(550,600));
if (TimeFromMark(Str) > TimeUntilRefill * 60000) then
if StPot < StrPot then StrPotion;
Wait(RandomRange(550,600));
if (TimeFromMark(Def) > TimeUntilRefill * 60000) then
if DPot < DefPot then DefPotion;
Wait(RandomRange(550,600));
if (TimeFromMark(Combat) > TimeUntilRefill * 60000) then
if CPot < CombatPot then CombatPotion;
Wait(RandomRange(550,600));
end;
end;
procedure WalkBack;
var
Colour: String;
begin
RadialWalkTolerance(5395030, 0, 90, 70, -1, 1, 10);
While IsMoving do // Added this as the flag occasionally drops off the minimap which screws with the walking.
begin
Wait(10);
AntiBan;
end;
RadialWalkTolerance(5395030, 0, 90, 70, -1, 1, 10);
RadialWalkTolerance(5395030, 0, 90, 70, -1, 1, 10);
if GetMMLevels('run', Colour) < 20 then
RestUntil(90);
RadialWalkTolerance(5395030, 0, 90, 45, -1, 1, 10);
RadialWalkToEnd(5065290, 200, 300, 70, 10, 10, False, True);
RadialWalkToEnd(5198421, 270, 356, 70, 10, 10, True, True);
if GetMMLevels('run', Colour) < 20 then
RestUntil(90);
RadialWalkToEndHouse(5198421, 0, 90, 70, 10, 10, False, True);
RadialWalkToEnd(4677992, 100, 30, 70, 10, 10, True, False);
if GetMMLevels('run', Colour) < 20 then
RestUntil(90);
RadialWalkToEnd(1400623, 0, 30, 70, 10, 10, True, False);
SPS_WalkPath(BackHome);
SPS_WalkPath(Home);
MarkTime(Agro);
end;
procedure Bank;
var
i, M: Integer;
begin
if not LoggedIn then Exit;
if InvEmpty then
begin
Writeln('No Teleport or food provided');
repeat
RunAway(RunDirection, True, 2, 2000);
Logout;
Until(not LoggedIn)
TerminateScript;
end;
for i := 1 to 28 do
if ExistsItem(i) then
begin
InvMouse(i, 3);
if IsUpTextMultiCustom(['amelot', 'teleport', 'eleport', 'port', 'Cam', 'ame', 'reak']) then
begin
M := 0;
ClickMouse2(True);
Wait(4500+random(950));
RadialWalkTolerance(5395796, 220, 295, 70, -1, 1, 10);
RadialWalkTolerance(5395796, 220, 295, 70, -1, 1, 10);
if FindSymbol(x, y, 'Bank') then
begin
Mouse(x, y, 5, 5, True);
FFlag(1);
end;
While IsMoving do
begin
Wait(100);
Antiban;
end;
OpenBankNPC;
if Bankscreen or Pinscreen then
Wait(100)
else
begin
RadialWalkTolerance(62699, 0, 20, 70, -1, 1, 10);
OpenBankNPC;
end;
MarkTime(FailSafe);
repeat
Wait(10);
AntiBan;
Until(BankScreen) or (PinScreen) or (TimeFromMark(FailSafe) >= 9500);
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
begin
Writeln('No Pin Given');
Logout;
TerminateScript;
end;
if TimeFromMark(Failsafe) >= 9500 then
begin
Writeln('Failed to open bank');
logout;
TerminateScript;
end;
Withdraw(0, 0, 28);
CloseBank;
WalkBack;
end else
begin
M := M + 1;
if M >= 28 then
begin
Writeln('No Teleport or food provided');
repeat
RunAway(RunDirection, True, 2, 2000);
Logout;
Until(not LoggedIn)
TerminateScript;
end;
end;
end;
end;
procedure Eat; //Partial Thanks to Narcle and MasterStroke
var
i: Integer;
begin
if not InvEmpty then
for i := 1 to 28 do
if ExistsItem(i) then
begin
InvMouse(i, 3);
if IsUpTextMultiCustom(['Eat', 'obster', 'onkfish', 'hark', 'almon', 'una',
'ass', 'wordfish', 'ike', 'ake', 'od', 'hrimp', 'rout', 'erring', 'ardine']) then
begin
Missing := 0;
ClickMouse2(True);
Wait(RandomRange(400,700));
end else
begin
Missing := Missing + 1;
if Missing >= 50 then
Bank;
if HPPercent >= EatAt then
begin
i := 28;
end;
end;
end;
end;
procedure CheckHP;
begin
if not LoggedIn then Exit;
if HPPercent <= RunAt then
begin
Writeln('WARNING MIN HEALTH - Running Away');
repeat
RunAway(RunDirection, True, 2, 2000);
Logout;
Until(not LoggedIn)
TerminateScript;
end;
if HPPercent <= EatAt then
begin
Writeln('WARNING LOW HEALTH - Eating');
Eat;
end;
end;
procedure WalkHome;
begin
SPS_WalkPath(Home);
end;
function AtHobs: Boolean;
begin
if FindDTMRotated(NearFence, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
Result := True;
end;
procedure FindCrab;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.31,0.13);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3686464, MSX1, MSY1, MSX2, MSY2, 9);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
FindNormalRandoms;
WalkHome;
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
Wait(RandomRange(200,400));
If(IsUpTextMultiCustom(['Attack', 'ttack'])) then
begin
ClickMouse2(1);
FFlag(2);
Wait(RandomRange(2500,3500));
Exit;
end else
If(IsUpTextMultiCustom(['more', 'options'])) then
begin
GetMousePos(x, y);
ClickMouse2(0);
if OptionsExist(['Attack', 'ttack'], false) then
begin
ChooseOption('ttack');
FFlag(2);
Wait(RandomRange(4500,5500));
Exit;
end else
if OptionsExist(['Rock', 'ocks'], false) then
begin
ChooseOption('alk');
FFlag(2);
Wait(RandomRange(4500,5500));
Exit;
end;
end;
Fail := Fail + 1;
if Fail >= 40 then
begin
WalkHome;
end;
end;
end;
procedure ResetAgro;
begin
Writeln('Resetting Agro');
SPS_WalkPath(Home);
FFlag(6);
SPS_WalkPath(ResetPoint);
FFlag(6);
SPS_WalkPath(BackHome);
FFlag(6);
MarkTime(Agro);
end;
procedure PaintProggy;
var
Line1, Line2, Line3: String;
Image: Integer;
begin
// Image := (I removed the bitmap as it was too large, see the official thread for this script if you really want it)
Line1 := 'You have been Training for ' + TimeRunning + '';
Line2 := 'You have managed to gain ' + IntToStr(GetXpBarTotal - StartExp) + ' exp';
Line3 := 'You are gaining ' + IntToStr(((GetXpBarTotal - StartExp) * 3600) / (GetTimeRunning / 1000)) + ' exp per hour!';
SMART_DrawBitmap(True, Image, Point(7, 344));
SMART_DrawText(20, 360, LoginChars, Line1, clRed);
SMART_DrawText(20, 380, LoginChars, Line2, clRed);
SMART_DrawText(20, 400, LoginChars, Line3, clRed);
FreeBitmap(Image);
end;
procedure Proggy;
begin
ClearDebug;
Writeln('|-----------------------------------------------------|');
Writeln('| You have been Training for a total of ' + TimeRunning + ' |');
Writeln('| You have managed to gain ' + IntToStr(GetXpBarTotal - StartExp) + ' exp |');
Writeln('| You are gaining ' + IntToStr(((GetXpBarTotal - StartExp) * 3600) / (GetTimeRunning / 1000)) + ' exp per hour! |');
Writeln('| Thankyou for using Caotoms Rock Crabber :) |');
Writeln('|-----------------------------------------------------|');
SRLRandomsReport;
PaintProggy;
end;
procedure FrDTM;
begin
FreeDTM(NearFence);
end;
procedure Setup;
begin
MakeCompass('n');
SetAngle(0);
SetDTM;
SetSPS;
StartExp:= 0;
ToggleXPBar(True);
StartExp:= GetXPBarTotal;
APot := 1;
StPot := 1;
DPot := 1;
CPot := 1;
Fail := 0;
AgroTimer := 0;
end;
procedure MainLoop;
begin
MarkTime(Agro);
repeat
if FindDTMRotated(NearFence, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
WalkHome;
FindCrab;
PotUp;
CheckHP;
if InFight then
begin
repeat
Wait(100);
Antiban;
CheckHP;
FindNormalRandoms;
Fail := 0;
until(not InFight) or (not OthersInFight);
end;
Wait(RandomRange(400,500));
AntiBan;
Proggy;
until(TimeFromMark(Agro) >= 420000) or (not LoggedIn);
if (TimeFromMark(Agro) >= 420000) then
ResetAgro;
end;
begin
Smart_Server := 56;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
ClearDebug;
if not LoggedIn then LogInPlayer;
Setup;
ResetAgro;
repeat
MainLoop;
Until(not LoggedIn)
FrDTM;
end.
And Finally my Armoured Zombie Killer that uses prayer and guthans healing:
program CaotomsArmouredZombieGuthener;
{$define SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$DEFINE SRL5}
{$i SRL/SRL/misc/paintsmart.simba}
//// YOU MUST BE STANDING INSIDE THE TUNNEL OR IN FRONT OF THE TRAPDOOR \\\\
//// YOU MUST HAVE YOUR ARMOR EQUIPPED, GUTHANS IN THE FIRST 4 SLOTS OF INV \\\\
//// AND THE FIFTH SLOT MUST BE EMPTY IF YOU ARE USING A 1H'r \\\\
const
AttPot = 0; //Amount of doses you have (Super Att)
StrPot = 0; //Amount of doses you have (Super Str)
DefPot = 20; //Amount of doses you have (Super Def)
ComPot = 20; //Amount of doses you have (Combat pot)
TimeUntilRefill = 8; //Time between using potions (in mins)
PrayerRefill = 20; //Prayer points to refill at
UsingGuth = True; //Whether or not you are using Guthans to heal
Use2h = 'Yes'; //No if using a one hander and shield
HPToHeal = 900; //HP to heal back to with guthans
HealAt = 500; //HP to start healing at with guthans (Recommend about 50% of your LP)
RunAt = 120; //HP to run away and log
var
x, y, Att, Str, Def, Com, Apot, Spot, Dpot, Cpot, Helm, Chest, Spear, Legs, Total, Castle: Integer;
Termination: Extended;
StartExp: Int64;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Username Here
Pass := ''; //Password Here
BoxRewards := ['XP','xp','lamp']; //Choose Box rewards (Recommend Defult)
Active := True;
end;
end;
//////////////////////Script Starts Here, do not change anything below this line unless you know what you are doing/////////////////////////////////////
function TPAFinder(Hue, Sat: Extended; Colour, Tolerance, ClickType: Integer; UpText, Options: Array of String): Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MSX1, MSY1, MSX2, MSY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);
if WaitUpTextMulti(UpText, 450) then
begin
ClickMouse2(ClickType);
ChooseOptionMulti(Options);
Result := True;
Exit;
end else
Result := False;
end;
end;
function TPAFinderMI(Hue, Sat: Extended; Colour, Tolerance: Integer; UpText: Array of String): Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MIX1, MIY1, MIX2, MIY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);
if WaitUpTextMulti(UpText, 450) then
begin
ClickMouse2(1);
Result := True;
Exit;
end else
Result := False;
end;
end;
function TPAFinderMM(Hue, Sat: Extended; Colour, Tolerance: Integer): Boolean;
var
CTS, I, x, y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MMX1, MMY1, MMX2, MMY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
begin
MiddleTPAEx(ATPA[i], x, y);
Mouse(x, y, 5, 5, True);
end;
end;
function TPASpotterMM(Hue, Sat: Extended; Colour, Tolerance: Integer): Boolean;
var
CTS: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue,Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MMX1, MMY1, MMX2, MMY2, Tolerance);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 15, 15);
if FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colour, MMX1, MMY1, MMX2, MMY2, Tolerance) then
Result := True
else
Result := False;
end;
procedure AntiRandom;
begin
if not FindNormalRandoms then
if not LoggedIn then
begin
Writeln('Failed a random event');
Logout;
TerminateScript;
end;
end;
function Antiban(Skill: String): Boolean;
begin
if(not(LoggedIn))then
Exit;
AntiRandom;
Case Random(5000) Of
0:
begin
Writeln('Antiban');
GameTab(tab_Stats) HoverSkill(Skill, False);
Wait(400 + Random(450));
GameTab(tab_Inv);
Result := True;
end;
1:
begin
Writeln('Antiban');
GameTab(tab_Inv);
ExamineInv;
Result := True;
end;
2:
begin
Writeln('Antiban');
SleepAndMoveMouse(3500 + Random(600));
MakeCompass('n');
SetAngle(0);
Result := True;
end;
3:
begin
Writeln('Antiban');
GameTab(Tab_Stats);
Wait(3000 + Random(1500));
GameTab(tab_Inv);
Result := True;
end;
4:
begin
Writeln('Antiban');
HoverSkill('random', False);
Wait(1000 + Random(500));
GameTab(tab_Inv);
Result := True;
end;
5:
begin
Writeln('Antiban');
PickUpMouse;
MakeCompass('n');
SetAngle(0);
Result := True;
end;
6:
begin
Writeln('Antiban');
BoredHuman;
MakeCompass('n');
SetAngle(0);
Result := True;
end;
end;
end;
function Outside: Boolean;
begin
if FindColorSpiralTolerance(x, y, 5157107, MMX1, MMY1, MMX2, MMY2, 10) then
Result := True
else
Result := False;
end;
procedure AttPotion;
begin
if FindColorSpiralTolerance(x, y, 11877176, MIX1, MIY1, MIX2, MIY2, 15) then
begin
Mouse(x, y, 2, 2, True);
MarkTime(Att);
APot := APot + 1;
end else
Writeln('Could Not Find Super Attack Potion');
end;
procedure ComPotion;
begin
if FindColorSpiralTolerance(x, y, {11877176} 5675626, MIX1, MIY1, MIX2, MIY2, 15) then
begin
Mouse(x, y, 2, 2, True);
MarkTime(Com);
APot := APot + 1;
end else
Writeln('Could Not Find Combat Potion');
end;
procedure StrPotion;
begin
if FindColorSpiralTolerance(x, y, 11645626, MIX1, MIY1, MIX2, MIY2, 15) then
begin
Mouse(x, y, 2, 2, True);
MarkTime(Str);
SPot := SPot + 1;
end else
Writeln('Could Not Find Super Strength Potion');
end;
procedure DefPotion;
begin
if FindColorSpiralTolerance(x, y, 3707568, MIX1, MIY1, MIX2, MIY2, 15) then
begin
Mouse(x, y, 2, 2, True);
MarkTime(Def);
DPot := DPot + 1;
end else
Writeln('Could Not Find Super Defence Potion');
end;
procedure PotUp;
begin
if not LoggedIn then Exit;
if (TimeFromMark(Att) > TimeUntilRefill * 60000) or
(TimeFromMark(Str) > TimeUntilRefill * 60000) or
(TimeFromMark(Com) > TimeUntilRefill * 60000) or
(TimeFromMark(Def) > TimeUntilRefill * 60000) then
begin
if (TimeFromMark(Att) > TimeUntilRefill * 60000) then
if APot < AttPot then AttPotion;
Wait(RandomRange(550,600));
if (TimeFromMark(Str) > TimeUntilRefill * 60000) then
if SPot < StrPot then StrPotion;
Wait(RandomRange(550,600));
if (TimeFromMark(Def) > TimeUntilRefill * 60000) then
if DPot < DefPot then DefPotion;
Wait(RandomRange(550,600));
if (TimeFromMark(Com) > TimeUntilRefill * 60000) then
if CPot < ComPot then ComPotion;
Wait(RandomRange(550,600));
end;
end;
function PrayerPoints: Integer;
var
Colour: String;
begin
Result := GetMMLevels('prayer', Colour);
end;
procedure DownTrapDoor;
var
Tries: Integer;
begin
Wait(200+random(50));
if TPAFinder(0.01, 0.01, 6381926, 10, 1, ['Climb', 'limb', 'Trap', 'rapd'], ['limb']) then
Exit
else
if TPAFinder(0.01, 0.01, 6645097, 10, 1, ['Climb', 'limb', 'Trap', 'rapd'], ['limb']) then
Exit
else
Tries := Tries + 1;
Writeln('Could Not Find Trapdoor');
end;
procedure WalkTowardsLadder;
begin
if not Outside then
if RadialWalkTolerance(5921365, 0, 10, 70, 1, -1, 50) or RadialWalkTolerance(5330260, 0, 50, 70, 1, -1, 50) then
Writeln('Walking Towards Ladder')
else
Mouse(625, 25, 15, 15, True);
end;
function UseAltar: Boolean;
var
Tries: Integer;
begin
if Outside then
begin
Wait(200+random(50));
if TPAFinder(0.05, 0.50, 9345959, 11, 1, ['Pray', 'ray', 'ay-at', 'Chaos', 'haos'], ['ray']) then
begin
Wait(RandomRange(100,200));
ClickMouse2(1);
Wait(RandomRange(200,250));
Result := True;
Exit;
end else
if TPAFinder(0.70, 3.86, 3092546, 10, 1, ['Pray', 'ray', 'ay-at', 'Chaos', 'haos'], ['ray']) then
begin
Wait(RandomRange(100,200));
ClickMouse2(1);
Wait(RandomRange(200,250));
Result := True;
Exit;
end else
if TPAFinder(0.22, 0.66, 10135475, 3, 1, ['Pray', 'ray', 'ay-at', 'Chaos', 'haos'], ['ray']) then
begin
Wait(RandomRange(100,200));
ClickMouse2(1);
Wait(RandomRange(200,250));
Result := True;
Exit;
end;
end;
end;
function ClimbLadder: Boolean;
var
CTS, I, R: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
if TPAFinder(0.06, 0.40, 2773344, 3, 1, ['adder', 'limb'], ['limb']) then
begin
Result := True;
FFlag(2);
R := 0;
MarkTime(r);
repeat
Wait(100);
AntiBan('random');
until (TimeFromMark(r) >= 7000) or (UseAltar);
end else
Writeln('Could Not Find Ladder');
Wait(200+random(50));
WalkTowardsLadder;
FFlag(6);
Wait(RandomRange(100,250));
end;
procedure ClickPray;
begin
MMouse(720, 70, 10, 10);
Wait(RandomRange(100,200));
ClickMouse2(1);
Wait(RandomRange(200,250));
end;
procedure TurnOnPrayer;
begin
if not LoggedIn then Exit;
if FindColorSpiralTolerance(x, y, 9061213, 712, 57, 730, 77, 15) or FindColorSpiralTolerance(x, y, 6827842, 712, 57, 730, 77, 15) then
begin
ClickPray;
end;
end;
procedure RefillPrayer;
begin
if not LoggedIn then Exit;
MakeCompass('s');
SetAngle(0);
if Outside then
begin
if PrayerPoints <= PrayerRefill then
begin
UseAltar
Wait(RandomRange(1000,1400));
end;
DownTrapDoor;
Wait(RandomRange(600,1000));
end else
if (PrayerPoints <= PrayerRefill) then
begin
if not Outside then
begin
MakeCompass('s');
SetAngle(0);
ClimbLadder;
Wait(RandomRange(1000,1200));
end;
if Outside then
begin
if (PrayerPoints <= PrayerRefill) then
begin
UseAltar;
Wait(RandomRange(1000,1400));
end;
DownTrapDoor;
Wait(RandomRange(600,1000));
end else
begin
Writeln('Failed to find Altar');
Termination := Termination + 1;
end;
end;
end;
function HitPoints: Integer;
var
Colour: String;
begin
Result := GetMMLevels('health', Colour);
end;
procedure SetDTM;
begin
Helm := DTMFromString('mlwAAAHicY2dgYHBkYmBwAGJPILYCYncgtgRiWyC+D5R/B8SPgfgGEN+G8p8BsY2tFYOmpgZDdKQbGOvr6zKYm5sy8PLyMPAD5XFhRjwYCgAKywzz');
Spear := DTMFromString('mlwAAAHicY2dgYEhiYmDIB+ISIE4H4mwgrgDieCC+BZR/AcRvgfg+ED8G4vdAfA2I1dRUGZSVlRis7LUYLK3MGfQsbMH8hMRYBn6gPC7MiAdDAQCOFg35');
Chest := DTMFromString('mggAAAHicY2NgYDjIxMBwGoi3AfEeID4CxPuB+BlQ7i0U30XChkYGDPIK8gyamhoMjk72YJqXl4eBHyiHDTPiwBAAAM6ZDRg=');
Legs := DTMFromString('mrAAAAHic42BgYJjNxMDQDcSTgHgGEE8H4olAPB/KvwdU8wKIHwHxEyB+DcRvgfgOEN8GYh0dLQZlZSWG+FhPhtgoOwZRUREGGVlpBk1NDQZzc1MGfqAafJiRAIYBAPpPEPY=');
Castle := DTMFromString('mggAAAHicY2NgYChjYmAIB2I3IO4B4nQgng3EHUC5OiB2g2IrIE4E4ol9bQxsLIwouLI0n0EOKIcNM+LAEAAA+lsIyQ==');
end;
procedure EquipGuth;
begin
if not LoggedIn then Exit;
if FindDTM(Helm, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(RandomRange(100,100));
end;
if FindDTM(Chest, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(RandomRange(100,100));
end;
if FindDTM(Legs, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(RandomRange(100,100));
end;
if FindDTM(Spear, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(RandomRange(100,100));
end;
end;
procedure FrDTM;
begin
FreeDTM(Helm);
FreeDTM(Spear);
FreeDTM(Legs);
FreeDTM(Chest);
FreeDTM(Castle);
end;
procedure EquipNorm;
begin
if not LoggedIn then Exit;
InvMouse(1, 1);
Wait(RandomRange(100,100));
InvMouse(2, 1);
Wait(RandomRange(100,100));
InvMouse(3, 1);
Wait(RandomRange(100,100));
InvMouse(4, 1);
Wait(RandomRange(100,100));
if Use2h = 'No' then
InvMouse(5, 1);
Wait(RandomRange(100,100));
end;
procedure CheckGuth;
begin
if not LoggedIn then Exit;
if FindDTM(Helm, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindDTM(Chest, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindDTM(Spear, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindDTM(Legs, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Exit;
end else
begin
EquipGuth;
Wait(100+random(100));
EquipNorm;
end;
end else
begin
EquipGuth;
Wait(100+random(100));
EquipNorm;
end;
end else
begin
EquipGuth;
Wait(100+random(100));
EquipNorm;
end;
end else
begin
EquipGuth;
Wait(100+random(100));
EquipNorm;
end;
end;
procedure Heal;
begin
if not LoggedIn then Exit;
EquipGuth;
repeat
Wait(100);
AntiBan('random');
if Hitpoints <= RunAt then
begin
Writeln('WARNING MIN HEALTH - Running Away');
ClimbLadder;
Logout;
end;
Until (HitPoints >= HPToHeal);
EquipNorm;
end;
procedure CheckHP;
begin
if not LoggedIn then Exit;
if HitPoints <= RunAt then
begin
Writeln('WARNING MIN HEALTH - Running Away');
ClimbLadder;
Logout;
TerminateScript;
end;
if HitPoints <= HealAt then
begin
Writeln('WARNING LOW HEALTH - Healing with guthans');
Heal;
end;
end;
procedure PaintSmart;
var
Line1, Line2, Line3: String;
Image: Integer;
begin
Image := BitmapFromString(509, 128, 'meJztwkERAAAMAqDqRjOKUVZj' +
'DzjSRVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' +
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV1X8Pvm/vpQ==');
Line1 := ('You have been Training for ' + TimeRunning + '');
Line2 := ('You have managed to gain ' + IntToStr(GetXpBarTotal - StartExp) + ' exp');
Line3 := ('You are gaining ' + IntToStr(((GetXpBarTotal - StartExp) * 3600) / (GetTimeRunning / 1000)) + ' exp per hour');
SMART_DrawBitmap(True, Image, Point(7, 344));
SMART_DrawText(20, 360, LoginChars, Line1, clRed);
SMART_DrawText(20, 380, LoginChars, Line2, clRed);
SMART_DrawText(20, 400, LoginChars, Line3, clRed);
FreeBitmap(Image);
end;
procedure Proggy;
begin
ClearDebug;
Writeln('|--------------------------------------------------------------------------|');
Writeln(' You have been Training for a total of ' + TimeRunning + ' ');
Writeln(' You have managed to gain ' + IntToStr(GetXpBarTotal - StartExp) + ' exp ');
Writeln(' You are gaining ' + IntToStr(((GetXpBarTotal - StartExp) * 3600) / (GetTimeRunning / 1000)) + ' exp per hour! ');
Writeln(' Thankyou for using Caotoms Armoured Zombie Guthener :) ');
Writeln('|--------------------------------------------------------------------------|');
PaintSmart;
SRLRandomsReport;
end;
function LocateDtmMM(DTM: Integer): Boolean;
var
aFound: Extended;
x, y: Integer;
begin
if not LoggedIn then Exit;
AntiRandom;
if FindDTMRotated(DTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
Result := True
else
Result := False;
end;
function InCastle: Boolean;
begin
if FindColorSpiralTolerance(x, y, 8619657, MMX1, MMY1, MMX2, MMY2, 10) then
Result := True
else
Result := False;
end;
procedure Hartwin; //This Procedure is not 100% reliable. It needs future reworking
var
t: Integer;
begin
ClickNorth(1);
if LocateDtmMM(Castle) then
begin
Writeln('Finding and talking to Hartwin');
MarkTime(t);
if TPAFinder(0.06, 0.48, 6325130, 11, 1, ['artwin', 'art', 'Hart'], ['alk']) or TPAFinder(0.02, 3.14, 8039658, 8, 1, ['artwin', 'art', 'Hart'], ['alk']) or TPAFinder(0.02, 0.33, 6390663, 12, 1, ['artwin', 'art', 'Hart'], ['alk']) or TPAFinder(2.78, 0.22, 3224371, 3, 1, ['artwin', 'art', 'Hart'], ['alk']) then
begin
FFlag(6);
Wait(1500);
repeat
ClickToContinue;
AntiRandom;
if TimeFromMark(t) >= 20000 then
Exit;
until(ClickToContinue = False)
FindNPCChatText('es.', ClickLeft);
end;
end;
end;
procedure CheckTerminate;
begin
if Termination >= 50 then
begin
Writeln('Exceeded Overall Fail Limit');
ClimbLadder;
Logout;
end;
end;
procedure MainLoop;
var
Fail: Integer;
begin
if not LoggedIn then Exit;
Fail := 0;
APot := 0;
SPot := 0;
DPot := 0;
repeat
if not LoggedIn then LoginPlayer;
Termination := 0;
Hartwin;
if InCastle then
Hartwin;
MakeCompass('s');
SetAngle(0);
TurnOnPrayer;
if Outside then DownTrapDoor;
Wait(500+random(200));
if APot < AttPot then
begin
AttPotion;
Wait(RandomRange(1550,1600));
end;
if CPot < ComPot then
begin
ComPotion;
Wait(RandomRange(1550,1600));
end;
if SPot < StrPot then
begin
StrPotion;
Wait(RandomRange(1550,1600));
end;
if DPot < DefPot then
begin
DefPotion;
Wait(RandomRange(1550,1600));
end;
repeat
if not LoggedIn then Exit;
AntiRandom;
CheckHP;
RefillPrayer;
TurnOnPrayer;
PotUp;
CheckTerminate;
if UsingGuth then CheckGuth;
Proggy;
Antiban('random');;
Wait(RandomRange(200,400));
Until (not LoggedIn);
Fail := Fail + 1;
Until(Fail >= 10);
Exit;
end;
begin
Smart_Server := 56;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
ClearDebug;
MouseSpeed := (RandomRange(15,20));
DeclarePlayers;
SetDTM;
MarkTime(Total);
if not LoggedIn then LoginPlayer;
StartExp:= 0;
Termination := 0;
ToggleXPBar(True);
StartExp:= GetXPBarTotal;
MainLoop;
ClimbLadder;
Logout;
FrDTM;
end.