Jump to content
wyn10

How to use Auto Color Aid.

Recommended Posts

Auto Color Aid (ACA)

By: wyn10

 

 

Auto Color Aid (ACA) is known for getting selecting the best color out of an object. ACA is stored in OSI/Tools for anyone to use.

 

 

Before opening ACA, you need to be logged into Rs with the object you are trying to find, and Alt+Printscreen shown here...

 

uskeyb.gif

 

 

Paste the image in Paint and save it as a 24-bit bitmap. Now the fun part.

 

Open ACA, which is in Includes\OSI\Tools. You get something like this...

 

89154524.png

 

 

What you want to do now is go into the client Menu on the top-left, and choose Load Bitmap. Select the image you saved earlier in paint.

 

 

Here's a example of what it should look like...(I have cropped my image beforehand within paint, so it's easier to work with)

 

90330551.png

 

Now on the bottom right, Under CTS, choose 2. As it's the most common/accurate.

 

Now start clicking the image to gather color points of the Object; 6-7 should be plenty, make sure to follow the detail window near the center to know you're still within boundaries of your object you're trying to find.

 

After choosing your points, make sure you delete your duplicates by right clicking your first number in the list on the right, and selecting Delete duplicates.

 

In my example image I will be getting the chest using the Silver/White outline. When you select "Mark best color" and red is covering only what you want, you've found the right color.

 

Here's my result for my example image. Notice red is only covering what I need.

 

96805128.png

 

See 11119539 under Color and tolerences? That is the color we are gonna use. The tolerance of the color is shown on the bottom right, above CTS.

 

A perfect example for object finding is under Includes\OSI\RS2\Extended\Object.scar named FindObjSize.

 

Using FindObjSize we can find the color using the parameters....

FindObjSize(var X, Y: Integer; Color, Tol, Width, Height: Integer; UpText: TStringArray): Boolean;

 

Utilzing these parameters (I hope you can play with them yourself) I find the object perfectly with FindObjSize(x, y, 11119539, 13, 32, 35, ['chest', 'hest'])

 

 

I hope you learned on how to properly use ACA with this guide.

Edited by wyn10
Link to comment
Share on other sites

ok soooo i think i am doing this right but not too sure.. Can u make sure i am?

 

 

I have this code after finding the colors:

 

ColorToleranceSpeed(7);
SetColorSpeed2Modifiers(0.15, 0.79);
 if FindColorsTolerance(TPA, 2181720, MSX1, MSY1, MSX2, MSY2, 7) then

 

 

seeeeee.png

 

 

 

 

AM i correct or is this wrong? if its wrong can u help me out and give me the correct code please:/

Link to comment
Share on other sites

ok soooo i think i am doing this right but not too sure.. Can u make sure i am?

 

 

I have this code after finding the colors:

 

ColorToleranceSpeed(7);
SetColorSpeed2Modifiers(0.15, 0.79);
 if FindColorsTolerance(TPA, 2181720, MSX1, MSY1, MSX2, MSY2, 7) then

 

 

Image was here

 

AM i correct or is this wrong? if its wrong can u help me out and give me the correct code please:/

 

Size of the object you are picking I would suggest the method I used as a example. As it shows you would use the color 3891320 with a tolerance of 7 with you're method.

 

ColorToleranceSpeed(2); //If it's not found it will increase the tolerance by two, so don't make it extremely high or it's gonna pick up other objects.
SetColorSpeed2Modifiers(0.15, 0.79);
if FindColorsTolerance(TPA, 2181720, MSX1, MSY1, MSX2, MSY2, 7) then //Change 2181720 to the number ACA put out...3891320, 7 is correct as it's the tolerance for the color.

 

If you do use FindColors though make sure to add a uptext check so you know its clicking the right thing.

Edited by wyn10
Link to comment
Share on other sites

oook soo i did it again with different color codes of cource.. NOOWW this is my code:

 

procedure FindNPC;
var
 w, h: Integer;
 x, y: Integer;
 TPA: TPointArray;
begin
GetClientDimensions(w, h);
Begin
ColorToleranceSpeed(2);
if FindColorsTolerance(TPA, 4220802, MSX1, MSY1, MSX2, MSY2, 8) then
   WriteLn('Found Chicken NPC: ' + IntToStr(x) + ', ' + IntToStr(y));
       MMouse(x, y, 1, 1);
       Wait(100 + Random(200));
