SRL Archive - Archive

Junkj - SRL Member Application


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…
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.

Main

2009-10-10 13:10:38

Kinda unorganized.

Mr. Doctor

2009-10-10 13:11:47

Another thing. Please don't post about my immaturity and other things. I know i am what i am. Thats why I'm me.

rogeruk

2009-10-10 13:12:20

    Freedtm(bone);
repeat
Getmousepos(x,y);
mouse(x,y,3,3,true);
bonesb:=bonesb+1;
Writeln('Burried');
Disguise('Burried');
wait(2000+random(500));
until not findbone;

Would that work? EVen tho your freeing the DTM? Would until not findbone work?

Mr. Doctor

2009-10-10 13:15:26

Taking that script out, its old and barely works.

rogeruk

2009-10-10 13:16:40

From: Junkj
Taking that script out, its old and barely works.


On that note its a No.

Wont vote just yet, *hint* maybe you have an up-to-date script that works

//Edit

Your script doesnt seem to contain many failsafes.


wait(500+random(500))
chooseoption('rade');
repeat
wait(3000+random(500));
until(FindBitmapToleranceIn(gstorewin, x, y, MSX1, MSY1, MSX2, MSY2, 20))

What happens if there is lag?

WaitOption('rade',500);

What happens if it never finds the gstorewin bitmap?

Rick

2009-10-10 13:18:23

Nice to see you still trying :)


procedure DeclarePlayers;
begin
HowManyPlayers:= 1; // Make the inactive players[#] green
NumberOfPlayers(HowManyPlayers); //So you dont get a runtime error :D
CurrentPlayer := 0;
///// fill all of below in
Players[0].Name := 'farflafa'; //Username
Players[0].Pass := 'yersher'; //Password
Players[0].Nick := 'arfl'; //Nickname 3-4 letters no first or cap
Players[0].Active := true; //Wanna use?
Players[0].Booleans[0]:= true;//Want to eat?
Players[0].Integers[0]:= 3; //How many rats do you want to kill?
Players[0].Strings[0] := 'attack'; //Attack Strength Defence or Shared, Scims only
Players[0].Strings[1] := 'shrimp'; //shrimp or meat
end;

No problem here but it's easier for the user if you do this:


procedure DeclarePlayers;
begin
HowManyPlayers:= 1; // Make the inactive players[#] green
NumberOfPlayers(HowManyPlayers); //So you dont get a runtime error :D
CurrentPlayer := 0;

///// fill all of below in
with Players[0] do
begin
Name := 'farflafa'; //Username
Pass := 'yersher'; //Password
Nick := 'arfl'; //Nickname 3-4 letters no first or cap
Active := true; //Wanna use?
Booleans[0] := true; //Want to eat?
Integers[0] := 3; //How many rats do you want to kill?
Strings[0] := 'attack'; //Attack Strength Defence or Shared, Scims only
Strings[1] := 'shrimp'; //shrimp or meat
end;
end;


var
x,y,bonesb,bone,kill,pick,checks :integer;

Most of your variables here can be local instead of global.

For example, in your Boner procedure (.. not even gunna comment on that name …) you use


bonesb:=bonesb+1;

