SRL Archive - Archive

Cage - SRL Member Application


Cage

2013-10-10 17:40:41

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
I have always had an interest in computers and in more recent times, computer programming. I have dabbled a little in Java and C++ but I would not consider myself anything more than a beginner.

I am most experienced in Pascal as I have been trying to learn how to script proficiently in it throughout the past few weeks - You may remember me from the scripting help forums. ^_^


Are you a member of any other communities?
None that are relevant.


Tell us about yourself…
From: Cage
I enjoy doing dancing, long distance running and programming. I am currently attending university doing an Economics degree. (In my final year) I am very much into self development at the moment. Such as trying to improve my level of fitness so I can enter the London marathon next year, as well as working on expanding my mind. (Part of the reason I got into programming). If you are interested in knowing anything else, feel free to ask away!



Please show us one (or multiple) of your scripts.
program CageEarthRuneCrafter;

{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$i SRL-OSR/SRL/misc/al_functions.simba} // Credits to Flight
{$I SRL-OSR/SRL/misc/MiniReflection.simba} // Credits to Hoodz


{//////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////

Welcome to Cages Earth Rune Crafter!

Step 1: Make sure both al_functions and MiniReflection are in your misc folder
Step 2: Enter your details below.
Step 3: Start your character
at Varrock East bank with your earth tiara equipped.
Step 4: Enjoy!

P.S. If you run into any problems let me know and I will try to fix
them as soon as possible.

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////}


var
EssDTM, EssMade: Integer;


const
VERSION = '1.01';
NICKNAME = ''; {Please Fill in your player details here}
USERNAME = '';
PASSWORD = '';
BANKPIN = '';


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := USERNAME;
Pass := PASSWORD;
nick := NICKNAME;
Active := True;
pin := BANKPIN;
end;
end;


procedure LoadDTM;
begin
EssDTM := DTMFromString('mggAAAHicY2NgYOBjZmDgAmJRIGZGYmcyMjCUAXEREGcDcTIQZwDxxPZ2hpiwMIbJHR0MxdlZDKvnz2dYt2gRAyfQLGyYEQeGAACUYAye');
end;

procedure FreeTheDTM;
begin
FreeDtm(EssDTM);
end;

procedure ProgressReport;
begin
WriteLn('Congratulations! you have crafted ' + IntToStr(EssMade) + ' ess in this run!');
WriteLn('The script has been running for: ' + TimeRunning);
WriteLn('Thanks for using Cages Earth Crafter!');
end;

procedure PlayerProtection;
begin
case Random(65) of
10: PickUpMouse;
20: RandomMovement;
30: RandomTab(True);
40: ExamineInv;
50: HoverSkill(skill_Runecrafting, False);
60: SmallRandomMouse;
end;

FindNormalRandoms;

end;

procedure Bank;
var
TPAA: T2DPointArray;
CTS, L, I, X, Y, Tries, BankFound: Integer;
TPA: TPointArray;
begin
repeat
PlayerProtection;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.11, 2.93);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2051676, MSX1, MSY1, MSX2, MSY2, 4);
TPAA := TPAToATPAEx(TPA, 200, 100);
L := High(TPAA);
ColorToleranceSpeed(CTS);
for I := 0 to L do
begin
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
if WaitUptext('th', 300) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Wait(2500 + Random(500));
BankFound := 1;
Break;
end;
end;

if not (BankScreen) then
begin
if not WaitUptext('th', 300) then
begin
MakeCompass(randomrange(-20, 20));
blindwalk(Point(3254 + random(1), 3420 + random(1)));
PlayerProtection;
inc(Tries)
WriteLn('Attempt number: ' + IntToStr(Tries));
end;
end;

if (Tries > 5) then
begin
WriteLn('Failed finding the bank too many times. Exiting Script.');
Logout;
TerminateScript;
end;

until(BankFound = 1);


if (PinScreen) then
InPin(BANKPIN);


if (BankScreen) then
if finddtm(EssDTM, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
QuickDeposit('inv');
WriteLn('Commencing Banking');
MMouse(X, Y, 3, 3);
wait(randomrange(10, 30));
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, mouse_right);
wait(randomrange(10, 30));
ChooseOption('Withdraw-All')
wait(randomrange(10, 30));
CloseBank;
WriteLn('Banking Complete');
PlayerProtection;
Exit;
end else
begin
WriteLn('Could not find the Essence DTM. Consider making another one.');
Logout;
TerminateScript;
end;
end;

function EnterRCAltar: Boolean;
var
TPAA: T2DPointArray;
CTS, L, I, X, Y, Tries: Integer;
TPA: TPointArray;
label
Start;
begin
Start:
PlayerProtection;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.4, 0.4);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5725540, MSX1, MSY1, MSX2, MSY2, 20);
TPAA := TPAToATPAEx(TPA, 100, 150);
SortATPAFromSize(TPAA, 8000, True);
L := High(TPAA);
ColorToleranceSpeed(CTS);
for I := 0 to L do
begin
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
if IsUpText('ste') then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Wait(100 + Random(25));
Flag;
Wait(1500 + Random(500));
blindwalk(Point(2658 + random(1), 4839 + random(1)));
Result := True;
Exit;
end;
end;