end;
end;

 

 

BUUUTT it will never find a chicken :/

Link to comment
Share on other sites

alriight sooo if my X and Y are nulled variables can u help me out and fix em sooo they work i guess:/ Here is my WHHOOLLEE code so nothign gets messed up:

 

//SCRIPT CREATED BY: Bryce7

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}

{.include OSI\OSI.scar}
{.include OSI\RS2\Extended\Timing.scar}
{.include OSI\RS2\Misc\Anti-Ban.scar}

const
version = '0.1';//Do NOT Touch
yupp = 0;//Do NOT Touch


var x, y: Integer;

procedure ScriptTerminate;
begin
 FreeOSI;
end;

procedure StartUp;
begin
WriteLn('--------------------------------------------------------------');
WriteLn('');
WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
WriteLn('');
WriteLn('Always make sure you have the latest version:)');
WriteLn('');
WriteLn('--------------------------------------------------------------');
 ClickCompass(True);
 Wait(200 + Random(500));
end;

procedure RandomMice;
var x, y: Integer;
begin
 x := Random(400);
   Wait(250 + Random(150));
 y := Random(300);
   Wait(50);
 MoveWindMouse(x, y, 25, 25);
   Wait(450 + Random(350));
   WriteLn('ANTIBAN: Randomly moving mouse.');
end;

procedure ClickIt;
var
 x, y: Integer;
 begin
 if IsUpTextMulti(['Attack', 'Att','ack']) then
     SmartGetMousePos(x, y);
     Mouse(x, y, 1, 1, True);
     Wait(2300 + Random(2800));
if Random(3) = 0then
begin
RandomMice;
Wait(35 + Random(100));
end;
     end;

procedure FindNPC;
var
 w, h: Integer;
 x, y: Integer;
 TPA: TPointArray;
begin
GetClientDimensions(w, h);
Begin
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.14, 0.72);
if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then
   WriteLn('Found Chicken NPC: ' + IntToStr(x) + ', ' + IntToStr(y));
       MMouse(x, y, 1, 1);
       Wait(100 + Random(200));
end;
end;





begin
 SetupOSI;
repeat
   StartUp;
   FindNPC;
   ClickIt;
 until False;
end.

Link to comment
Share on other sites

alriight sooo if my X and Y are nulled variables can u help me out and fix em sooo they work i guess:/ Here is my WHHOOLLEE code so nothign gets messed up:

 

The TPA just holds the coordinate of every instance of the color it found. This will select a random point for you:

 

//SCRIPT CREATED BY: Bryce7

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}

{.include OSI\OSI.scar}
{.include OSI\RS2\Extended\Timing.scar}
{.include OSI\RS2\Misc\Anti-Ban.scar}

const
version = '0.1';//Do NOT Touch
yupp = 0;//Do NOT Touch


var x, y: Integer;

procedure ScriptTerminate;
begin
 FreeOSI;
end;

procedure StartUp;
begin
WriteLn('--------------------------------------------------------------');
WriteLn('');
WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
WriteLn('');
WriteLn('Always make sure you have the latest version:)');
WriteLn('');
WriteLn('--------------------------------------------------------------');
 ClickCompass(True);
 Wait(200 + Random(500));
end;

procedure RandomMice;
var x, y: Integer;
begin
 x := Random(400);
   Wait(250 + Random(150));
 y := Random(300);
   Wait(50);
 MoveWindMouse(x, y, 25, 25);
   Wait(450 + Random(350));
   WriteLn('ANTIBAN: Randomly moving mouse.');
end;

procedure ClickIt;
var
 x, y: Integer;
 begin
 if IsUpTextMulti(['Attack', 'Att','ack']) then
     SmartGetMousePos(x, y);
     Mouse(x, y, 1, 1, True);
     Wait(2300 + Random(2800));
if Random(3) = 0then
begin
RandomMice;
Wait(35 + Random(100));
end;
     end;

procedure FindNPC;
var
 w, h: Integer;
 p: TPoint;
 TPA: TPointArray;
