ForgotMyName
2010-10-04 14:33:33
How Long have You Played Runescape?
3 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I am a third year undergraduate in computer science. I have past experience with personal projects in C, Python, Java, and php/HTML/JS. I have decent knowledge of algorithms, data structures, and program design. (SCAR is my first exposure to Delphi though.)
Are you a member of any other communities?
None related to RS cheating.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
For those who prefer an in-line script example
(this is the same granite power miner linked above)
3 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I am a third year undergraduate in computer science. I have past experience with personal projects in C, Python, Java, and php/HTML/JS. I have decent knowledge of algorithms, data structures, and program design. (SCAR is my first exposure to Delphi though.)
Are you a member of any other communities?
None related to RS cheating.
Tell us about yourself…
From: ForgotMyName
My personal life is very boring. I don't find much time outside of college schoolwork. What spare time I do end up with usually goes into computer games or programming. I play the board game Go occasionally, but like many of my other past hobbies, it's kind of been abandoned due to time issues.
I was a SRL member way back when. (I remember Kaitnieks.com forums, however long ago that was.) I didn't do much though. I quit when I quit RS (this happened a few times), and I eventually forgot my account details. I didn't do anything ground-breaking back then.
Please show us one (or multiple) of your scripts.
http://villavu.com/forum/showthread.php?t=59333
This is my latest script. A first draft of a kharidian desert granite power miner. Needs some more work done, but I'll get around to that eventually once my class work load settles down. I'm pretty proud of myself for figuring out some of the stuff here.
[url]http://villavu.com/forum/showthread.php?t=55734[/url]
An alcher I made a while back. Not too happy with it. But not too shabby either. Abandoned now.
[url]http://villavu.com/forum/showthread.php?t=55314[/url]
Lunar plank making. Roughly the same time as the alcher. Same idea as the alcher. Neither was too polished. Also abandoned.For those who prefer an in-line script example
(this is the same granite power miner linked above)
{*******************************************************************************
Granite Miner
by ForgotMyName
public release
revision 1
This script will power mine granite in the kharidian desert quarry.
Setup:
Adjust constants as necessary.
Fill in account info under DeclarePlayers.
Start logged out in the northern part of the desert quarry.
Wear desert clothing.
Either wear an enchanted tiara, or carry 2+ waterskins and humidify runes.
Keep everything you do not want dropped (picks, runes, skins, etc)
within the first 4 rows of your inventory.
Revision history:
1: Initial release.
*******************************************************************************}
program GraniteMiner;
{$i SRL\SRL.scar}
const
NumbOfPlayers = 1; //single player script
StartPlayer = 0; //do not change these lines
RockColor = 6458286; //granite color (careful, no fence/dropped ore colors)
RockTol = 2;
RockRadius = 5;
MouseTol = 2;
BitmapTol = 3;
MineWait = 7000;
UseHumidify = True; //true if humidifying, false if wearing tiara
RunLimit = 120; //time in mins to run
var
HumidifyBitmap: Integer;
ScriptStartMark: Integer;
LastHumidifyMark: Integer;
{*******************************************************************************
procedure DeclarePlayers;
By: SRL
Description: SRL's Player Setup
*******************************************************************************}
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := '---------------'; //Player username.
Pass := '-------------'; //Player password.
Nick := '---'; //Player nickname - 3-4 letters of Player username.
Active := True;
end;
end;
{*******************************************************************************
procedure SetUpScript
By: ForgotMyName
Description: Initialize SRL, script data, etc
*******************************************************************************}
procedure SetUpScript;
begin
HumidifyBitmap := BitmapFromString(15, 8, 'meJxNj7sNgEAMQ0NxC9DSsBVr0DM' +
'EkyBdzQD0t9AJS0+yLLlInJff6O291+fcpOvY51fS6E0xpqqY+MCQ' +
'ipH5NGkB9goGuj1Nt3h1LiLVIsktiuGRD/DAfI35xDmZEqYfATZp3' +
'ilV7klyqUreH/0DU50c');
MarkTime(ScriptStartMark);
MarkTime(LastHumidifyMark);
ActivateClient;
MakeCompass('n');
SetAngle(True);
end;
{*******************************************************************************
procedure TakeDownScript
By: ForgotMyName
Description: Frees resources, cleans up
*******************************************************************************}
procedure TakeDownScript;
begin
FreeBitmap(HumidifyBitmap);
end;
{*******************************************************************************
procedure BailOut
By: ForgotMyName
Description: If we get here, something horrible broke. Log out, terminate.
*******************************************************************************}
procedure BailOut;
begin
Logout;
Logout;
TerminateScript;
end;
{*******************************************************************************
function FindRock: Boolean
By: ForgotMyName
Description: Find a granite rock and mouse over it
Returns: True if rock found and mouse at rock, false if failed
*******************************************************************************}
function FindRock: Boolean;
var RockPoints: TPointArray;
RockSplits: T2DPointArray;
I, H, X1, Y1: Integer;
begin
SetColorToleranceSpeed(1);
if not (FindColorsSpiralTolerance(MSCX, MSCY, RockPoints, RockColor, MSX1, MSY1, MSX2, MSY2, 3)) then
begin
WriteLn('Could not find rock color on mainscreen!');
Result := False;
Exit;
end;
RockSplits := TPAtoATPA(RockPoints, RockRadius);
H := High(RockSplits);
for I := 0 to H do
begin
MiddleTPAEx(RockSplits[I], X1, Y1);
MMouse(X1, Y1, MouseTol, MouseTol);
Wait(50 + Random(100));
if IsUpText('ine') then
begin
Result := True;
Exit;
end;
end;
Result := False;
end;
{*******************************************************************************
function MineRock: Boolean
By: ForgotMyName
Description: Mine a rock, click and wait
Precondition: Mouse is over the rock we want
Returns: True if we believe we succeeded, false otherwise
*******************************************************************************}
function MineRock: Boolean;
var X1, Y1, ClickedTime: Integer;
begin
GetMousePos(X1, Y1);
MMouse(X1, Y1, 0, 0);
Wait(50 + Random(100));
if not IsUpText('ine') then
begin
Result := False;
Exit;
end;
Mouse(X1, Y1, 0, 0, True);
Flag;
Wait(500 + Random(100));
MarkTime(ClickedTime);
repeat
Wait(500 + Random(100));
if (TimeFromMark(ClickedTime) > MineWait) then
begin
Result := False;
Exit;
end;
until InChat('quarry');
Result := True;
Wait(200 + Random(500));
end;
{*******************************************************************************
procedure ClearSpace;
By: ForgotMyName
Description: Clear inventory space, drop everything in last 3 rows
*******************************************************************************}
procedure ClearSpace;
var I: Integer;
begin
for I := 17 to 28 do
begin
DropItem(I);
Wait(100 + Random(100));
end;
Wait(500 + Random(100));
end;
{*******************************************************************************
procedure LunarHumidify;
By: ForgotMyName
Description: Cast humidify
*******************************************************************************}
procedure LunarHumidify;
var X1, Y1: Integer;
begin
GameTab(tab_Magic);
Wait(50 + Random(100));
if not FindBitmapToleranceIn(HumidifyBitmap, X1, Y1, MIX1, MIY1, MIX2, MIY2, BitmapTol) then
begin
Writeln('Could not find Lunar humidify!');
end;
MMouse(X1, Y1, MouseTol, MouseTol);
if not IsUpText('umid') then
begin
Writeln('Humidify uptext missing!');
end;
Mouse(X1, Y1, MouseTol, MouseTol, True);
Wait(6000 + Random(500));
end;
{*******************************************************************************
procedure RecenterMine;
By: ForgotMyName
Description: Walk to mine center, failsafe, then move to north rocks
*******************************************************************************}
procedure RecenterMine;
var X1, Y1: Integer;
begin
MakeCompass('n');
SetAngle(True);
if not FindSymbol(X1, Y1, 'mine') then
begin
Writeln('Could not find mining symbol!');
BailOut;
end;
Mouse(X1, Y1, MouseTol, MouseTol, True);
Flag;
Wait(1000 + Random(500));
//the northern rocks are better
//more availability, less stickage
//todo: better than blind click?
Mouse(630, 60, MouseTol, MouseTol, True);
Flag;
Wait(1000 + Random(500));
end;
{*******************************************************************************
procedure MainLoop;
By: ForgotMyName
Description: Main script loop
*******************************************************************************}
procedure MainLoop;
var Health: String;
MinedNow, ToMine, FindFails: Integer;
Done: Boolean;
begin
repeat
FindNormalRandoms;
GetMMLevels('health', Health);
if (Health = 'Red') or (Health = 'Orange') then
begin
Writeln('Dying!');
BailOut;
end;
if InvCount > 20 then
begin
ClearSpace;
end;
if (UseHumidify and (TimeFromMark(LastHumidifyMark) > (10 * 60000))) then
begin
LunarHumidify;
MarkTime(LastHumidifyMark);
end;
MinedNow := 0;
FindFails := 0;
ToMine := 5 + Random(3);
repeat
FindNormalRandoms;
if FindRock then
begin
MineRock;
end
else begin
FindFails := FindFails + 1;
end;
if FindFails > 3 then
begin
RecenterMine;
end;
MinedNow := MinedNow + 1;
until MinedNow >= ToMine;
until TimeFromMark(ScriptStartMark) > (RunLimit * 60000);
Writeln('Done!');
BailOut;
end;
{... and finally ...}
begin
SetUpSRL;
DeclarePlayers;
LoginPlayer;
SetUpScript;
Wait(2000 + Random(500));
MainLoop;
LogOut;
TakeDownScript;
end.