Instead of using bonesb as a global var, you can use Players[CurrentPlayer].Integers[#]. This eliminates the global var, and, it would improve your progress report, as you can measure each individual players buried bones.

Also, I would never use x and y as a global var. Always declare them locally.

In your boner procedure you initialise the DTM in the variable Bone (which should be local) the you call another procedure which, should just be included in that function and eliminate the need for the global var.

Will Edit with more. Just wanted to post this so far.

Edit: Arg! you deleted that script. Time to comment on the other one then …

Alright, Second Script.


var
x,y,mined,loads :integer;

All these can be eliminated ! Look above for using the Players[CurrentPlayer].Integers[#], and declare x and y locally.


var tpa : tpointarray;
var rok,gstorewin :integer;

can be


var
tpa : tpointarray;
rok, gstorewin :integer;


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;

I do not recommend using MouseFlag as your main walking function. It's like walking blind, if the camera moves then your script is done for.


ColorToleranceSpeed(1);

Do you know what this is? Why would you use 1? Scar already defaults to 1. Head over here to learn more about that.


function invchecker :boolean;
begin
Result := Invfull;
end;

Why ? Useless code, InvFull returns a boolean anyway.


if(invchecker=true) and (Players[currentplayer].booleans[0]=true)

No need to put "= true".


Lowercase(Players[currentplayer].strings[0])

Good to see a failsafe.

I'm gunna carry on looking through your script, and I'm holding my vote atm. If you work on your standards, and fix up the script a little then I'll decide.

Mr. Doctor

2009-10-10 13:18:54

EErrr, isn't that why I have my miner in there?

Mr. Doctor

2009-10-10 13:24:06

From: rogeruk
On that note its a No.

Wont vote just yet, *hint* maybe you have an up-to-date script that works

//Edit

Your script doesnt seem to contain many failsafes.


wait(500+random(500))
chooseoption('rade');
repeat
wait(3000+random(500));
until(FindBitmapToleranceIn(gstorewin, x, y, MSX1, MSY1, MSX2, MSY2, 20))

What happens if there is lag?

WaitOption('rade',500);

What happens if it never finds the gstorewin bitmap?


Gstorewin is the bitmap of the window of the gstore. I am currently updating this script. I have marktime for the failsafe in the new version. Then it will try again.

rogeruk

2009-10-10 13:27:30

Well cant judge you on scripts that you "will" make.

Mined:=Mined+1

Inc(Mined)

Standards are quite off too, whats up with all the white space?. Going to have a read over your other application

//Edit "will" meaning future scripts

ZaSz

2009-10-10 13:29:08


Live by your rules please, also, not going to vote right now.

YoHoJo

2009-10-10 13:31:22

In Boner:
  if(findbone)then
begin
Freedtm(bone);
repeat
You are freeing the bone DTM before you even done using it. (Im not sure if that will work?)
No need for
 Getmousepos(x,y);
The wait could be shorter I think to make it faster.

In EatMeat;
if(hppercent<20)then
begin
if(Players[currentplayer].booleans[0])then
begin
The HP percent and Boolnea[0] should be switched.
The way your doing it ALWAYS checks HP, and then checks to eat.
Whilst if you first checked weather the eat boolean was true first, you wouldn't need to check HP sometimes. (Sorry hard to word that)

Once again, freeing something before useage: (But im not sure if that will work or not)
      if (FindBitmapToleranceIn(meatbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20)) then
begin
freebitmap(meatbmp);

The end else (else meaning if it cant find the bitmap) already means "if not findbitmap" so no need for the "not Findbitmap" line.
      end else
if not(FindBitmapToleranceIn(meatbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20))then

In BonePIck
   findcolorspiral(x,y,12961212, msx1, msy1, msx2, msy2)
Need an IF before it and a THEN after it. Otherwise the procedure will go thought itself, even if that color isn't found. Also I doubt that that one color will ALWAYS find bones, it doesn't have tolerance or anything.

NEXT SCRIPT:
In Barter

          repeat
wait(3000+random(500));
until(FindBitmapToleranceIn(gstorewin, x, y, MSX1, MSY1, MSX2, MSY2, 20))
Should have a failsaife, in case the bitmap isn't found. Otherwise the should would just be waiting forever.

Also, your walking is just mini-map cooredinate clicking, no DDTMs, RRW, autocolor, or anything special. Which is pretty risky business and inaccurate.

BUT, there are also many positive aspects to both scripts too! I'm very on the fence about this one, and will wait for a more thorough (JAD) post :D.

Mr. Doctor

2009-10-10 13:32:33

From: rogeruk
Well cant judge you on scripts that you "will" make.

Mined:=Mined+1

Inc(Mined)

Standards are quite off too, whats up with all the white space?. Going to have a read over your other application


What do you mean by "will". Do you think I am lying?

@YHJ= Radial walking is in the new one. Just having problems.
@ZaSz= Someone was gonna do that sooner or later :p

rogeruk

2009-10-10 13:33:32

From: ZaSz

Live by your rules please, also, not going to vote right now.


Huh?.

Junkj, did you learn anything from your last application?.

Baked0420 posted quite a large post on your last application here

As you can see you have the same problems.
You should use ;'s alot more. Its a good habit to get into.

Sorry but judging your script and your progress from your last application i believe its going to be have to be a No. I dont see any significant improving.

//Edit "will" just meaning future scripts.

YoHoJo

2009-10-10 13:34:51

From: Junkj
What do you mean by "will". Do you think I am lying?

@YHJ= Radial walking is in the new one. Just having problems.
@ZaSz= Someone was gonna do that sooner or later :p


By saying WILL he means that, your saying that you WILL update/fix the scripts ect ect, which is great, but we cant judge scripts that you dont show us/have ready yet.

Rick

2009-10-10 13:36:09

To be honest, you should have thought this through. I posted my comments on the scripts you posted. If you are just gunna change them, then you should have waited a little longer. Perhaps you should also get people to test your scripts before you apply with them.

YoHoJo

2009-10-10 13:45:28

JunkJ, you should have just edited you top post with that script.
Please post the 'updated' version on your firs post, thanks.

Bionicle

2009-10-10 14:39:09

Introduction:

Got quite bit of helpful criticism for this so sit back, grab a coke, maybe a bag of chips, and make sure you go to the washroom before you read it all.

Cons:

1) Standards need a lot of work. Camel hump cap your function names (ThisIsAFunction) so they are easier to read. Also at the beginning, the first thing people see, is very messy. I saw it, and was like 'Wooohhh is this even SCAR?'. This is what you have:
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 := 'farflafa';
Players[0].Pass := 'omgomg11';
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!!!!!!!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Here, I took the initiative to fix it up for you, to make it neater:

{------------------------------------------------------------------------------]
[INSTRUCTIONS: ]
[ ]
[Please refrain from using any ore colors. Try wearing blue or green. By ore ]
[colors, I mean MOSTLY brown or the ore your mining. ]
[Place your RuneScape character in the mine, set all of your information below,]
[hit play and wait for your levels to climb! ]
[------------------------------------------------------------------------------}

program RMS;
{.include srl/srl.scar}
Const
emailit=false; //want to email me the proggy?
emailadress='email@site.com';//For me to receive your progress report
srlusername='username';//To know who sent the progress report SRL names reccomended

procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'user';
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
{
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := true;
Players[1].strings[0]:= 'copper';
Players[1].booleans[0] := true;
Players[1].integers[0]:= 100;
Players[1].integers[1]:= 15000;
}
{
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := true;
Players[2].strings[0]:= 'copper';
Players[2].booleans[0] := true;
Players[2].integers[0]:= 100;
Players[2].integers[1]:= 15000;
}
end;
{Don't touch anything past this poing unless you know what you're doing}

See? Doesn't that look better? EDIT: I realize that the ']'s don't line up, and it looks weird, but if you copy it into scar, they do, and it looks better ;)

