SRL Archive - Applications

Checking for: Scar Assistant and ACA2


Sir R. M8gic1an

2009-02-15 06:38:04

Not too long ago there was an app that went from being (yes)15 - 3(no) to being 5(yes) - 13(no). Why was this? Most SRL Members didn't recognize Procedures made by Scar Assistant and thus thought the applicant had done some really nice TPAs.

So I thought i'd post an example from both ACA2 and Scar Assistant as i would find it normal that SRL Members only use one of them as they serve the same purpose.


Autocolor By Scar Assistant

function AutoColor: Integer;
var
I, R, G, B, Len, TestColor: Integer;
H, S, L, X, Y, Z: Extended;
P: TPointArray;

begin
Result := -1;
FFlag(0);
FindColorsSpiralTolerance(MMCX, MMCY, P, 5406572, MMX1, MMY1, MMX2, MMY2, 60);
Len := High(P);
for I := 0 to Len do
if RS_OnMinimap(P[I].X, P[I].Y) then
begin
TestColor := GetColor(P[I].X, P[I].Y);
ColorToRGB(TestColor, R, G, B);
if InRange(R - B, 6, 46) then
if InRange(R - G, -39, 1) then
if InRange(G - B, 25, 65) then
begin
ColorToHSL(TestColor, H, S, L);
if InRange(Round(H - L), -32, -2) then
if InRange(Round(S - H), -17, 13) then
if InRange(Round(S - L), -34, -4) then
begin
ColorToXYZ(TestColor, X, Y, Z);
if InRange(Round(X - Y), -11, 3) then
if InRange(Round(Y - Z), 1, 15) then
begin
Result := TestColor;
Exit;
end;
end;
end;
end;
WriteLn('Autocolor did not find the color.');
end;

begin
SetUpSRL;
ActivateClient;
Wait(300 + Random(450));
WriteLn('AutoColor = ' + IntToStr(AutoColor));
Disguise('Done.');
end.

Autocolor by ACA2

program AutoColor;
{.include SRL\SRL.scar}

function AutoColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 5271393, MMX1, MMY1, MMX2, MMY2, 57);
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
if (rs_OnMinimap(arP[i].x, arP[i].y)) then
begin
ColorToRGB(arC[i], R, G, B);

if (R >= 64) and (R <= 130) and (G >= 77) and (G <= 145) and (B >= 47) and (B <= 112) then
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 21.01) and (H <= 26.36) and (S >= 12.92) and (S <= 24.52) and (L >= 24.69) and (L <= 50.02) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 5.42) and (X <= 21.92) and (Y >= 6.77) and (Y <= 25.78) and (Z >= 3.80) and (Z <= 18.87) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

begin
SetupSRL;
AutoColor;
end.


FindObject by Scar Assistant

function AutoColor: Boolean;
var
I, R, G, B, Len, TestColor: Integer;
H, S, L, X, Y, Z: Extended;
P: TPointArray;

begin
Result := False;
FFlag(0);
FindColorsSpiralTolerance(MMCX, MMCY, P, 5406572, MMX1, MMY1, MMX2, MMY2, 60);
Len := High(P);
for I := 0 to Len do
if RS_OnMinimap(P[I].X, P[I].Y) then
begin
TestColor := GetColor(P[I].X, P[I].Y);
ColorToRGB(TestColor, R, G, B);
if InRange(R - B, 6, 46) then
if InRange(R - G, -39, 1) then
if InRange(G - B, 25, 65) then
begin
ColorToHSL(TestColor, H, S, L);
if InRange(Round(H - L), -32, -2) then
if InRange(Round(S - H), -17, 13) then
if InRange(Round(S - L), -34, -4) then
begin
ColorToXYZ(TestColor, X, Y, Z);
if InRange(Round(X - Y), -11, 3) then
if InRange(Round(Y - Z), 1, 15) then
begin
Mouse(P[I].X, P[I].Y, 6, 6, True);
Result := True;
Exit;
end;
end;
end;
end;
WriteLn('Autocolor did not find the color.');
end;

FindObject by ACA2