if not IsUpText('ste') then
begin
MakeCompass(randomrange(0, 360));
Inc(Tries);
WriteLn('You have failed to find the uptext ' + IntToStr(Tries) + ' Times.'); //FailSafes
end;

if (Tries > 5) then
begin
WriteLn('Failed too many times finding runecrafting alter. Terminating');
Logout;
TerminateScript;
end;

goto Start;
SetColorSpeed2Modifiers(0.2, 0.2);

end;

function LocatePortal: Boolean;
var
TPAA: T2DPointArray;
CTS, L, I, X, Y, Tries: Integer;
TPA: TPointArray;
label
Start;
begin
Start:
PlayerProtection;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 0.63);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 7447982, MSX1, MSY1, MSX2, MSY2, 13);
TPAA := TPAToATPAEx(TPA, 10, 10);
SortATPAFromSize(TPAA, 8000, True);
L := High(TPAA);
ColorToleranceSpeed(CTS);
for I := 0 to L do
begin
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
if WaitUpTextMulti(['ort'], 300) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Wait(2200 + Random(500));
Flag;
Result := True;
Exit;
end;
end;

if not IsUpText('ort') then
begin
MakeCompass(randomrange(0, 360));
Inc(Tries);
WriteLn('You have failed to find the uptext ' + IntToStr(Tries) + ' Times.'); //FailSafes
end;

if (Tries > 5) then
begin
WriteLn('Failed too many times finding runecrafting alter. Terminating');
Logout;
TerminateScript;
end;

goto Start;
SetColorSpeed2Modifiers(0.2, 0.2);

end;

function UseRCAltar: Boolean;
var
TPAA: T2DPointArray;
CTS, L, I, X, Y, Tries: Integer;
TPA: TPointArray;
label
Start;
begin
Start:
PlayerProtection;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.56, 0.54);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2895924, MSX1, MSY1, MSX2, MSY2, 10);
TPAA := TPAToATPAEx(TPA, 70, 70);
SortATPAFromSize(TPAA, 8000, True);
L := High(TPAA);
ColorToleranceSpeed(CTS);
for I := 0 to L do
begin
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
if WaitUpTextMulti(['lta'], 300) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
EssMade := EssMade + 28;
Wait(100 + Random(25));
Flag;
Wait(4000 + Random(650));
blindwalk(Point(2655 + random(1), 4830 + random(1)));
Wait(1700 + Random(650));
Result := True;
Exit;
end;
end;

if not IsUpText('lta') then
begin
MakeCompass(randomrange(0, 360));
Inc(Tries);
WriteLn('You have failed to find the uptext ' + IntToStr(Tries) + ' Times.');
end; //FailSafes

if (Tries > 5) then
begin
WriteLn('Failed too many times finding runecrafting alter. Terminating');
Logout;
TerminateScript;
end;

goto Start;
SetColorSpeed2Modifiers(0.2, 0.2);

end;

procedure ToBank;
begin
blindwalk(Point(3254 + random(1), 3420 + random(1)));
PlayerProtection;
end;


procedure ToAlter;
begin
blindwalk(Point(3305 + random(1), 3472 + random(1)));
PlayerProtection;
end;


procedure Walking(Route: string);
begin
case Lowercase(Route) of
'bank': ToBank;

'alter': ToAlter;
else
WriteLn('Please select a valid route (bank or alter)');
end;
end;

begin
DeclarePlayers;
SetupSRL();
SetupReflection;
LoadDTM;
AddOnTerminate('FreeTheDTM');
AddOnTerminate('ProgressReport');

if not LoggedIn then
begin
WriteLn('Player was not logged in. Logging in...');
LogInPlayer;
SetAngle(0);
end;

repeat

SetRun(True);
Bank;
Walking('alter');
EnterRCAltar;
UseRCAltar;
LocatePortal;
Walking('bank');

until (False);
end.

[XoL]

2013-10-10 18:05:00

Hmm interesting, script looks pretty simple but your attitude is in the right place! Will keep tabs on this, and get back to you after I read a few posts, look at other opinions.

Sjoe

2013-10-11 17:07:13

Script is pretty good considering it's your first one.

However SRL is also a community rank (helpfulness around the forums etc..)

and you're only one month around here. Gonna vote no for now.
But will definitily vote yes on your next app. :)

masterBB

2013-10-17 13:13:51

Be active on the forums for a bit of time and you will get there. Will have to vote no for now since I don't really know you.

Kevin

2013-10-17 14:43:59

I am legitimately impressed. This is definitely one of the best scripts I've seen from such a new person. Congratulations, Cage, on that! There was one sore thing that definitely stuck out you can update, though:

GetMousePos(X, Y);
Mouse(X, Y, 0, 0, mouse_right);
Can be written simply and much more efficiently as:

ClickMouse2(mouse_right);

However, on that note, Member's is a large portion Community based ranking. So while scripting knowledge is required (and this would pass), it's not the only thing required. I'm sorry, but you simply haven't shown yourself as much of a community member yet and I haven't had a chance to get to know you at all. You may find it beneficial to post more often, help some noobs out, or just even the occasional random NOTA thread (even if it doesn't add to post count, it helps people get to know you as well).

Cage

2013-10-18 09:54:53

Thanks for everyone's constructive criticism. I completely understand. :)