2) add more anti-bans, maybe even some custom made ones

3) Your standards in 'walkit' and 'sendemail' are horrific:

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;

and:

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;

Should be:

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;

and:

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;

Pros:

1) Nice, solid proggy report:
==========Junkj======RMDOS============
======================================
|Mined 0 ores
|Did 0 loads
|Ran for 1 Seconds
|Mined copper!
|Mined and sold
======================================
Successfully executed

2) It compiles!

3) In the places i didn't mention in my critisism about your standards, the standards are good.

4) DTM's!

5) Radial walking!

6) Cases!

7) Great knowledge of arrays!

8) Symbol finding!

9) Auto coloring!

10) even EMAILING!

Conclusion:

Obviously, the pros outweigh the cons. (Yes, the cons section is bigger, but thats only because I can show you how to fix it ;)) Yes you are a bit immature, as you mentioned, but it's not too bad. In fact, i think it sometimes is quite funny at times :p! And guess what;

And the Vote is…:

program VoteOpinion;

function Vote: boolean;
begin
Result:=True
if Result = True then
WriteLn('Congratulations, my vote is yes!');
end;

begin
Vote;
end.

Successfully compiled (80 ms)
Congratulations, my vote is yes!
Successfully executed

Good luck with getting members!

(Voted on the mining script, not the first one if you were to lazy to read my whole post :D)

