Mr. Doctor
2009-10-10 13:04:36
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?
SCAR
Are you a member of any other communities?
Moparisthebest, TheHHD
Tell us about yourself…
Please show us one (or multiple) of your scripts.
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
SCAR
Are you a member of any other communities?
Moparisthebest, TheHHD
Tell us about yourself…
From: Junkj
13. I like video games.
Please show us one (or multiple) of your scripts.
program RMS;
{.include srl/srl.scar}
Const
//////////////////////////////////////////////////////////////////////
emailit=false; //want to email me the proggy? no then dont fill in below
emailadress='';//For me to receive your progress report
srlusername='';//To know who sent the progress report SRL names reccomended
/////////////////////more below!//////////////////////////////////////
//Please refrain from using any ore colors. Try wearing blue or green.
//By ore colors,MOSTLY brown or the ore your mining.
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
///// fill all of below in
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'arfl';
Players[0].Active := true;
Players[0].strings[0]:= 'copper'; //what rock you mining? copper, iron or tin
Players[0].booleans[0] := false; //true=drop, false=sell
Players[0].integers[0]:= 3; // loads to do
Players[0].integers[1]:= 15000;// how long do you think you can mine the rock
//this isn't wait and click again, this is for if the count doesn't
//change in x amount of time it will click again. For stolen rocks.
{
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := true;
Players[1].strings[0]:= 'copper'; //what rock you mining? copper, iron or tin
Players[1].booleans[0] := true; //true=drop, false=sell
Players[1].integers[0]:= 100; // loads to do
Players[1].integers[1]:= 15000;// how long do you think you can mine the rock
//this isn't wait and click again, this is for if the count doesn't
//change in x amount of time it will click again. For stolen rocks.
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := true;
Players[2].strings[0]:= 'copper'; //what rock you mining? copper, iron or tin
Players[2].booleans[0] := true; //true=drop, false=sell
Players[2].integers[0]:= 100; // loads to do
Players[2].integers[1]:= 15000;// how long do you think you can mine the rock
//this isn't wait and click again, this is for if the count doesn't
//change in x amount of time it will click again. For stolen rocks.
}
end;
//////////////////////////STOP!!!!!!!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
var
x,y,mined,loads,n :integer;
procedure barter;
var tpa : tpointarray;
var rok,gstorewin :integer;
begin
rok := BitmapFromString(7, 8, 'beNrzMzfRlHUxU3OzUPe20fK10w5' +
'y0gOS5jryQEEPK02gYICDboizPpC01FNAVhbpbgQkbQyU4MrCXA1i' +
'vUyAiu2NlJGVxfuYpgZaAg0EisCVAUWACGggUBCoJdrTGMhNDrAAI' +
'rhpEG6in3kiABt/KeY=');
gstorewin := BitmapFromString(7, 10, 'beNqz0dFUFLA2UQ72sYkJ' +
'dXG2AXGlhFmMdWTyMyIWz+kBoprSVHcHA2UZHqAaiAgQdTYVJUZ5A' +
'pUBtQDFM5OCgAjIAHKBgkAtRdnREEE4gggCdQER0C6gYh9XU6Ag0C' +
'JkQaBduASBhsAFgXqBdkFsgQhCDHQGADr4RYE=');
x := mscx;
y := mscy;
if(not(loggedin))then exit;
begin
makecompass('w')
setangle(true)
findcolorsspiraltolerance(x, y, TPA,15393002, msx1, msy1, msx2, msy2, 10);
if(GetArrayLength(TPA) > 0)then
begin
mmouse(tpa[0].x, tpa[0].y, 3, 3);
if(waituptext('to',300+random(200)))then
begin
Getmousepos(x,y);
mouse(tpa[0].x, tpa[0].y, 3, 3,false);
wait(500+random(500))
waitoption('rade', 200 + random(100));
MarkTime(N);
repeat
wait(3000+random(500));
until(FindBitmapToleranceIn(gstorewin, x, y, MSX1, MSY1, MSX2, MSY2, 20)) or (TimeFromMark(N) >= 20000)
if(TimeFromMark(N) >= 20000) then exit;
If(FindBitmapToleranceIn(rok, x, y, MIX1, MIY1, MIX2, MIY2, 20))then
begin
repeat
mouse(x,y,3,3,false);
chooseoption('50');
wait(1000+random(500))
until not(FindBitmapToleranceIn(rok, x, y, MIX1, MIY1, MIX2, MIY2, 20))
freebitmap(rok)
closewindow;
makecompass('s')
arrangeinv;
wait(1000+random(100))
end;
end;
end;
end;
end;
procedure walktomsym;
begin
if(not(loggedin))then exit;
if(FindSymbol(x,y,'mine'))then
begin
mouse(x,y,3,3,true)
flag;
end;
end;
procedure walktogstore;
begin
if(not(loggedin))then exit;
if(FindSymbol(x,y,'store'))then
begin
mouse(x,y,3,3,true)
flag;
end;
end;
Procedure walktomine;
begin
if(not(loggedin))then exit;
mouseflag(583, 119,3,3,0);
wait(200+random(300))
mouseflag(581, 127,3,3,0);
wait(200+random(300))
walktomsym;
setangle(false)
end;
function ACIron: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 1711918, MSX1, MSY1, MSX2, MSY2, 24);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 3.83) and (H <= 4.92) and (S >= 28.55) and (S <= 29.65) and (L >= 8.80) and (L <= 19.24) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 0.81) and (X <= 3.20) and (Y >= 0.74) and (Y <= 2.85) and (Z >= 0.57) and (Z <= 1.99) then
begin
Result := arC[i];
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function ACCopper: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 4621284, MSX1, MSY1, MSX2, MSY2, 32);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 6.33) and (H <= 6.46) and (S >= 56.89) and (S <= 97.79) and (L >= 51.74) and (L <= 64.92) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 31.45) and (X <= 52.03) and (Y >= 25.38) and (Y <= 41.71) and (Z >= 7.78) and (Z <= 12.53) then
begin
Result := arC[i];
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function ACtin: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 9671834, MMX1, MMY1, MMX2, MMY2, 24);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 0.00) and (H <= 2.40) and (S >= 2.52) and (S <= 4.42) and (L >= 53.71) and (L <= 64.33) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 23.62) and (X <= 35.26) and (Y >= 24.33) and (Y <= 36.37) and (Z >= 25.98) and (Z <= 38.43) then
begin
Result := arC[i];
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Procedure anti;
begin
case random(50) of
0:HoverSkill('mining',false);
1:SleepAndMoveMouse(1000+random(500));
2:randomrclick;
3:pickupmouse;
4:RandomMovement;
end;
wait(500+random(500))
end;
Procedure Dropit;
var rok :integer;
begin
rok := BitmapFromString(7, 8, 'beNrzMzfRlHUxU3OzUPe20fK10w5' +
'y0gOS5jryQEEPK02gYICDboizPpC01FNAVhbpbgQkbQyU4MrCXA1i' +
'vUyAiu2NlJGVxfuYpgZaAg0EisCVAUWACGggUBCoJdrTGMhNDrAAI' +
'rhpEG6in3kiABt/KeY=');
if(not(loggedin))then exit;
if(FindBitmapToleranceIn(rok, x, y, MIX1, MIY1, MIX2, MIY2, 20))then
begin
repeat
mouse(x,y,3,3,false)
wait(100+random(50))
chooseoption('rop')
wait(300+random(200))
until(not(FindBitmapToleranceIn(rok, x, y, MIX1, MIY1, MIX2, MIY2, 20)))
arrangeinv;
end;
end;
procedure mineit;
var I,E :integer;
begin
if(not(loggedin))then exit;
if(invfull) and (Players[currentplayer].booleans[0]=true) then dropit;
case Lowercase(Players[currentplayer].strings[0]) of
'iron':findcolorspiraltolerance(x,y,ACIron,msx1,msy1,msx2,msy2,20);
'copper':findcolorspiraltolerance(x,y,ACCopper,msx1,msy1,msx2,msy2,20);
'tin':findcolorspiraltolerance(x,y,ACtin,msx1,msy1,msx2,msy2,20);
end;
mmouse(x,y,3,3);
if(waituptext('ine',300+random(300)))then
begin
GetMousePos(x, y);
mouse(x,y,3,3,false);
if not waitoption('ocks', 500 + random(100)) then Exit;
i := InvCount;
MarkTime(E);
while (InvCount = i) and (TimeFromMark(E) < Players[currentplayer].integers[1]) do anti;
if(not(invcount = i)) then Mined:=Mined+1
end;
end;
procedure walkit;
begin
if(not(loggedin))then exit;
makecompass('S')
walktomsym;
wait(200+random(300))
RadialRoadWalk(7236979, 200, 160, 60, 0,0);
wait(200+random(300))
RadialRoadWalk(7236979, 200, 160, 60, 0,0);
wait(2000+random(500))
walktogstore;
wait(1000+random(500))
barter;
walktomine;
Loads:=Loads+1
case Lowercase(Players[currentplayer].strings[0]) of
'iron': makecompass('w');
'copper': makecompass('n');
'tin': makecompass('e');
end;
mineit;
end;
procedure invcheck;
begin
if(not(loggedin))then exit;
If(invfull) and (Players[currentplayer].booleans[0]=true) then
begin
Dropit;
end else
If(invfull) and (Players[currentplayer].booleans[0]=false) then
begin
walkit;
end;
end;
function SendEmail(MyEmail, Subject, EmailMessage, SenderEmail, SenderName, Website: string): Boolean;
var Email : string; Client : Integer;
begin
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
Wait(20);
AddPostVariable(Client, 'email', MyEmail);
AddPostVariable(Client, 'message', EmailMessage);
AddPostVariable(Client, 'name', SenderName);
AddPostVariable(Client, 'subject', Subject);
AddPostVariable(Client, 'sender', SenderEmail);
Email := PostHTTPPageEx(Client, Website);
FreeHTTPClient(Client);
if (Email > '') then Result := true
else
begin
Result := false;
Writeln('Emailing User Failed!');
end;
end;
procedure ScriptTerminate;
begin
writeln('======================================');
writeln('==========Junkj======RMDOS============');
writeln('======================================');
writeln('|Mined '+ inttostr(mined) + ' ores ');
writeln('|Did '+ inttostr(loads) + ' loads ');
writeln('|Ran for ' + (timerunning)+' ');
case Lowercase(Players[currentplayer].strings[0]) of
'iron': writeln('|Mined iron!');
'copper': writeln('|Mined copper!');
'tin':writeln('|Mined tin!');
end;
case (Players[currentplayer].booleans[0]) of
false: writeln('|Mined and sold');
true: writeln('|Powermined');
end;
writeln('======================================');
if(emailit)then
SendEmail('cortese8@gmail.com', 'RMDOSprog', 'Mined '+ inttostr(mined) + ' ores=Did '+ inttostr(loads) + ' loads=Ran for ' + (timerunning),emailadress, srlusername,'http://jjforums.comlu.com/');
end;
function logchecker :boolean;
begin
if(not(loggedin))then
begin
writeln('randomly logged out,switching');
nextplayer(false);
result:=true;
end else
if(not(loggedin)) and (allplayersinactive)then
begin
writeln('randomly logged out and no more players, done');
terminatescript;
result:=true;
end else
result:=false;
end;
begin
setupsrl;
DeclarePlayers;
activateclient;
cleardebug;
repeat
mined:=0
if(not(loggedin))then
loginplayer;
setrun(true);
setangle(true);
repeat
logchecker;
findnormalrandoms;
mineit;
invcheck;
findnormalrandoms;
logchecker;
until(loads >= Players[CurrentPlayer].Integers[0])
LogOut;
nextplayer(false);
until(AllPlayersInactive);
end.