begin
GetClientDimensions(w, h);
begin
 ColorToleranceSpeed(2);
 SetColorspeed2Modifiers(0.14, 0.72);
 if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then
 begin
   p := TPA[Random(Length(TPA))];
   WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y));
 end;
 MMouse(x, y, 1, 1);
 Wait(100 + Random(200));
end;
end;





begin
 SetupOSI;
repeat
   StartUp;
   FindNPC;
   ClickIt;
 until False;
end.

Link to comment
Share on other sites

The TPA just holds the coordinate of every instance of the color it found. This will select a random point for you:

 

//SCRIPT CREATED BY: Bryce7

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}

{.include OSI\OSI.scar}
{.include OSI\RS2\Extended\Timing.scar}
{.include OSI\RS2\Misc\Anti-Ban.scar}

const
version = '0.1';//Do NOT Touch
yupp = 0;//Do NOT Touch


var x, y: Integer;

procedure ScriptTerminate;
begin
 FreeOSI;
end;

procedure StartUp;
begin
WriteLn('--------------------------------------------------------------');
WriteLn('');
WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
WriteLn('');
WriteLn('Always make sure you have the latest version:)');
WriteLn('');
WriteLn('--------------------------------------------------------------');
 ClickCompass(True);
 Wait(200 + Random(500));
end;

procedure RandomMice;
var x, y: Integer;
begin
 x := Random(400);
   Wait(250 + Random(150));
 y := Random(300);
   Wait(50);
 MoveWindMouse(x, y, 25, 25);
   Wait(450 + Random(350));
   WriteLn('ANTIBAN: Randomly moving mouse.');
end;

procedure ClickIt;
var
 x, y: Integer;
 begin
 if IsUpTextMulti(['Attack', 'Att','ack']) then
     SmartGetMousePos(x, y);
     Mouse(x, y, 1, 1, True);
     Wait(2300 + Random(2800));
if Random(3) = 0then
begin
RandomMice;
Wait(35 + Random(100));
end;
     end;

procedure FindNPC;
var
 w, h: Integer;
 p: TPoint;
 TPA: TPointArray;
begin
GetClientDimensions(w, h);
begin
 ColorToleranceSpeed(2);
 SetColorspeed2Modifiers(0.14, 0.72);
 if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then
 begin
   p := TPA[Random(Length(TPA))];
   WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y));
 end;
 MMouse(x, y, 1, 1);
 Wait(100 + Random(200));
end;
end;





begin
 SetupOSI;
repeat
   StartUp;
   FindNPC;
   ClickIt;
 until False;
end.

 

Normal GetMousePos works fine in smart. :P

 

Also GetClientDimensions(w, h); isn't needed as you're already looking for the color in the MainScreen.

Edited by wyn10
Link to comment
Share on other sites

sweeeettt love ya freedy, wanted, and wyn10 <3 :) buuutt noww it perfectly sees the chickens and says its found chicken at (its X and its Y) buuutt does not click it now:'( annndd i have absolutely NOO clue y its not? sooo this is what im getting and it does not click the chcikens:

 

Found Chicken NPC: 134, 331
Found Chicken NPC: 180, 210
ANTIBAN: Randomly moving mouse.
Found Chicken NPC: 114, 326

 

 

 

AND HERE IS MY WHOLE SCRIPT CODE:

 

//SCRIPT CREATED BY: Bryce7

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}

{.include OSI\OSI.scar}
{.include OSI\RS2\Extended\Timing.scar}
{.include OSI\RS2\Misc\Anti-Ban.scar}

const
version = '0.1';//Do NOT Touch

var x, y, yupp: Integer;

procedure ScriptTerminate;
begin
 FreeOSI;
end;

procedure StartUp;
begin
 if(yupp = 0) then
 begin
WriteLn('--------------------------------------------------------------');
WriteLn('');
WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
WriteLn('');
WriteLn('Always make sure you have the latest version:)');
WriteLn('');
WriteLn('--------------------------------------------------------------');
 yupp:= 1;
 end;
 ClickCompass(True);
 Wait(200 + Random(500));
end;

procedure RandomMice;
var x, y: Integer;
begin
 x := Random(400);
   Wait(250 + Random(150));
 y := Random(300);
   Wait(50);
 MoveWindMouse(x, y, 25, 25);
   Wait(450 + Random(350));
   WriteLn('ANTIBAN: Randomly moving mouse.');
end;