~bionicle

Mr. Doctor

2009-10-10 14:53:31

Thank you Bionicle.

cycrosism

2009-10-10 22:56:23

Symbol clicking? COORD CLICKING?

mouseflag(583, 119,3,3,0);
wait(200+random(300))
mouseflag(581, 127,3,3,0);

Come on dude, I know you can do better. Did you use ACA to make those auto colours?

That email procedure you made is really good. Good use of multiplayer. Also, just remember to free those (D)DTMS/Bitmaps.

Good luck.

Voted yes.

NiCbaZ

2009-10-10 23:18:31

No Everything is out of standards, you don't show DDTM's TPA's and advanced logic, or more importantly Functions.

Gu3st...

2009-10-11 04:54:21

From: NiCbaZ
No Everything is out of standards, you don't show DDTM's TPA's and advanced logic, or more importantly Functions.

+ there is a lot of possibly infinite loops in there, like this one:
until not(FindBitmapToleranceIn(rok, x, y, MIX1, MIY1, MIX2, MIY2, 20))
What if the user had a item in the inventory with that color and not the rok-dtm?

I am sorry.. I vote no :(

Keep up the good work and read some tutorials and you will be there in no time ;)

Nava2

2009-10-11 09:38:23

Nope, you really need to take a look at standards.

Most of you code is from ACA. As well, your code is far from organized.

Finally, I believe that you need to work on localizing and passing of parameters. Global variables in general are a no no. Pass variables as parameters, its much better practice and leaves little chance for unknowingly changing variables etc.

tl;dr: no.

noidea

2009-10-11 09:55:47

1/2 of your code is ACA, you have minimal fail saves. For example: It's inevitable your walking procedures will fail, just due to the fact that 1) there are no fail saves, and you're using mouseflag, which mouse.
I dont see how it could get to where it needs to go.

Good luck. Try and learn custom TPA's and their uses :)
no

JAD

2009-10-18 14:47:34

In barter,


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;

You declare the bitmaps before checking if not logged. This is bad because it will exit the procedure without freeing the bitmaps if you weren't logged in. Try checking it before like so:

if(not(loggedin))then exit;
rok := BitmapFromString(7, 8, 'beNrzMzfRlHUxU3OzUPe20fK10w5' +
'y0gOS5jryQEEPK02gYICDboizPpC01FNAVhbpbgQkbQyU4MrCXA1i' +
'vUyAiu2NlJGVxfuYpgZaAg0EisCVAUWACGggUBCoJdrTGMhNDrAAI' +
'rhpEG6in3kiABt/KeY=');
gstorewin := BitmapFromString(7, 10, 'beNqz0dFUFLA2UQ72sYkJ' +
'dXG2AXGlhFmMdWTyMyIWz+kBoprSVHcHA2UZHqAaiAgQdTYVJUZ5A' +
'pUBtQDFM5OCgAjIAHKBgkAtRdnREEE4gggCdQER0C6gYh9XU6Ag0C' +
'JkQaBduASBhsAFgXqBdkFsgQhCDHQGADr4RYE=');
x := mscx;
y := mscy;


Also, you have a begin/end right in the middle of nowhere after if not logged in then Exit. Fixed some stuff:

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))
closewindow;
makecompass('s')
arrangeinv;
wait(1000+random(100))
end;
end;
end;
freebitmap(rok);
freebitmap(gstorewin);

Your semicolons are missing after a lot of functions/procedures, and it's not consistent. It's good practice to put them after all. I also moved your FreeBitmaps down to the bottom of the procedure, because the way you had it, they were only freed under certain conditions (and we want to free them)

You also forgot to free your gstorewin bitmap, so I added that.


After moving the mouse and checking the uptext, you have:

mouse(tpa[0].x, tpa[0].y, 3, 3,false);

Why would we want to click at a different spot then we moved the mouse to? You did a GetMousePos(x,y) because that's where we found the object at, so you should do:

Mouse(x,y,0,0,false);


After clicking the mouse:

mouse(x,y,0,0,false); //Changed to what I showed above
wait(500+random(500))
waitoption('rade', 200 + random(100));

