SCAR Code:
procedure Drop;
var FailedDrop,DropTries, Dropping, x1, x2, y1, y2:Integer;
begin
Ore := DTMFromString('78DA63CC66626078C28002E6476B30E830323' +
'00011C37F20602C07AA79CE8006189148205D0854F39A809A34A0' +
'9A8F04D4E401D5BC27A0A606A8E60101352540353709A84900AA7' +
'94B404D2C50CD0BFC6A007EB41170');
{Ore := DTMFromString('78DA63FCC8C4C030919101199C2A3262F80FA' +
'441A2FF8180F12D50CD7C543510591809A47F01D5CC24A0E63F50' +
'4D0F0135CF8830E72150CD0C026A7E03D54C25A0E62B504D2B7E3' +
'500380212C7'); Another DTM, just in case the other one not working...}
MarkTime(Dropping)
repeat
if FindDTM(Ore, x,y, x1, y1, x2, y2) then
begin
Mouse(x,y,0,0,true);
ChooseOption('rop');
DropTries:=DropTries+1
end
else
begin
FailedDrop:=FailedDrop+1;
end;
if (FailedDrop=30) then
begin
Writeln('Tried dropping the ore 30 times but failed, report this bug to Runescapian, terminating script...')
TerminateScript;
end;
until(DropTries = 35) or (TimeFromMark(Dropping)>300000)
Inventories:=Inventories+1;
AmountLoads:=AmountLoads+1;
end;
SCAR Code:
//This is my first script, a powerminer. Fill in the info in lines 10-13 and 18-26 and you
//should be ready to go!
//Big thanks to Derek, Method, Santa_Clause, and JackLKrawl for helping me fix errors and and suggesting what functions I should use
program PowerMinerByScapian;
{.include SRL/SRL.scar}
var
Ore, AmountLoads, inventories, x, y:integer;
const
YourSRLId = ''; //Enter your SRL Stats ID number, if you don't have one go here - [url]http://www.stats.srl-forums.com/[/url]
YourSRLPassword =''; //Your SRL Stats password
RockColor1 = 3890561; //put the color of the rock (using the color picker) before the ; but after the =
RockColor2 = 3463635; //same as above, just a slightly different color
RockColor3 = 3624564; //same as above, just a slightly different color
RockTolerance = 10; //10 should be fine, but if it's not finding the rock then increase it and/or change the above colors
WaitTime = 2500; //Time you want it to wait in between clicking rocks (multiply by 1000,
//1 second = 1000, 2 seconds = 2000, etc)
//NOTE: because of a bit of antiban this will automatically include an
//extra 5 sec or so
Loads = 1; //How many loads do you want each character to do before logging out?
MineRockLength = 600000; ////Time you want it to mine an inventory of rocks before giving up (multiply by 1000,
//1 second = 1000, 2 seconds = 2000, etc)
Procedure DeclarePlayers;
begin
HowManyPlayers := 4; //Ignore this line, just be sure to set the players you won't be using False
NumberOfPlayers(HowManyPlayers); //Ignore this line
CurrentPlayer := 0; //Which player do you want to start with? (0 is the first player)
Players[0].Name := ''; //Put the name of your rs character here
Players[0].Pass := ''; //Put the password of your rs character here
Players[0].Nick := ''; //Put 3-4 letters of your rs name in here(Not the first letter
//and no spaces or _'s.
Players[0].Active := True; //Are you using this player? True is Yes, False is no.
Players[1].Name := '';
Players[1].Pass := ''; //to set the rest of these up just refer to the above instructions
Players[1].Nick := '';
Players[1].Active := False;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := False;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := False;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure Mining;
var TimeMining,Tries:integer;
begin
MarkTime(TimeMining);
Tries:=0
repeat
if(not(LoggedIn))then
begin
Exit;
end;
if (FindObjCustom(x, y, ['Mine','ine O','ne Or','e Ore','Ore'], [RockColor1, RockColor2, RockColor3], RockTolerance)) then
Mouse(x, y, 0, 0, True)
else
begin
Tries:=Tries+1
if (Tries = 25) then
begin
Writeln('Couldnt find the color 25 times, terminating script');
TerminateScript;
end;
end;
if FindNPCChatText('inventory is too full to hold any more') then
begin
exit;
end;
wait(WaitTime + random(20));
FindNormalRandoms;
RandomRClick;
RandomRClick;
PickUpMouse;
until(InvFull) or (TimeFromMark(TimeMining) > MineRockLength+random(20000))
end;
procedure Drop;
var FailedDrop,DropTries, Dropping, x1, x2, y1, y2:Integer;
begin
Ore := DTMFromString('78DA63CC66626078C28002E6476B30E830323' +
'00011C37F20602C07AA79CE8006189148205D0854F39A809A34A0' +
'9A8F04D4E401D5BC27A0A606A8E60101352540353709A84900AA7' +
'94B404D2C50CD0BFC6A007EB41170');
{Ore := DTMFromString('78DA63FCC8C4C030919101199C2A3262F80FA' +
'441A2FF8180F12D50CD7C543510591809A47F01D5CC24A0E63F50' +
'4D0F0135CF8830E72150CD0C026A7E03D54C25A0E62B504D2B7E3' +
'500380212C7'); Another DTM, just in case the other one not working...}
MarkTime(Dropping)
repeat
if FindDTM(Ore, x,y, x1, y1, x2, y2) then
begin
Mouse(x,y,0,0,true);
ChooseOption('rop');
DropTries:=DropTries+1
end
else
begin
FailedDrop:=FailedDrop+1;
end;
if (FailedDrop=30) then
begin
Writeln('Tried dropping the ore 30 times but failed, report this bug to Runescapian, terminating script...')
TerminateScript;
end;
until(DropTries = 35) or (TimeFromMark(Dropping)>300000)
Inventories:=Inventories+1;
AmountLoads:=AmountLoads+1;
end;
procedure Randoms;
begin
FindNormalRandoms;
end;
procedure AntiBan; //by SRL Devs
var Ban: Integer;
begin
Ban:= random(5);
case Ban of
0: RandomRClick;
1: HoverSkill('mining', False);
2: PickUpMouse;
3: AlmostLogout;
4: Wait2(3 + random(9), true);
5: BoredHuman;
end;
end;
procedure CheckSrlId;
begin
if (YourSRLId = '') then
begin
Writeln('You need an SRL Stats account to use this script :)')
Writeln('If you dont have one, go here - http://www.stats.srl-forums.com')
Writeln('Signing up takes 1 minute, dont be lazy')
Writeln('Srl stats are awesome, you can show off how long you have been running scripts!')
TerminateScript;
end
else
begin
exit;
end;
if (YourSRLPassword = '') then
begin
Writeln('You need an SRL Stats account to use this script :)')
Writeln('If you dont have one, go here - http://www.stats.srl-forums.com')
Writeln('Signing up takes 1 minute, dont be lazy')
Writeln('Srl stats are awesome, you can show off how long you have been running scripts!')
TerminateScript;
end
else
begin
exit;
end;
end;
procedure proggy;
begin
Writeln('|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|');
Writeln('|\/\/\/\/\/\/ Power Miner by Scapian /\/\/\/\/\/\/\|');
Writeln('|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|');
Writeln('|\/\ We have done' + intToStr(inventories) + ' inventories of ores so far! /\/\|');
Writeln('|\/\ We worked ' + TimeRunning + '/\/\/\/\/\/\/\/\/\//\/\/\|');
Writeln('|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|');
Writeln('|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\//\/\/\/\|');
end;
procedure siggy;
begin
Writeln('I hope you had a great experience with the Scapian Power Miner!')
Writeln(' Hope to see you again! ')
Writeln(' -Scapian')
end;
procedure login;
begin
if (not(loggedin)) then
begin
loginplayer;
findnormalrandoms;
wait(1000);
setBar('brightness',4);
end
else
begin
findnormalrandoms;
wait(1000);
setBar('brightness',4);
end;
end;
procedure EnoughLoads;
begin
if(AmountLoads=Loads)then
begin
NextPlayer(True);
AmountLoads:=0;
HighestAngle;
MakeCompass('N');
end;
end;
begin
SetupSRL;
ScriptID := '532';
SRLId := YourSRLId;
SRLPassword:= YourSRLPassword;
CheckSrlId;
FindRS;
ActivateClient;
DeclarePlayers;
login;
Mining;
Drop;
Randoms;
AntiBan;
repeat
if(not(LoggedIn))then
begin
Exit;
end;
Mining;
Drop;
Randoms;
AntiBan;
proggy;
EnoughLoads;
until(false)
Siggy;
end.