XRaye
2009-08-08 10:25:05
How Long have You Played Runescape?
5 Year(s)
Are you affilated in anyway with Jagex LTD?
Nope
Were you Referred to SRL?
Nope
What is your general programming knowledge?
Just SCAR, I was going to learn some others a year ago or so but got too busy. Going to start learning more this school year.
Are you a member of any other communities?
Nah like I'm registered with Scythe and stuff but SRL is so much better :)
Tell us about yourself…
Please show us one (or multiple) of your scripts.
Well I'm not sure how strict you guys are with "RuneScape only scripts"…
It would seem like I haven't been here forever but I've been checking by quite often, because I've been scripting and selling scripts for a major private server (I have at least one script for every skill :p).
Unfortunately within the past month it kinda got messed up and they took it down so they could update it, but it's suppose to be back up soon. If you want you can find it on RuneLocus, called ParadiseScape. It went from 1st down to about last (It's still down for updates).
There are many notes I have down to change / make better with my best script but the server needs to be up for me to test them.
And just in case you need to know that I can script on RuneScape, I'm attaching some old scripts I made a few months ago and never finished. But if I were to rewrite those today they would be WAY different and more advanced.
Oh and some notes:
PGR is a thieving script for the private server.
I never spent much time with the PGR include.
The PGR scripts were meant for my eyes only, when I sold it (Discontinued selling it to start a gp selling business) I would obfuscate (I think) it, or in other words: hide the code.
Sorry everything is sloppy spoken and mixed together, I'm really tired :p
I'm leaving the form background for download
Border for PGR form: http://uppit.com/v/GB38V0R1
PGR:
PGR Include:
Power Miner
Demon Ranger:
5 Year(s)
Are you affilated in anyway with Jagex LTD?
Nope
Were you Referred to SRL?
Nope
What is your general programming knowledge?
Just SCAR, I was going to learn some others a year ago or so but got too busy. Going to start learning more this school year.
Are you a member of any other communities?
Nah like I'm registered with Scythe and stuff but SRL is so much better :)
Tell us about yourself…
From: XRaye
I'm 13 years old and was born somewhere in England (Forgot where haha). The reason we were there though is because my dad is in the Air Force, but I don't remember anything because we left when I was 3 or somethin but they said they took me to Germany and all of those places :p. So I've also been to over half of the states in America (Not lived just drove through and visited).
And for fun I like electronics and outdoors (I know they shouldn't go together but I love em both).
Please show us one (or multiple) of your scripts.
Well I'm not sure how strict you guys are with "RuneScape only scripts"…
It would seem like I haven't been here forever but I've been checking by quite often, because I've been scripting and selling scripts for a major private server (I have at least one script for every skill :p).
Unfortunately within the past month it kinda got messed up and they took it down so they could update it, but it's suppose to be back up soon. If you want you can find it on RuneLocus, called ParadiseScape. It went from 1st down to about last (It's still down for updates).
There are many notes I have down to change / make better with my best script but the server needs to be up for me to test them.
And just in case you need to know that I can script on RuneScape, I'm attaching some old scripts I made a few months ago and never finished. But if I were to rewrite those today they would be WAY different and more advanced.
Oh and some notes:
PGR is a thieving script for the private server.
I never spent much time with the PGR include.
The PGR scripts were meant for my eyes only, when I sold it (Discontinued selling it to start a gp selling business) I would obfuscate (I think) it, or in other words: hide the code.
Sorry everything is sloppy spoken and mixed together, I'm really tired :p
I'm leaving the form background for download
Border for PGR form: http://uppit.com/v/GB38V0R1
PGR:
{
Change before release:
PGR, Work, User
}
{------------------------------------------------------------------------------}
{----------Do not touch anything in less you know what you are doing-----------}
{------------------------------------------------------------------------------}
program Project_Get_Rich;
{.Include SRL\SRL.Scar}
{.Include PGR.Scar}
var
Run, Text, Angle, IncludedUsername : string;
FoundTPA, FoundBackup1, FoundBackupTPA, ScriptJustStarted : Boolean;
X, Y, Money, Waited, FailedAll, TookBreak, MoneyStolen,
SolvedRandom, SearchedBackup, StoleFromStall : Integer;
const
// Advanced settings
PGR = '1'; // Which PGR to download from the website
User = '1'; // Which user from the website
Work = '1'; // Which run the script from the website
AutoUpdateStuff = False; // Auto update the script and include?
procedure StartScript;
begin
Disguise('Project Get Rich - ILikePurple - Paradise Client');
PlaySound('C:\WINDOWS\Media\ding.wav');
Wait(120);
PlaySound('C:\WINDOWS\Media\ding.wav');
Wait(120);
PlaySound('C:\WINDOWS\Media\ding.wav');
end;
procedure Report;
begin
ClearDebug;
Writeln('|==============Project Get Rich==============|');
Writeln('| Stole from stall about ' + IntToStr(StoleFromStall) + ' times.');
Writeln('| Stole about ' + IntToStr(MoneyStolen) + 'gp from the stall.');
Writeln('| Solved random event ' + IntToStr(SolvedRandom) + ' times.');
Writeln('| Mod said name ' + IntToStr(TookBreak) + ' times.');
Writeln('| Ran for ' + TimeRunning + '.');
Writeln('|============================================|');
Writeln('');
end;
procedure CheckForUpdate;
var
CurrentUpdate, NewestUpdate, ThingsUpdated : string;
FileNum : Integer;
begin
Status('Checking if script is up to date...');
CurrentUpdate := '7 / 15 / 09';
NewestUpdate := '';
NewestUpdate := GetPage('http://projectgetrich.webs.com/Updates/PGRUpdate.txt');
if NewestUpdate = '' then
begin
Writeln('Error in version checking...');
Writeln('Make sure you allow SCAR to connect to the internet...');
TerminateScript;
end;
begin
if CurrentUpdate <> NewestUpdate then
begin
Status('Updating script...');
ClearDebug;
Writeln('Updating script...');
FileNum := RewriteFile(ScriptPath + 'PGR.scar', False);
if (FileNum < 0) then
begin
ClearDebug;
WriteLn('File error...');
WriteLn('Make sure you allow SCAR to access the files...');
CloseFile(FileNum);
TerminateScript;
end;
WriteFileString(FileNum, GetPage('http://projectgetrich.webs.com/Script/PGR' + PGR + '.txt'));
CloseFile(FileNum);
Writeln('Script updated...');
Writeln('Note: If you did not allow SCAR to connect to my website, the new script will be blank...');
begin
ThingsUpdated := GetPage('http://projectgetrich.webs.com/Updates/ThingsUpdated.txt');
Writeln('Things updated: ' + ThingsUpdated + '...');
end;
TerminateScript;
end;
end;
end;
// Form-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
var
Buttons {ButtonClicked, InitForm}:
array [0..1] of TButton;
FrmDesign {ButtonClicked, InitForm}:
TForm;
Edits {InitForm, Main loop}:
array [0..7] of TEdit;
procedure ButtonClicked(Sender : TObject);
begin
case Sender of
Buttons[0] : begin
FrmDesign.ModalResult := MrOk;
end;
Buttons[1] : begin
FrmDesign.ModalResult := MrOk;
TerminateScript;
end;
end;
end;
procedure InitForm;
var
Image : TImage;
B, W, H : Integer;
ButtonNumb : Integer;
LabelName : array of string;
LabelNumb : Integer;
Labels : array [0..7] of TLabel;
EditNumb : Integer;
begin
begin
FrmDesign := CreateForm;
FrmDesign.Left := 100;
FrmDesign.Top := 100;
FrmDesign.Width := 346;
FrmDesign.Height := 354;
FrmDesign.Color := ClBlack;
FrmDesign.Font.Color := ClBlack;
FrmDesign.Font.Name := 'Ariel';
FrmDesign.BorderStyle := BsNone;
end;
begin
Image := TImage.Create(FrmDesign);
Image.Parent := FrmDesign;
Image.Left := 1;
Image.Top := 1;
Image.Width := 344;
Image.Height := 352;
B := LoadBitmap(ScriptPath + 'Border.bmp');
GetBitmapSize(B, W, H);
CopyCanvas(GetBitmapCanvas(B), Image.Canvas, 0, 0, W, H, 0, 0, W, H);
end;
begin
for ButtonNumb := 0 to 1 do
begin
Buttons[ButtonNumb] := TButton.Create(FrmDesign);
Buttons[ButtonNumb].Parent := FrmDesign;
Buttons[ButtonNumb].Left := 75 + (ButtonNumb * 100);
Buttons[ButtonNumb].Top := 290;
Buttons[ButtonNumb].Height := 25;
Buttons[ButtonNumb].Width := 75;
Buttons[ButtonNumb].OnClick := @ButtonClicked;
end;
Buttons[0].Caption := 'Start Script';
Buttons[1].Caption := 'Close Form';
end;
begin
LabelName := ['Username', 'Password', 'Nickname', 'Which Stall',
'Keep Chats Off', 'Break If Name', 'Minutes To Break', 'Stealing Too Fast'];
for LabelNumb := 0 To 7 do
begin
Labels[LabelNumb] := TLabel.Create(FrmDesign);
Labels[LabelNumb].Parent := FrmDesign;
Labels[LabelNumb].Left := 40;
Labels[LabelNumb].Top := 40 + (30 * LabelNumb);
Labels[LabelNumb].Caption := LabelName[LabelNumb];
Labels[LabelNumb].Font.Size := 10;
Labels[LabelNumb].Font.Color:= ClWhite;
end;
begin
for EditNumb := 0 to 7 do
begin
Edits[EditNumb] := TEdit.Create(FrmDesign);
Edits[EditNumb].Parent := FrmDesign;
Edits[EditNumb].Width := 100;
Edits[EditNumb].Height := 30;
case EditNumb of
0..7 : begin
Edits[EditNumb].Left := 200;
Edits[EditNumb].Top := 40 + 29 * EditNumb;
end;
end;
end;
begin
Edits[1].PasswordChar := '*';
Edits[3].MaxLength := 6;
Edits[4].MaxLength := 3;
Edits[5].MaxLength := 3;
Edits[6].MaxLength := 3;
Edits[7].MaxLength := 3;
Edits[0].Text := ReadINI('Form', 'Username', AppPath + 'PGRForm.ini');
Edits[2].Text := ReadINI('Form', 'Nickname', AppPath + 'PGRForm.ini');
Edits[3].Text := ReadINI('Form', 'Which Stall', AppPath + 'PGRForm.ini');
Edits[4].Text := ReadINI('Form', 'Keep Chats Off', AppPath + 'PGRForm.ini');
Edits[5].Text := ReadINI('Form', 'Break If Name', AppPath + 'PGRForm.ini');
Edits[6].Text := ReadINI('Form', 'Minutes To Break', AppPath + 'PGRForm.ini');
Edits[7].Text := ReadINI('Form', 'Stealing Too Fast', AppPath + 'PGRForm.ini');
end;
end;
end;
end;
procedure SafeInitForm;
var
V : TVariantArray;
begin
SetArraylength(V, 0);
ThreadSafeCall('InitForm', V);
end;
procedure ShowFormModal;
begin
FrmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
V : TVariantArray;
begin
SetArraylength(V, 0);
ThreadSafeCall('ShowFormModal', V);
end;
procedure SaveForm;
begin
WriteINI('Form', 'Username', Edits[0].Text, AppPath + 'PGRForm.ini');
WriteINI('Form', 'Nickname', Edits[2].Text, AppPath + 'PGRForm.ini');
WriteINI('Form', 'Which Stall', Edits[3].Text, AppPath + 'PGRForm.ini');
WriteINI('Form', 'Keep Chats Off',Edits[4].Text, AppPath + 'PGRForm.ini');
WriteINI('Form', 'Break If Name', Edits[5].Text, AppPath + 'PGRForm.ini');
WriteINI('Form', 'Minutes To Break', Edits[6].Text, AppPath + 'PGRForm.ini');
WriteINI('Form', 'Stealing Too Fast', Edits[7].Text, AppPath + 'PGRForm.ini');
end;
procedure CheckAnswers;
begin
if (Edits[0].Text = '') then
begin
Writeln('Please fill out your username...');
TerminateScript;
end;
if (Edits[1].Text = '') then
begin
Writeln('Please fill out your password...');
TerminateScript;
end;
begin
if not (LowerCase(Edits[3].Text) = 'silk') and
not (LowerCase(Edits[3].Text) = 'silver') and
not (LowerCase(Edits[3].Text) = 'gem') then
begin
Writeln('Please fill out which stall correctly...');
TerminateScript;
end;
end;
begin
if not (LowerCase(Edits[4].Text) = 'yes') and
not (LowerCase(Edits[4].Text) = 'no') then
begin
Writeln('Please fill out if you want the chats to be off correctly...');
TerminateScript;
end;
end;
begin
if not (LowerCase(Edits[5].Text) = 'yes') and
not (LowerCase(Edits[5].Text) = 'no') then
begin
Writeln('Please fill out if you want to break if a mod says your name correctly...');
TerminateScript;
end;
end;
begin
if (LowerCase(Edits[5].Text) = 'yes') then
if (LowerCase(Edits[6].Text) = '') then
begin
Writeln('Please fill out how many minutes to break correctly...');
TerminateScript;
end;
end;
begin
if not (LowerCase(Edits[7].Text) = 'yes') and
not (LowerCase(Edits[7].Text) = 'no') then
begin
Writeln('Please fill out if the script is stealing too fast or not correctly...');
TerminateScript;
end;
end;
end;
// Form-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
procedure LoginFirstModded(Username, Password : String);
var
X, Y, LoginButton, LoginPage : Integer;
begin
if not LoggedInPara then
begin
LoginButton := DTMFromString('78DA63D465646070046224F0FFFF7F300D136' +
'59423428D2990654F408D2D90E54A408D1E90E549408D2A90E582' +
'5F0D00A5E714AA');
LoginPage := DTMFromString('78DA63DCC2C0C060C18002945555C1342394C' +
'FF8084858A2AA9194914155A30064191350130C64D91250130D64' +
'551150D30264E5A3AA894DC847557318C82A46551316918AAAE60' +
'7905581AAC6D6CE1D558D091303433D7E350000AE0D9A');
begin
Mouse(363, 257, 0, 0, True);
if FindColor(X, Y, 16777215, 366, 252, 372, 261) or
FindColor(X, Y, 16777215, 366, 266, 373, 273)then
begin
Writeln('Please let the script fill out your username and password for you...');
Writeln('So it can make sure you are logging onto a registered account...');
TerminateScript;
end;
begin
Status('Typing login info...');
SendKeys(Username + #13);
SendKeys(Password);
end;
Status('Logging in...');
repeat
if FindDTM(LoginButton, X, Y, 223, 295, 381, 346) then
begin
Mouse(X, Y, 0, 0, True);
Wait(2000);
if not FindDTM(LoginPage, X, Y, 127, 15, 608, 173) then
begin
repeat
Wait(100);
until(FindDTM(LoginPage, X, Y, 127, 15, 608, 173) or LoggedInPara);
Wait(3000);
end;
end;
until(LoggedInPara);
WhileLoadWait;
FreeDTM(LoginButton);
FreeDTM(LoginPage);
end;
end;
end;
procedure LoginAndDoChats;
begin
if not LoggedInPara then
begin
Login;
if LowerCase(Edits[4].Text) = 'yes' then
ChangeChats('off', 'friends', 'off', 'off', 'off');
end;
end;
function ModSaidName : Boolean;
var
Textt : string;
begin
Textt := GetChatBoxText(8, clChat);
if Textt = LowerCase(Edits[0].Text) then Result := True else Result := False;
end;
procedure BreakCauseName;
var
StartedBreak : Integer;
begin
MarkTime(StartedBreak);
Writeln('Found a mod saying your name...');
Writeln('Breaking...');
repeat
Status(IntToStr(StrToInt(Edits[6].Text) * 60000 - TimeFromMark(StartedBreak) / 1000) + 'seconds left in the break...');
Wait(10);
until(TimeFromMark(StartedBreak) > (StrToInt(Edits[6].Text) * 60000));
Inc(TookBreak);
end;
procedure CheckForRandom;
begin
if InRandom then
begin
MoneyStolen := MoneyStolen - Money;
Report;
FindAndSolveRandom;
Inc(SolvedRandom);
end;
end;
procedure LoadStall;
begin
case LowerCase(Edits[3].Text) of
'silk' : begin
X := 240;
Y := 96;
Angle := 'N';
Money := 25000;
Text := 'm Silk';
end;
'silver' : begin
X := 340;
Y := 152;
Angle := 'W';
Money := 50000;
Text := 'm Silv';
end;
'gem' : begin
X := 250;
Y := 236;
Angle := 'N';
Money := 100000;
Text := 'm G';
end;
end;
end;
procedure RemoteCommands;
begin
if FindText(X, Y, 'Cmd: report', SmallChars, MSX1, MSY1, MSX2, MSY2) then
begin
GameTabPara(8);
begin
Status('Sending how many times the script stolen from the stall...');
Mouse(575, 239, 0, 0, True);
Wait(100);
SendKeys('Stole from stall about ' + IntToStr(StoleFromStall) + ' times.' + #13);
Wait(100);
end;
begin
Status('Sending how much money the script has stolen from the stall...');
Mouse(575, 239, 0, 0, True);
Wait(100);
SendKeys('Stole about ' + IntToStr(MoneyStolen) + 'k from the stall.' + #13);
Wait(100);
end;
begin
Status('Sending how many times the script solved random event...');
Mouse(575, 239, 0, 0, True);
Wait(100);
SendKeys('Solved random event ' + IntToStr(SolvedRandom) + ' times.' + #13);
Wait(100);
end;
begin
Status('Sending how long the script has been running for...');
Mouse(575, 239, 0, 0, True);
Wait(100);
SendKeys('Ran for ' + TimeRunning + '.' + #13);
Wait(100);
end;
GameTabPara(4);
end;
if FindText(X, Y, #67#109#100#58#32#116#101#114#109#105#110#97#116#101, SmallChars, MSX1, MSY1, MSX2, MSY2) then
begin
Report;
Writeln('Commanded to terminate...');
LogOutPara;
TerminateScript;
end;
end;
procedure ClickAndSteal;
begin
Status('Stealing from stall...');
Mouse(X, Y, 0, 0, False);
Y := Y - 100;
if FindColorSpiral(X, Y, 16776960, MSX1, MSY1, MSX2, MSY2) then
begin
X := X + 10;
Y := Y + 3;
Mouse(X, Y, 0, 0, True);
end else ChooseOptionPara(Text);
Inc(StoleFromStall);
MoneyStolen := MoneyStolen + Money;
end;
procedure StealTPA;
begin
if ScriptJustStarted then ScriptJustStarted := False else GetMousePos(X, Y);
Status('Looking for stall...');
if FindObjTPA(X, Y, 1393752, 3, -1, 3, 3, 2, [Text]) then
begin
FailedAll := 0;
ClickAndSteal;
FoundTPA := True;
end else FoundTPA := False;
end;
procedure StealTPABackup;
begin
if not FoundTPA then
begin
Status('Looking for stall (Backup TPA)...');
GetMousePos(X, Y);
if FindObjTPA(X, Y, 1989236, 3, -1, 3, 3, 2, [Text]) then
begin
FailedAll := 0;
ClickAndSteal;
FoundBackupTPA := True;
end else FoundBackupTPA := False;
end;
end;
procedure StealBackupOne;
begin
if not FoundTPA and not FoundBackupTPA then
begin
SearchedBackup := 0;
repeat
Inc(SearchedBackup);
LoginAndDoChats;
Status('Looking for stall (Backup color 1)...');
X := MSCX;
Y := MSCY;
if FindColorSpiralTolerance(X, Y, 9874875, MSX1, MSY1, MSX2, MSY2, 3) then
MMouse(X, Y, 0, 0);
until(IsUpText(Text)) or (SearchedBackup > 50);
if SearchedBackup > 50 then FoundBackup1 := False else
begin
FailedAll := 0;
ClickAndSteal;
FoundBackup1 := True;
end;
end;
end;
procedure StealBackupTwo;
begin
if not FoundTPA and not FoundBackupTPA and not FoundBackup1 then
begin
SearchedBackup := 0;
repeat
Inc(SearchedBackup);
LoginAndDoChats;
Status('Looking for stall (Backup color 2)...');
X := MSCX;
Y := MSCY;
if FindColorSpiralTolerance(X, Y, 8821929, MSX1, MSY1, MSX2, MSY2, 3) then
MMouse(X, Y, 0, 0);
until(IsUpText(Text)) or (SearchedBackup > 50);
if SearchedBackup > 50 then
begin
Inc(FailedAll);
if FailedAll > 50 then
begin
Report;
Writeln('Script could not find the stall after going through all backup procedures 50+ times...');
LogoutPara;
TerminateScript;
end;
end else
begin
FailedAll := 0;
ClickAndSteal;
end;
end;
end;
procedure StealFromStall;
begin
StealTPA;
StealTPABackup;
StealBackupOne;
StealBackupTwo
end;
function PostReport(ScriptName, Website, Proggy : String): Boolean;
var
DBase : String;
Client : Integer;
begin
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
Wait(10);
AddPostVariable(Client, 'proggy', Proggy);
AddPostVariable(Client, 'scn', ScriptName);
Dbase := PostHTTPPageEx(Client, Website);
FreeHTTPClient(Client);
Result := True;
end;
begin
// Check if the subscription is activated-------------------------------------
Status('Checking if subscription is activated...');
Run := GetPage('http://projectgetrich.webs.com/Other%20Script/Work' + Work + '.txt');
if LowerCase(Run) <> 'yes' then
begin
ClearDebug;
Writeln('Your script subscription has been terminated...');
Writeln('Please contact the coder for more info...');
TerminateScript;
end;
// Check if the subscription is activated-------------------------------------
SetupSRL;
StartScript;
if AutoUpdateStuff then
begin
CheckForUpdate;
CheckForPGRUpdate;
end;
Report;
begin
Status('Waiting for form report...');
SafeInitForm;
SafeShowFormModal;
SaveForm;
CheckAnswers;
end;
// Right user-----------------------------------------------------------------
Status('Making sure you are logging onto a registered account...');
IncludedUsername := GetPage('http://projectgetrich.webs.com/Other%20Script/User' + User + '.txt');
if LowerCase(Edits[0].Text) <> IncludedUsername then
begin
ClearDebug;
Writeln('You are logging onto a unregistered account...');
Writeln('Script subscription will be terminated...');
Writeln('Please contact the coder if there was a mistake...');
PostReport('PGR', 'http://zamorak-a-o-d.netau.net/add.php', Edits[0].Text + ' ' + User +' Fail');
TerminateScript;
end;
// Right user-----------------------------------------------------------------
LoadStall;
ActivateClient;
begin
ScriptJustStarted := True;
if LoggedInPara then
begin
Writeln('Please start the script logged out...');
Writeln('So the script can make sure you are logging onto a registered account...');
TerminateScript;
end;
LoginFirstModded(Edits[0].Text, Edits[1].Text);
LoginAndDoChats;
SetBrightnessMax;
GameTabPara(4);
Status('Setting up compass angle...');
MakeCompass(Angle);
SetAnglePara(True);
if LowerCase(Edits[4].Text) = 'yes' then
ChangeChats('off', 'friends', 'off', 'off', 'off');
Report;
begin
repeat
LoginAndDoChats;
MakeCompass(Angle);
SetAnglePara(True);
WhileConnectWait;
CheckForRandom;
StealFromStall;
Report;
Status('Waiting...');
Waited := 0;
repeat
if LowerCase(Edits[5].Text) = 'yes' then if ModSaidName then BreakCauseName;
if LowerCase(Edits[7].Text) = 'yes' then Wait(700 / 50) else Wait(200 / 50);
Inc(Waited);
until(Waited = 50);
if LowerCase(Edits[4].Text) = 'yes' then
ChangeChats('off', 'friends', 'off', 'off', 'off');
RemoteCommands;
until(False);
end;
end;
end.PGR Include:
//{.Include SRL\SRL.Scar}
procedure CheckForPGRUpdate;
var
CurrentUpdate, NewestUpdate : string;
FileNum : Integer;
begin
Status('Checking if PGR include is up to date...');
CurrentUpdate := '7 / 15 / 09';
NewestUpdate := '';
NewestUpdate := GetPage('http://projectgetrich.webs.com/Updates/PGRIncludeUpdate.txt');
if NewestUpdate = '' then
begin
Writeln('Error in version checking...');
Writeln('Make sure you allow SCAR to connect to the internet...');
TerminateScript;
end;
begin
if CurrentUpdate <> NewestUpdate then
begin
Status('Updating include...');
ClearDebug;
Writeln('Updating include...');
FileNum := RewriteFile(AppPath + 'Includes\PGR.scar', False);
if (FileNum < 0) then
begin
ClearDebug;
WriteLn('File error...');
WriteLn('Make sure you allow SCAR to access the files...');
CloseFile(FileNum);
TerminateScript;
end;
WriteFileString(FileNum, GetPage('http://projectgetrich.webs.com/Other/PGRInclude.txt'));
CloseFile(FileNum);
Writeln('Updated Para.scar...');
Writeln('Note: If you did not allow SCAR to connect to my website, the new script will be blank...');
TerminateScript;
end;
end;
end;
//Returnes true if you are logged in
function LoggedInPara : Boolean;
var
X, Y : Integer;
begin
Result := FindColor(X, Y, 65331, 718, 108, 763, 124);
end;
//While the "Loading - Please Wait." sign is up when logging in, the script will wait
procedure WhileLoadWait;
var
X, Y, Loading : Integer;
begin
Loading := BitmapFromString(130, 23, 'beNrtmFESgCAIRLv/pe23' +
'KYQFTch2P5rGxiAeYNoaVUQHlSpSIAWKFEiB0inMgpIC96MZRQoVH' +
'COFn1BYGZlqFMAggBTE/V1v06eM9yzGfhKeE2/3oC1xA6t45bKIfC' +
'NCQTSqeKLcKE97pnWmplHXoBnn8MvHa8FEH/AEpAA2HxwumPYIhev' +
'VDMhLFAbzYQEFb2zN6TqFlFqoT8HbZ1xBW0BBrCzvojbYJfClOdZ8' +
'zLQ3ywGZ8jQtQil1ghGuBZ4jkcIGFKasC6QwywevG6RAkcKuFKhkn' +
'T3Gfdc=');
begin
while FindBitmap(Loading, X, Y) do
begin
Status('Waiting for loading please wait to go away...');
Wait(100);
end;
end;
end;
//While the connection lost sign is up, the script will wait
procedure WhileConnectWait;
var
X, Y, Connection : Integer;
begin
Connection := BitmapFromString(237, 36, 'beNrtnNGywiAMRP3/n' +
'9YHZxxH280mpRTo2SdFIQSOKQTufT4RWkMPhGYWGCMwRgiMEQJjhG' +
'6F8exuEmrA+ONgZ08bmis0dSvyl8f4Qu/AGIzXw/hIT8AYjIXj35+' +
'+XzuFm9X/C8Xpkml90wtt2rEOxmtg/M/Pz1CEhc7Cey8a+9b9ukRj' +
'MG5eWMNY9Dn82l54B2Mw1pEzxKYnxpenZcC4G8nnBV4wBuNL3NTh1' +
'H+Ih0/2vaYc6/76Qez77kA1h9EIjBEaHOO95xSDhlrtr7N1axib24' +
'phR+x4O2f4e+0hdU/TQ2E8xf4XjMF4Xoybd6w/xp3vWoyDsW6h26L' +
'CuVfwUxhWL1gMPwrdFybMbn9KzMzeZldT9zeyjX+332QG/Xyj87Pd' +
'bN9PQZS3eA0PC8I0qVMYelGwot+KPqQGpHB/I9W9vblue9zjz445d' +
'6mkt7moKITo49l+ET18jM1oPAjG2f11FuNarHh4dzb0YIaDkyKkIc' +
'YF07q6xrgWjc3Vl4+x8Ho6jP0DwdRAHQzCnTHOLhWyy/sxMXacmi4' +
'ap4BZCWP/56xP/FNbtvCxVd7iiXYcB8UL/7ZDap0Wds+Z0CYzmK1o' +
'jlIqUcZh9BTZ7MGT9iOMM4MDxmCMTgXvtn/QAcaLRWP+8SkYIzBGC' +
'IwR6okxQnPrBQny7ck=');
begin
while FindBitmap(Connection, X, Y) do
begin
Status('Waiting for connection lost to go away...');
Wait(100);
end;
end;
end;
//Will keep clicking the login button when it sees it until you are logged in, used for when server resets (Your username and password need to already be filled out)
procedure Login;
var
X, Y, LoginButton, LoginPage : Integer;
begin
if not LoggedInPara then
begin
Status('Logging in...');
LoginButton := DTMFromString('78DA63D465646070046224F0FFFF7F300D136' +
'59423428D2990654F408D2D90E54A408D1E90E549408D2A90E582' +
'5F0D00A5E714AA');
LoginPage := DTMFromString('78DA63DCC2C0C060C18002945555C1342394C' +
'FF8084858A2AA9194914155A30064191350130C64D91250130D64' +
'551150D30264E5A3AA894DC847557318C82A46551316918AAAE60' +
'7905581AAC6D6CE1D558D091303433D7E350000AE0D9A');
repeat
if FindDTM(LoginButton, X, Y, 223, 295, 381, 346) then
begin
Mouse(X, Y, 0, 0, True);
Wait(2000);
if not FindDTM(LoginPage, X, Y, 127, 15, 608, 173) then
begin
repeat
Wait(100);
until(FindDTM(LoginPage, X, Y, 127, 15, 608, 173) or LoggedInPara);
Wait(3000);
end;
end;
until(LoggedInPara);
WhileLoadWait;
FreeDTM(LoginButton);
FreeDTM(LoginPage);
end;
end;
//Logs you out
procedure LogoutPara;
var
X, Y, Door : Integer;
begin
if not LoggedInPara then Exit;
Door := DTMFromString('78DA63FCCAC4C020C08002AEAC8807D38C503' +
'EE327A01A0954352E0ACCA86ADE00D5F0A3AAD1E364C334870BBF' +
'3900885D06FD');
begin
Status('Logging out...');
if FindDTM(Door, X, Y, 742, 0, 764, 29) then Mouse(X, Y, 0, 0, True) else
begin
Writeln('Could not find the logout door...');
TerminateScript;
end;
Wait(100);
Mouse(646, 378, 0, 0, True);
end;
FreeDTM(Door);
end;
//If set to true it will make the camera at top view, false and it will be bottom (Virtual keys)
procedure SetAnglePara(Angle : Boolean);
begin
Login;
if Angle then
begin
Status('Making angle true...');
KeyDown(38);//Up arrow
Wait(2000);
KeyUp(38);
end else
begin
Status('Making angle false...');
KeyDown(40);//Down arrow
Wait(2000);
KeyUp(40);
end;
end;
//Will change specified chats to specified color, example: ChangeChats('hide', 'friends', 'off', 'on', 'on');
procedure ChangeChats(Pub, Pri, Tra, Due, Cla : string);
var
ViewColor1, ViewColor2, ViewColor3, ViewColor4, ViewColor5, AllSelected, X, Y : Integer;
begin
case LowerCase(Pub) of
'on' : ViewColor1 := 65280;
'friends' : ViewColor1 := 65535;
'off' : ViewColor1 := 255;
'hide' : ViewColor1 := 16776960;
end;
case LowerCase(Pri) of
'on' : ViewColor2 := 65280;
'friends' : ViewColor2 := 65535;
'off' : ViewColor2 := 255;
end;
case LowerCase(Tra) of
'on' : ViewColor3 := 65280;
'friends' : ViewColor3 := 65535;
'off' : ViewColor3 := 255;
end;
case LowerCase(Due) of
'on' : ViewColor4 := 65280;
'friends' : ViewColor4 := 65535;
'off' : ViewColor4 := 255;
end;
case LowerCase(Cla) of
'on' : ViewColor5 := 65280;
'friends' : ViewColor5 := 65535;
'off' : ViewColor5 := 255;
end;
begin
if not FindColor(X, Y, ViewColor1, 124, 480, 174, 501) then
begin
Status('Changing public chat to ' + Pub + '...');
repeat
Login;
Mouse(144, 491, 0, 0, True);
Wait(100);
until(FindColor(X, Y, ViewColor1, 124, 480, 174, 501));
end;
end;
begin
if not FindColor(X, Y, ViewColor2, 178, 480, 227, 498) then
begin
Status('Changing private chat to ' + Pri + '...');
repeat
Login;
Mouse(201, 490, 0, 0, True);
Wait(100);
until(FindColor(X, Y, ViewColor2, 178, 480, 227, 498));
end;
end;
begin
if not FindColor(X, Y, ViewColor3, 239, 480, 285, 502) then
begin
Status('Changing trade chat to ' + Tra + '...');
repeat
Login;
Mouse(258, 491, 0, 0, True);
Wait(100);
until(FindColor(X, Y, ViewColor3, 239, 480, 285, 502));
end;
end;
begin
if not FindColor(X, Y, ViewColor4, 294, 480, 337, 498) then
begin
Status('Changing duel chat to ' + Due + '...');
repeat
Login;
Mouse(315, 492, 0, 0, True);
Wait(100);
until(FindColor(X, Y, ViewColor4, 294, 480, 337, 498));
end;
end;
begin
if not FindColor(X, Y, ViewColor5, 352, 480, 398, 497) then
begin
Status('Changing clan chat to ' + Cla + '...');
repeat
Login;
Mouse(375, 491, 0, 0, True);
Wait(100);
until(FindColor(X, Y, ViewColor5, 352, 480, 398, 497));
end;
end;
AllSelected := DTMFromString('78DA639467606078C5C8800DC04419B980C45' +
'35435862A82A86AB881C40754354EA64AA86A8C31D564C678A2AA' +
'3102128F51D578DA68A2A80100B7FA07F6');
if not FindDTM(AllSelected, X, Y, 0, 477, 63, 501) then
begin
Status('Clicking all...');
Mouse(30, 490, 0, 0, True);
MMouse(30, 440, 0, 0);
end;
FreeDTM(AllSelected);
end;
//Will click on the different game tabs
procedure GameTabPara(TabNumber : Integer);//Change to DTM, if you can't find the DTM Writeln that it either doesn't exist, DTM is corrupt, or already selected
begin
Login;
if not InRange(TabNumber, 1, 12) then
begin
Writeln('GameTab' + IntToStr(TabNumber) + ' is not a valid GameTab');
TerminateScript;
end;
Status('Changing to gametab ' + IntToStr(TabNumber) + '...');
case TabNumber of
1 : Mouse(540, 182, 0, 0, True);
2 : Mouse(576, 184, 0, 0, True);
3 : Mouse(609, 184, 0, 0, True);
4 : Mouse(648, 186, 0, 0, True);
5 : Mouse(674, 183, 0, 0, True);
6 : Mouse(708, 182, 0, 0, True);
7 : Mouse(746, 183, 0, 0, True);
8 : Mouse(574, 484, 0, 0, True);
9 : Mouse(610, 487, 0, 0, True);
10 : Mouse(640, 484, 0, 0, True);
11 : Mouse(674, 483, 0, 0, True);
12 : Mouse(715, 486, 0, 0, True);
//No need for music becuase you can't open it
end;
end;
//Returnes true if you're in a random event
function InRandom : Boolean;
var
X, Y, InRandomDTM : Integer;
begin
InRandomDTM := DTMFromString('78DA635CC4C0C0309B01052C5FB9024C3342F' +
'98C8781C41C54350B1AC250D53C0112B350D564A5C6A0AA6105B2' +
'16A2AAE161CD4655A3C6886117AFE21C54358E40D65C5435F7B41' +
'851D5A4609A73E6D10554354B80C43E026E3E02248EA2AA617160' +
'4155F310481C4455A3ADA98CAA8611C83A82AA26CF9913558D322' +
'386394141DEA86A9C31CDB979FA20AA9A5420EB30031A400B9FC5' +
'40E211AA8AD933A7A1AA3904249EA2FB4B06550D48FE21AA9A29B' +
'3A6A3AA6107B29EA1AA294D470B437920EB39AA9A2701CCA86A5C' +
'30CD0936E54055930464BD60C00A606A007B5D2F5A');
Result := FindDTM(InRandomDTM, X, Y, MSX1, MSY1, MSX2, MSY2);
FreeDTM(InRandomDTM);
end;
//Copy of ChooseOptionMultiEx revision 32 with minor modifications so it works better with paradise
function ChooseOptionMultiExPara(Texts: TStringArray; TextType: String): Boolean;
var
B, T: TBox;
TPA, TextTPA: TPointArray;
aTPA: T2DPointArray;
I, C, H, HH, ii, L: Integer;
P: TPoint;
Occurances: array [0..4] of TPointArray;
Colors: TIntegerArray;
begin
Result := False;
GetClientDimensions(B.X2, B.Y2);
B.X1 := 0;
B.Y1 := 0;
FindColorsTolerance(TPA, 4674653, B.X1, B.Y1, B.X2, B.Y2, 0);
If Length(TPA) < 10 Then
Exit;
B.X2 := 0;
B.Y2 := 0;
P := TPA[0];
H := High(TPA);
Dec(H);
For I := 0 To H Do
If TPA[i].X = TPA[I+1].X - 1 Then
Begin
If C > 5 Then
Begin
B.X1 := P.X;
B.Y1 := P.Y;
Break;
End Else
C := C + 1;
End
Else
Begin
P := TPA[I + 1];
C := 0;
End;
If I = Length(TPA) Then
Begin
WriteLn('Choose Option Menu Getting Failed');
Exit;
End;
InvertTPA(TPA);
C := 0;
P := TPA[0];
H := High(TPA);
Dec(H);
For I := 0 To H Do
If TPA[i].X = TPA[I+1].X + 1 Then
Begin
If C > 5 Then
Begin
B.X2 := P.X;
B.Y2 := P.Y;
Break;
End Else
C := C + 1;
End Else
Begin
P := TPA[I + 1];
C := 0;
End;
If I = Length(TPA) Then
Begin
WriteLn('Choose Option Menu Getting Failed');
Exit;
End;
TPA := [];
Colors := [16777215, 4231423, 2070783, 65535, 16776960];
case LowerCase(TextType) of
'action', 'player': FindColorsTolerance(Occurances[0], Colors[0], B.x1, B.y1, B.x2, B.y2, 3);
'item' : begin
FindColorsTolerance(Occurances[1], Colors[1], B.x1, B.y1, B.x2, B.y2, 3);
FindColorsTolerance(Occurances[2], Colors[2], B.x1, B.y1, B.x2, B.y2, 3);
end;
'npc' : FindColorsTolerance(Occurances[3], Colors[3], B.x1, B.y1, B.x2, B.y2, 3);
'object': FindColorsTolerance(Occurances[4], Colors[4], B.x1, B.y1, B.x2, B.y2, 3);
else
begin
FindColorsTolerance(Occurances[0], 4674653, B.X1, B.Y1, B.X2, B.Y2, 0);
FindColorsTolerance(Occurances[1], clBlack, B.X1, B.Y1, B.X2, B.Y2, 0);
TPA := MergeATPA(Occurances);
TPA := ReturnPointsNotInTPA(TPA, B);
end;
end;
if High(TPA) < 1 then TPA := MergeATPA(Occurances);
aTPA := SplitTPAEx(TPA, 7, 1);
SortATPAFromFirstPoint(aTPA, Point(B.x1, B.y1));
H := High(Texts);
L := High(aTPA);
// for i := 0 to L do
// DebugTPA(atpa[i], inttostr(i));
For I :=0 To H do
begin
TextTPA := LoadTextTPA(Texts[I], UpChars, HH);
for ii := 0 to L do
If FindTextTPAInTPA(HH, TextTPA, aTPA[ii], TPA) Then
Begin
T := GetTPABounds(TPA); //y - 3
Result := True;
Mouse(B.X1 + 15, T.y1 + 2, 0, 0, True);
Exit;
End;
end;
end;
//Copy of ChooseOption('') except uses paradise version
function ChooseOptionPara(Txt: String): Boolean;
begin
Result := ChooseOptionMultiExPara([Txt], 'All');
end;
//Will search for and solve the random event
procedure FindAndSolveRandom;
begin
repeat
if not InRandom then Exit;
Status('Trying to solve random event...');
Mouse(162, 156, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(195, 156, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(228, 156, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(261, 159, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(294, 156, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(324, 158, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(355, 155, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(166, 194, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(195, 193, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(227, 193, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(258, 195, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(292, 190, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(323, 192, 0, 0, True);
Wait(1000);
if not InRandom then Exit;
Mouse(361, 195, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(166, 226, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(198, 227, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(228, 229, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(260, 228, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(293, 231, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(324, 229, 0, 0, True);
Wait(500);
if not InRandom then Exit;
Mouse(353, 230, 0, 0, True);
Wait(500);
until not InRandom;
end;
procedure SetBrightnessMax;
begin
Login;
GameTabPara(11);
Status('Setting the brightness to max...');
Wait(100);
Mouse(704, 230, 0, 0, True);
end;Power Miner
program A_o_D_Power_Miner;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}
const
// Player
Username = 'Username'; // Your username
Password = 'Password'; // Your password
Nickname = ''; // 3 - 4 letters from your username
// S.M.A.R.T
World = 142; // What world do you want to join?
Signed = False; // Signed? (If true then script will pick a random world)
MembersWorld = False; // For signed: Do you want to join a member world?
// Mining
RockColor1 = 5077417; // Rock color 1 (Rock color code)
RockColor2 = 4879522; // Rock color 2 (Rock color code)
RockTol = 5; // Rock color tolerance (Make higher if it can't find the rock, and lower if it's hovering over too many things)
PickEquip = False; // Is your pickaxe equiped? (True or false)
// Maxes
MaxOres = 0; // Max amount of ores to mine (0 for unlimited)
MaxLoads = 0; // Max loads to mine (0 for unlimited)
MaxLevel = 60; // Max level to aquire (0 for unlimited)
//Anti-ban
MoveMouseRandom = True; // Move mmouse to random position at random times? (True or false)
MoveCameraRandom = False; // Move compass to random position at random times? (True or false)
// Other
RunDir = 'N'; // Which way to run in case script finds a fight (N, S, E, W)
ManageRun = True; // Do you want to turn the run on when it's over 25% and turn it off when under? (Checks every time you mine a load) (True or false)
{------------------------------------------------------------------------------}
{-------------Do not touch below in less you know what you're doing------------}
{------------------------------------------------------------------------------}
var
XPBefore {SetUp / Report},
LevelBefore {SetUp / Report},
LevelAfter {Report / DropOre},
OresMined {Report / MineOre},
LoadsMined {Report / DropOre}:
Integer;
procedure StartAndDeclare;
begin
Disguise('A.o.D Power Miner - Angels of Death - AoD XRaye');
PlaySound('C:\WINDOWS\Media\ding.wav');
Wait(120);
PlaySound('C:\WINDOWS\Media\ding.wav');
Wait(120);
PlaySound('C:\WINDOWS\Media\ding.wav');
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nickname;
Players[0].Active := True;
end;
procedure Report;
var
XPAfter, XPGained, LevelsGained : Integer;
begin
Status('Getting mining XP and level...');
XPAfter := GetXP('Mining');
XPGained := XPAfter - XPBefore;
LevelAfter := GetSkillLevel('Mining');
LevelsGained := LevelAfter - LevelBefore;
begin
Writeln('|==============A.o.D Power Miner===============|');
Writeln('| Mined about ' + IntToStr(OresMined) + ' ores.');
Writeln('| Which is about ' + IntToStr(LoadsMined) + ' loads.');
Writeln('| Gained ' + InttoStr(XPGained) + ' mining XP.');
Writeln('| Gained ' + InttoStr(LevelsGained) + ' mining levels.');
Writeln('| Current mining level is ' + InttoStr(LevelAfter) + '.');
Writeln('| Ran For ' + TimeRunning + '.');
Writeln('|==============================================|');
Writeln('');
end;
end;
procedure Signature;
begin
Writeln('Script Made By');
Writeln(' _ _ ______');
Writeln('\ \ / / | | \ \');
Writeln(' \ / / | | | | __ _ __ __ ___');
Writeln(' / /\ | |_/_/ / _` | \ \ / / / _ \');
Writeln(' / /\ \ | | \ \ | (_| | \ / / | __/');
Writeln('/_/ \_\ |_| \_\ \__,_| / / \___|');
Writeln(' /_/');
end;
procedure LogAndTerm;
begin
Status('Logging out and terminating script...');
LogOut;
TerminateScript;
end;
procedure BoxStuff;
begin
ClearDebug;
ClearReport;
Report;
SRLRandomsReport;
Signature;
end;
procedure MoveMouseRandomP;
begin
if MoveMouseRandom then
begin
case Random(450) of
0: begin
Status('Moving the mouse to a random location...');
MMouse(Random(MSX1), Random(MSY1), Random(MSX2), Random(MSY2));
end;
1: begin
Status('Moving the mouse to a random location...');
MMouse(Random(MIX1), Random(MIY1), Random(MIX2), Random(MCY2));
end;
2: begin
Status('Moving the mouse to a random location...');
MMouse(Random(MCX1), Random(MCY1), Random(MCX2), Random(MCY2));
end;
end;
end;
end;
procedure MoveCompassRandom;
begin
if MoveCameraRandom then
begin
case Random(250) of
0: begin
Status('Moving the compass to a random position...');
MakeCompass(IntToStr(Random(360)));
end;
end;
end;
end;
procedure CheckRunLevels;
var
Red : string;
begin
if ManageRun then
if (GetMMLevels('Energy', Red) < 26)then
begin
Status('Turning run off...');
SetRun(False);
end else
begin
Status('Turning run on...');
SetRun(True);
end;
end;
procedure SetUp;
begin
if not FindNormalRandoms then R_FindRandoms;
Status('Setting up angles...');
SetAngle(True);
MakeCompass('N');
begin
Status('Setting up chats & retaliate ...');
SetChat('Friends', 1);
SetChat('Off', 2);
SetChat('On', 3);
SetChat('Friends', 4);
SetChat('Friends', 5);
Retaliate(False);
begin
Status('Getting mining XP and level...');
XPBefore := GetXP('Mining');
LevelBefore := GetSkillLevel('Mining');
end;
end;
end;
procedure MineOre;
var
X, Y : Integer;
begin
if not FindNormalRandoms then R_FindRandoms;
Status('Looking for rock...');
MoveMouseRandomP;
MoveCompassRandom;
X := MSCX;
Y := MSCY;
if FindColorSpiralTolerance(X, Y, RockColor1, MSX1, MSY1, MSX2, MSY2, RockTol) or
FindColorSpiralTolerance(X, Y, RockColor2, MSX1, MSY1, MSX2, MSY2, RockTol) then
begin
MMouse(X, Y, 5, 5);
if IsUpText('ock') then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Status('Mining...');
if not FindNormalRandoms then R_FindRandoms;
Wait(500+Random(500));
begin
if CharacterMoving then
begin
while CharacterMoving do
begin
MoveMouseRandomP;
MoveCompassRandom;
if not FindNormalRandoms then R_FindRandoms;
end;
if not FindNormalRandoms then R_FindRandoms;
Wait(750+Random(500));
end;
end;
end else Exit;
begin
repeat
if not LoggedIn then
begin
Status('Logging in...');
LoginPlayer;
end;
MoveMouseRandomP;
MoveCompassRandom;
Status('Mining...');
if not FindNormalRandoms then R_FindRandoms;
until(GetAnimation < 0);
Wait(200+Random(100));
end;
Inc(OresMined);
end;
end;
procedure DropOre;
var
Inventory, DropPos : Integer;
begin
if not InvFull then Exit;
if PickEquip then
begin
DropPos := 2;
begin
DropAll;
if not FindNormalRandoms then R_FindRandoms;
Status('Dropping inventory position ' + IntToStr(DropPos) + '...');
Inc(DropPos);
end;
end else
begin
DropPos := 3;
begin
for Inventory := 2 to 28 do
begin
if ExistsItem(Inventory) then
DropItem(Inventory);
if not FindNormalRandoms then R_FindRandoms;
Status('Dropping inventory position ' + IntToStr(DropPos) + '...');
Inc(DropPos);
end;
end;
end;
Inc(LoadsMined);
BoxStuff;
CheckRunLevels;
end;
procedure MaxOre;
begin
if MaxOres = 0 then Exit;
begin
if OresMined >= MaxOres then
begin
Report;
Writeln('You have mined the maximum amount of ores..');
LogAndTerm;
end;
end;
end;
procedure MaxLoad;
begin
if MaxLoads = 0 then Exit;
begin
if LoadsMined >= MaxLoads then
begin
Report;
Writeln('You have mined the maximum amount of loads...')
LogAndTerm;
end;
end;
end;
procedure MaxMiningLevel;
begin
if MaxLevel = 0 then Exit;
begin
if LevelAfter = Maxlevel then
begin
Report;
Writeln('You have reached the maximum mining level...')
LogAndTerm;
end;
end;
end;
begin
SetupSRL;
StartAndDeclare;
ClearDebug;;
ClearReport;
Signature;
begin
Status('Loading S.M.A.R.T...');
SmartSetupEx(World, MembersWorld, Signed, False);
SetTargetDC(SmartGetDC);
Wait(1000);
while not RSReady do Wait(100);
end;
SetUpReflection;
begin
Status('Setting up graphics / logging in...');
LoginPlayer;
SetUp;
BoxStuff;
CheckRunLevels;
if not FindNormalRandoms then R_FindRandoms;
GameTab(4);
begin
repeat
if not LoggedIn then
begin
Status('Logging in...');
LoginPlayer;
end;
MineOre;
DropOre;
MaxOre;
MaxLoad;
MaxMiningLevel;
until(False);
end;
end;
end.Demon Ranger:
program Demon_Ranger;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}
const
// Player
Username = ''; // Your username
Password = ''; // Your password
Nickname = ''; // 3 - 4 letters from your username
// S.M.A.R.T
World = 142; // What world do you want to join?
Signed = True; // Signed? (If true then script will pick a random world)
MembersWorld = False; // For signed: Do you want to join a member world?
{------------------------------------------------------------------------------}
{-------------Do not touch below in less you know what you're doing------------}
{------------------------------------------------------------------------------}
{
Things To Add:
Choose fighting style
If you're out of arrows then logout and terminate
}
var
X, Y, StartedFighting : Integer;
procedure DeclarePlayer;
begin
Disguise('Demon Ranger - XRaye - SRL-Forums.Com');
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nickname;
Players[0].Active := True;
end;
procedure Report;
begin
Writeln('|===============Demon Ranger================|');
Writeln('| Ran For ' + TimeRunning + '.');
Writeln('|===========================================|');
Writeln('');
end;
procedure Signature;
begin
Writeln('Script Made By');
Writeln(' _ _ ______');
Writeln('\ \ / / | | \ \');
Writeln(' \ / / | | | | __ _ __ __ ___');
Writeln(' / /\ | |_/_/ / _` | \ \ / / / _ \');
Writeln(' / /\ \ | | \ \ | (_| | \ / / | __/');
Writeln('/_/ \_\ |_| \_\ \__,_| / / \___|');
Writeln(' /_/');
end;
procedure SetUp;
begin
Status('Setting Up Angles...');
SetAngle(True);
MakeCompass('N');
begin
Status('Setting up chats & retaliate ...');
SetChat('Friends', 1);
SetChat('Off', 2);
SetChat('On', 3);
SetChat('Friends', 4);
SetChat('Friends', 5);
Retaliate(False);
end;
end;
procedure BoxStuff;
begin
ClearDebug;
Report;
Signature;
SRLRandomsReport;
end;
function FightingDemon : Boolean;
var
Waited : Integer;
Ranging : Boolean;
begin
Waited := 0;
repeat
Wait(50);
if GetAnimation > 0 then Ranging := True else Ranging := False;
Inc(Waited);
until Ranging or (Waited > 99);
Result := Ranging;
end;
procedure KillDemon;
begin
MarkTime(StartedFighting);
repeat
if not LoggedIn then
begin
Status('Logging in...');
LoginPlayer;
end;
if not FindNormalRandoms then R_FindRandoms;
Status('Looking for demon...');
X := MSCX;
Y := MSCY;
if FindColorSpiralTolerance(X, Y, 1715048, MSX1, MSY1, MSX2, MSY2, 5) then
begin
Mouse(X, Y, 0, 0, False);
ChooseOption('tac');
Status('Attacking demon...');
Wait(1000+Random(1000));
end;
Wait(100);
until FightingDemon;
begin
repeat
if not LoggedIn then
begin
Status('Logging in...');
LoginPlayer;
end;
if TimeFromMark(StartedFighting) > (5 * 60000 + RandomRange(-60000, 60000)) then
begin
Mouse(644, 186, 10, 10, True);
MarkTime(StartedFighting);
end;
BoxStuff;
if not FindNormalRandoms then R_FindRandoms;
Status('Killing demon...');
Wait(200+Random(200));
until not FightingDemon;
end;
end;
begin
SetUpSRL;
BoxStuff;
DeclarePlayer;
begin
Status('Loading S.M.A.R.T...');
SmartSetupEx(World, MembersWorld, Signed, False);
SetTargetDC(SmartGetDC);
Wait(1000);
while not RSReady do Wait(100);
end;
SetUpReflection;
BoxStuff;
Status('Logging in...');
LoginPlayer;
SetUp;
repeat
if not LoggedIn then
begin
Status('Logging in...');
LoginPlayer;
end;
BoxStuff;
KillDemon;
until (False);
end.