That random wait is unnecessary. Just add a longer wait period to the WaitOption like so:

mouse(x,y,0,0,false); //Changed to what I showed above
waitoption('rade', 700 + random(600));

That will have the same effect, except it will click the option right when it finds it, which is ideal.



repeat
wait(3000+random(500));
until(FindBitmapToleranceIn(gstorewin, x, y, MSX1, MSY1, MSX2, MSY2, 20)) or (TimeFromMark(N) >= 20000)

That's a really long wait there in the repeat until. If the gstorewin pops up at a normal rate, the script will go on to wait an additional 2 and a half seconds or more. Try simply doing:


repeat
wait(500+random(300));
until(FindBitmapToleranceIn(gstorewin, x, y, MSX1, MSY1, MSX2, MSY2, 20)) or (TimeFromMark(N) >= 20000+random(5000))

Also added a randomness to the TimeFromMark check just to be safe.


Here:

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))

Shouldn't you check some uptext before right clicking? Also a WaitOption would probably be better in case of lag. What if it always finds the bitmap with tolerance rok? Fail safe? Try adding a MarkTime fail safe here so to avoid the infinite loop.



If(FindBitmapToleranceIn(rok, x, y, MIX1, MIY1, MIX2, MIY2, 20))then

What if it didn't find that bitmap? We could try searching for a color instead as a fail safe or using a DTM?



In walktomsym, what if it didn't find the symbol mine? You should also turn this into a function:

function walktomsym: Boolean;
begin
if(not(loggedin))then exit;
Result := FindSymbol(x,y,'mine');
if(Result)then
begin
mouse(x,y,3,3,true)
flag;
end;
end;

Now you can later do like

if(not(walktomsym))then
begin
Logout;
Exit;
end;
Or something like that.

In walktomsym, you could also try a loop and continually decrease the symbol accuracy until the script finds it. You could also try a DDTM to walk there as a fail safe as well. Pretty much, if the symbol is covered/not found, the script will be over with.

In WalkToMine, you just do coordinates clicking? And with very little randomness.. This would be very detectable. Try using RadialWalking, DDTMs or TPAs to walk instead of coordinates clicking.


In DropIt:

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)))

Another possible infinite loop. I'd also consider checking the uptext.


In MineIt, things like:

and (Players[currentplayer].booleans[0]=true) then

Could simply be:

and (Players[currentplayer].booleans[0]) then


Again in MineIt, this:

mouse(x,y,3,3,false);

Should have 0,0 as the randomness parameters.


In WalkIt, you should really use some fail safes with those radial walks. What if it didn't radial walk? Should you use some tolerance? Could you use a DDTM (or other means) back up?



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;

That is very ugly. Try:

procedure invcheck;
begin
if(not(loggedin)) or not(InvFull) then exit;
If(Players[currentplayer].booleans[0]) then
Dropit else
walkit;
end;

Much cleaner right? And it will do the exact same thing


In SendEmail:

if (Email > '') then Result := true
else
begin
Result := false;
Writeln('Emailing User Failed!');
end;

Could just be:

Result := (Email > '');
if not(Result)then
Writeln('Emailing User Failed!');


In ScriptTerminate:

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;

Could just be:

Writeln('|Mined ' + LowerCase(Players[CurrentPlayer].Strings[0]) + '!');
if(Players[currentplayer].booleans[0])then
writeln('|Powermined') else
writeln('|Mined and sold');



In LogChecker:

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;

That will never execute the second if then check. Because the else indicates that it will only do it if loggedin, and that if then requires it to not be loggedin. Get what I'm saying? I think what you meant was:

Result := false;
if(not(loggedin))then
begin
writeln('randomly logged out,switching');
nextplayer(false);
result:=true;
end;
if(allplayersinactive)then
begin
writeln('randomly logged out and no more players, done');
terminatescript;
Result := true;
end;

Something more along those lines.



In the mainloop:

repeat
logchecker;
findnormalrandoms;
mineit;
invcheck;
findnormalrandoms;
logchecker;
until(loads >= Players[CurrentPlayer].Integers[0])

What if the user got logged out? You should put a:

if not LoggedIn then NextPlayer(False);

Here, or a:

if not LoggedIn then Break;

Or something. Otherwise, it could be an infinite loop.



It does not look as if you will be getting in, but fix at least some of the things I told you, and the things other members told you above. I'm sure you'll get in next time if you just fix this script up some more.

Good luck next time!
~JAD

Dynamite

2009-10-18 18:07:37

[kinda offtopic]In this case am I allowed to rep+ JAD foe AWESOME feedback?[/offtopic]
No from me, based off jads feedback

YoHoJo

2009-10-19 00:10:00

TheMan: Of course that's OK. Jad is The Man! :D haww

marpis

2009-10-21 01:48:41

No.

Lack of failsafes, and overall to simple. You use FindColorSpiralTolerance instead of TPAs and I doubt that the walking works for more than few loads.
Can't write better arguments now, g2g to school :P JAD already said pretty much what I had in mind.

Don't give up, try again! :)

RAM

2009-10-22 13:02:16

From: Junior
…. my brother sucked me back into SCAR. I didnt even think about it until i seen the bulldozer on my desktop im like WTF?! Ahhh memories…


You have a great teacher living in the same house with you !!!…offer to do his chores for a week and make him teach you !!!!

Best of Luck,

~RAM

Simtoon

2009-10-22 18:03:01

wait wait Junior is Junkj's brother?

JAD

2009-10-22 18:37:18

From: Simtoon
wait wait Junior is Junkj's brother?


Yes he is.

TRiLeZ

2009-10-22 22:20:40

TIME TO EXAMINE!

ChooseOption('examine script');

Barter:

Change

var tpa : tpointarray;
var rok,gstorewin :integer;
To

var
TPA: TPointArray;
Rok, Gstorewin: Integer;



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;

These bitmaps will never be free'd if the acc is logged out when going into this procedure, try checking if not logged in at the top.


Good to see some bitmaps :)

You don't really need the begin after if(not(loggedin))then exit;

You forgot to add semi-colons after

makecompass('w')
setangle(true)

You are using FindColorsSpiralTolerance like FindColorSpiralTolerance. Only one color is checked out… to fix this, put in:


for I := 0 to High(TPA) do
begin
//Code
end;

Then replace all "tpa[0]" with "TPA".


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;

That will cause an error; it will keep clicking one spot until the character is logged out. Try repacing the repeat with:


while FindBitmapToleranceIn(rok, x, y, MIX1, MIY1, MIX2, MIY2, 20) do

The bitmap "gstorewin" is never free'd.


Dropit:


rok := BitmapFromString(7, 8, 'beNrzMzfRlHUxU3OzUPe20fK10w5' +
'y0gOS5jryQEEPK02gYICDboizPpC01FNAVhbpbgQkbQyU4MrCXA1i' +
'vUyAiu2NlJGVxfuYpgZaAg0EisCVAUWACGggUBCoJdrTGMhNDrAAI' +
'rhpEG6in3kiABt/KeY=');
if(not(loggedin))then exit;

The bitmap is never free'd if the acc is logged out when going into this procedure. Try checking if the acc is logged out at the beginning of the procedure.


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;

That will cause an error; it will keep clicking one spot until the character is logged out. Try repacing the repeat with:


while FindBitmapToleranceIn(rok, x, y, MIX1, MIY1, MIX2, MIY2, 20) do
begin
//Code
end;

MineIt:


if(invfull) and (Players[currentplayer].booleans[0]=true) then dropit;

Can be changed to


if(InvFull) and (Players[currentplayer].booleans[0]) then DropIt;

Also, what happens when the user wants to sell the ores? The script will just try to mine the ore anyways…

WalkIt:

Your radial road walking uses constant colours… for your walking to work, the road color must be the color you specified. Try replacing the constant color with an auto colour function.

Overall:

Bitmaps
No DTMs
MultiPlayer
AntiRandoms
AntiBan
TPAs
Bad Standards

Sorry, but it's a no from me. The script has too many errors.

Sir R. M8gic1an

2009-10-27 05:56:58

I'm sorry but it seems like you won'tquite make it this time yet. Practice makes perfect.

~RM