function FindObject(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.22, 0.47);

if not(FindColorsTolerance(arP, 5075298, MSX1, MSY1, MSX2, MSY2, 13)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);

for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);

if (R >= 64) and (R <= 130) and (G >= 77) and (G <= 145) and (B >= 47) and (B <= 112) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 5.42) and (X <= 21.92) and (Y >= 6.77) and (Y <= 25.78) and (Z >= 3.80) and (Z <= 18.87) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;

SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);

for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Take')) then
begin;
Result := True;
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;

GetMousePos(fx, fy);
end;


hope you have a close look and remember these the next time you vote. I am not saying applicants should not use ACA or Scar Assistant, that is up to each of you to decide. But at least now none of you will think something that is untrue.

~RM

jakeyboy29

2009-02-15 07:06:34

scar assist is a good way to learn, should be used for members tho.

Iron Man

2009-02-15 08:20:50

From: jakeyboy29
scar assist is a good way to learn, should be used for members tho.


Care to elaborate on why it should be used for members applications?

I'm kind of wondering how much time people are spending looking at the application before voting. He even credited saying the TPA's were made by SCAR Assistant, so I was surprised people were voting yes including TPA's being one of the reasons why they voted that way (I forgot apparently, but the credits weren't there at first as I have heard, but I think some people voted yes even though it was pointed out it wasn't made by him). I can understand if they didn't see what ACA & SCAR Assistant looked like before with him also "accidentally" forgetting to credit them both. People re-looked at the application and found this out and changed their vote, but isn't it better to have voters that notice this in the first place?

The script doesn't look like it would work too good because of the reasons that were already posted in the thread, but that was the reason for the thread itself. It kind of seems that the sight of TPA's/Autocoloring/DDTM's/DTM's seem to distract people from the rest of the script. I know TPA's etc show good knowledge; but it shouldn't be an automatic yes because they included them. Personally, I think it should depend on them having good knowledge of most parts of SRL, not just a small part which can be confusing to a few people; and of course the applicant themselves are reason to vote according to attitude. I personally think he had a good attitude for taking advice, so maybe some people voted yes on that (although I never noticed anyone saying yes because of that).

It's also possible that the users didn't look at the comments, or thought SCAR Assistant was a small part of it. But I suppose with you posting examples they won't make the same mistake. :)

Magiic

2009-02-15 10:42:37

i posted this on one of the things i believe, how it should have a maqrk or someway of telling that it's made by scar assistant

P1nky

2009-02-15 12:54:42

From: jakeyboy29
scar assist is a good way to learn, should be used for members tho.


i dont really think its a learning material tho i agree should/must be for members.

Sir R. M8gic1an

2009-02-15 15:15:58

From: ~~Joker~~
i dont really think its a learning material tho i agree should/must be for members.



It is learning material if people use the code to learn from it. Members or not is up to EC, Nielsie and Sumilion not any of us. If the reason to make it members only is so that you don't have to check for it at applications it is just a lame excuse to be lazy.

It's like saying RadialWalkAid by yakman should be members only because people should learn the angle from the top of their heads. It helps learning RW when you have yakman's helper at your side because it makes it easier to understand the concept of angles and radius on rs scripting.

In "normal" math the angle 0ยบ is not facing north, it is actually facing east. Using Yakman's RWAid makes it easier to realize that.

Also, many people learn from looking at other people's code. I learnt and learn that way. So yes, if you made ACA and Scar Assistant members only you'd take a learning tool from me if I was still a junior member.


This sticky is just here to raise awareness of Scar Aider and ACA2 being used in applications. It's here so next time it happens people will know that a certain procedure was not made by the person. It's not for you to say no, you used ACA, just for you to know: "Oh, maybe his scripting is not so advanced in terms of TPAs as i first thought".

Then again, i use ACA very often, sometimes even just copy paste out of it, and i doubt anyone would say "you don't know how to use TPAs" to me. So take that into consideration too.


On that final note, i shall close this thread and if you wish to carry on the discussion of ACA and Scar Aider being a learning tool or not, please do so in General Discussions.

~RM