procedure ClickIt;
var
 x, y: Integer;
 begin
 if IsUpTextMulti(['Attack', 'Att','ack']) then
     SmartGetMousePos(x, y);
     Mouse(x, y, 1, 1, True);
     Wait(2300 + Random(2800));
if Random(3) = 0then
begin
RandomMice;
Wait(35 + Random(100));
end;
     end;

procedure FindNPC;
var
 w, h: Integer;
 p: TPoint;
 TPA: TPointArray;
begin
GetClientDimensions(w, h);
begin
 ColorToleranceSpeed(2);
 SetColorspeed2Modifiers(0.14, 0.72);
 if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then
 begin
   p := TPA[Random(Length(TPA))];
   WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y));
 end;
 MMouse(x, y, 1, 1);
 Wait(100 + Random(200));
 ClickIt;
end;
end;





begin
 SetupOSI;
repeat
   StartUp;
   FindNPC;
   //ClickIt;
 until False;
end.

Link to comment
Share on other sites

//SCRIPT CREATED BY: Bryce7

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
{$DEFINE SMART}

{.include OSI\OSI.scar}
{.include OSI\RS2\Extended\Timing.scar}
{.include OSI\RS2\Misc\Anti-Ban.scar}

const
version = '0.1';//Do NOT Touch

var
 x, y, yupp: Integer;

procedure ScriptTerminate;
begin
 FreeOSI;
end;

procedure StartUp;
begin
 if(yupp = 0) then
 begin
   WriteLn('--------------------------------------------------------------');
   WriteLn('');
   WriteLn('-> YOU ARE RUNNING ON VERSION: ' + version);
   WriteLn('');
   WriteLn('Always make sure you have the latest version:)');
   WriteLn('');
   WriteLn('--------------------------------------------------------------');
   yupp:= 1;
 end;
 ClickCompass(True);
 Wait(200 + Random(500));
end;

procedure RandomMice;
var
 x, y: Integer;
begin
 x := Random(400);
 Wait(250 + Random(150));
 y := Random(300);
 Wait(50);
 MoveWindMouse(x, y, 25, 25);
 Wait(450 + Random(350));
 WriteLn('ANTIBAN: Randomly moving mouse.');
end;

procedure ClickIt;
var
 x, y: Integer;
begin
 if IsUpTextMulti(['Attack', 'Att','ack']) then
 begin
   SmartGetMousePos(x, y);
   Mouse(x, y, 1, 1, True);
   Wait(2300 + Random(2800));
 end;
 if Random(3) = 0 then
 begin
   RandomMice;
   Wait(35 + Random(100));
 end;
end;

procedure FindNPC;
var
 w, h: Integer;
 p: TPoint;
 TPA: TPointArray;
begin
 GetClientDimensions(w, h);
 begin
   ColorToleranceSpeed(2);
   SetColorspeed2Modifiers(0.14, 0.72);
   if FindColorsTolerance(TPA, 4090493, MSX1, MSY1, MSX2, MSY2, 8) then
   begin
     p := TPA[Random(Length(TPA))];
     WriteLn('Found Chicken NPC: ' + IntToStr(p.x) + ', ' + IntToStr(p.y));
     MMouse(x, y, 0, 0);
     Wait(100 + Random(200));
     ClickIt;
   end;
 end;
end;

begin
 SetupOSI;
 repeat
   StartUp;
   FindNPC;
   //ClickIt;
 until False;
end.

 

Please watch this while you're at it:

Link to comment
Share on other sites

ok thanks freddy, iknow how to indent and everything buutt it still wont click the chickens or move the mouse over them :( maayyybee something under the ClickIt procedure like:

   SmartGetMousePos(x, y);
   Mouse(x, y, 1, 1, True);

 

because im thinking the X and Y are just set as 0 or something and the mouse stays at the at 0,0 not doing anything... Sooo is there a way to fix it and make the mouse go to the chickens coordinates and click it. please

Link to comment
Share on other sites

It was written by Nielsie95 ^ and Sumilion @ the SRL forums for SCAR. I started integrating the tool into SCAR 2 years ago, but I never finished, however, I picked up the development again a bit back, rewriting most from scratch to fit SCAR better, so with some luck you'll find most of the functionality in ACA in SCAR in the near future.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...