SRL Archive - Unofficial Development

[ACA]AutoColorAid v2 - by Nielsie95 and Sumilion


Sumilion

2008-03-04 09:17:20

Auto Color Aid v2

by Nielsie95 and Sumilion

Written in Delphi


UPDATE
This is an outdated program. Please refer to the ACA extension or the remake by CynicRus.


History
AutoColorAid v1 was written in scar, mainly by Nielsie95 and it was released on 07-02-2007. At that time it only had one function, enter a variable number of colors from an object (e.g. a symbol on the minimap) and it would give you a function that would automatically get the exact color from RS. While everything was working fine as it should, there were numerous things that could be improved. Slowly ACA v1 expanded to what some of you might know today, a tool with multiple functionalities, written in scar with a form. One of the most important parts that could be improved, was that it was written in scar. While normal script for RS pretty much demand Scar, this tool did not and running it in scar only made it slow and inconvenient. Thus a goal was set, write it in Delphi, better and nicer than ever!

ACA today
Niels and I teamed up to make what would soon be named ACA v2, in Delphi. We had all the time we needed since we both had vacation at the time we teamed up. We wanted to have first of all have all the features from ACA v1 and maybe even more. At the time of release, our vacations are over, meaning less time to work on it. Luckily it is already finished.

Features
  • Color value viewer (RGB, HSL, XYZ values)
  • Color range table (Minimum R, Maximum R, Minimum G, Maximum G, etc.)
  • Tolerance calculator - will be explained below
  • Optionable ColorToleranceSpeed - will be explained below
  • Client window - a image copied from your screen, allowing you to pick colors from it
  • Color Marking - will be explained below
  • Custom search area for Marking Colors
  • Bitmap saving - save your image
  • Bitmap loading - load a bitmap in ACA
  • AutoColor function creator - will be explained below
  • FindObject function creator - will be explained below
  • Option for RGB / HSL / XYZ range check in both functions
  • Save colors in an .ACA file (and load them aswell)
  • Client finder (and a RS Finder) - will set the image to the client

ColorToleranceSpeed
There are several methods to determine if 2 colors are similar. Currently there are 3.
  • 0: RGB - very similar to CTS 1, but the method of checking if the RGB values are similar is different. Faster, but slightly less accurate
  • 1: RGB -Accurate, gets the Red, Green and Blue values of the 2 colors and compares these to eachother
  • 2: HSL, this method uses Hue, Saturation and Luminence values to determine if 2 colors are similar

Tolerance Calculator
Using Scar's method of determining if 2 colors a similar, ACA can calculate the tolerance needed to validate with all of the colors selected. It displays this amount in several places in ACA.

Marking of Colors
When you use FindColors in scar, or any other way of finding colors on the client, it is hard to see what scar found. There are certain methods around so that it will save the result as a bitmap, or that it will show the results in Scar's bitmap image, ACA features something similar. It has the ability to color all found points on the image in ACA. This way ACA visualises what it finds, and seeing as ACA's method of finding it is the same as Scar's, it also shows what scar sees.

Example :


function AutoColor: Integer;
One of the best features in ACA, which was the only feature of ACA v1 first release, is the ability to print out a ready to use AutoColor function for the colors that you filled in. Basically you fill in a couple of colors in ACA, select with what methods you want to validate the color, and then ACA produces the function for you.

Methods of validating
  • RGB-Check : It will test all found results (using the selected ColorToleranceSpeed) to it's Red, Green and Blue values. The colors found have to be within the range of the Red Green and Blue values previously filled in by the user.
  • HSL-Check : Same as RGB-Check, only it checks for Hue, Saturation and Luminence values now.
  • XYZ-Check : Same as RGB-Check, but checks for XYZ values (XYZ values are another way of defining colors)
  • Example : Let's say you picked 2 colors and filled them in ACA, what kind of colors is not important. You check RGB-Check, so it will make sure that it searches for colors within the RGB Range of the 2 colors.
  • Red[Color1] = 10 Red[Color2] = 40 Green[Color1] = 100 Green[Color2] = 140 Blue[Color1] = 80 Blue[Color2] = 30 It will then, in the AutoColor function, also make sure that the found colors have a Red value between 10 and 40, a Green value between 100-140 and a Blue value between 30-80

function FindObject(var fx, fy: Integer);
The way of creating this function is very similar to creating AutoColor. There are a couple of differences. There is for starters one more Check Method. This is the Array Length. FindObject(); will search for an object on the MainScreen of RuneScape, it will put these values in a T2DPointArray. In human terms, it will find all possibly right object and store them location in a variable. This variable contains every point of the object, every set of points is stored in what you can imagine as a box. Every object that it finds gets it's own box, Array Length check will make sure that the box is not too small, so that it won't find a couple of pixels of relatively the same color on your armor for example. There is also an Edit box for the Up Text of your object, seems obvious what that does, and there is an Edit box for the max distance. This is the maximum distance that 2 points can have before Scar creates a new 'box' for the object. In the end Scar moves it's mouse through each box to see if the uptext is right.

Both functions…
are printed as scripts really. If you directly copy the content in Scar it can run it immediately. If you want to use the function in your script then copy the part starting from 'function AutoColor:Integer; / FindObject(var fx, fy: Integer):Boolean;' until the last 'end;' (notice the ';' there..)

Last part …
In the end you will just have to try it out a little to get used to it and test it's capabilities. If there are any bugs, don't hesitate to post them here.

nielsie95

2008-03-04 09:20:15

And there it is! Have fun with it, boys 'nd girls :)

*gives Sumilion the thumbs up*

PriSoner

2008-03-04 11:00:24

Looks good and looks like exactly what I was after. If only i'd have found it earlier.

Does exactly as it should, created the function i needed in no time.. brilliant. :D
Thank You Very Much!

ShowerThoughts

2008-03-04 11:02:43

Nice, now im going to read it xD

Edit:
very nice! cool looks!

ps. could i ask some things about delphi on msn?

Dumpin

2008-03-04 11:43:14

NICE!!!!!! :D thanks this is what i need :)

JuKKa

2008-03-04 12:02:16

bug bug bug!

  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;
Break;
Result := True;
end;
end;

shouldnt break be AFTER the result? oh and thats the findobj thing…

another thing

add to the autocolor in the for to do loop

If(Not rs_OnMinimap(arP.X, arP.Y))Then Continue;

please ;) when i tried it kept getting the compass color (close to it) when i wanted a ladder color..


and add a option to search outwards (spiral)

Negaal

2008-03-04 13:24:27

^- Told you nielsie. This thingy is wonderful though. Mastaraymond colors writelner is pwned now. xD

Just started to write a tutorial few hours ago, but you guys released it *so angry that is going to blow*

:p

Naum

2008-03-04 13:28:45

Cool sum.
I got to test it before of course …:p

mastaraymond

2008-03-04 13:59:52

From: Negaal
^- Told you nielsie. This thingy is wonderful though. Mastaraymond colors writelner is pwned now. xD

Just started to write a tutorial few hours ago, but you guys released it *so angry that is going to blow*

:p


Hell no :p. This one is based on SCAR Colors functions, while I mostly use my own color functions, thats why I created my writelner.
:p

Sumilion

2008-03-04 14:36:49

From: JuKKa
bug bug bug!

  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;
Break;
Result := True;
end;
end;

shouldnt break be AFTER the result? oh and thats the findobj thing…

another thing

add to the autocolor in the for to do loop

If(Not rs_OnMinimap(arP.X, arP.Y))Then Continue;

please ;) when i tried it kept getting the compass color (close to it) when i wanted a ladder color..


and add a option to search outwards (spiral)


Ah right, will work on all of your suggestions, not entirely sure on the spiral search but who knows :rolleyes:

JuKKa

2008-03-04 15:07:38

From: Sumilion
Ah right, will work on all of your suggestions, not entirely sure on the spiral search but who knows :rolleyes:

FindColorsSpiralTolerance(startx, starty, bla blaba)

or

SortTPA(TPA, Point(startx, starty));

something like that ;)

Sumilion

2008-03-04 15:14:14

From: JuKKa
FindColorsSpiralTolerance(startx, starty, bla blaba)

or

SortTPA(TPA, Point(startx, starty));

something like that ;)


Yes I know how to spiral search ;) I was not sure if I'd add it or not.

However I already added it. There was an open space in the AutoColor tab :p

Download the new uploaded package. There is no difference in the name.

oliver1205

2008-03-04 15:26:50

the attachment is invalid…

JuKKa

2008-03-04 15:36:32

works for me…

Sumilion

2008-03-04 15:47:11

Works for me too,

you like spiral feature ? :p and rs_OnMinimap ;)

JuKKa

2008-03-04 16:11:40

From: Sumilion
Works for me too,

you like spiral feature ? :p and rs_OnMinimap ;)


Yeah Sexy!

XcanadamanX

2008-03-04 16:21:42

looks good guys! Thumbs up to both of you. im going to fool around with it now.

Edit: pretty sweet…all i have to say

edit: your find object function gave me a runtime error. type mismatch on this line
ararP := SplitTPAEx(arAP, 10, 10);

edit: nvm this time it worked :p

mastaraymond

2008-03-04 16:29:55

I love all the icons you used in the program :p.

How did you get those line numbers?

Harry

2008-03-04 16:38:00

You're welcome for testing Sumilion (A) :rolleyes: :D

It is really nice, I feel special to be one of the first to use it. :garfield:

EvilChicken!

2008-03-04 17:36:07

Oh. My. God.

I just needed something like this today!
Not I won't have to learn new stuff! (Read: Now I'll learn off this!)

Seriously, this is just genious. Freaking genious.
I entered a color and it gives me about 100 lines of leet code.

I love you!


EDIT: :eek: Omgggg.

EDIT2: WHY THE **** ISN'T THIS STICKIED YET?!

Edit3: Best object finder ever! Gah.

oliver1205

2008-03-04 17:45:23

ok, it works now. thanks for this :)

cbris

2008-03-04 18:00:00

thank you SO much.

This is just the kind of thing I might attempt if I had amazing scripting skills like you two. This will help all scripters and make starting a script much easer for beginners. thank you.

wired16

2008-03-04 18:30:12

this is freaking great! i was running hy's caver and was like hmm ill make a gold/silver miner banker i got all the colors and stuff… i just need some help….

anyone wanna help me add me on msn or pm me

msn [email]tycoon_168@hotmail.com[/email]

Bobarkinator

2008-03-04 19:58:38

Woooot, I used to love ACA 1. I'm so glad this got released.

FrÕzÑ_§ÕµL

2008-03-04 22:11:16

Very, very good :p maybe I can find a use for this… thanks!

HyperSecret

2008-03-05 00:59:29

very very nice both of you, ACA was a great program i still use it till this day, now a v2!

Bonfield

2008-03-05 02:54:22

amazing, good job releasing ACA version 2

vcvv

2008-03-05 03:24:42

Wow, great script!
I may be able to run HyperSecret's amazing auto responder script! :)

nielsie95

2008-03-05 07:51:42

From: mastaraymond
I love all the icons you used in the program :p.

How did you get those line numbers?


Which numbers? Those in the function tabs?

gerauchert

2008-03-05 08:58:28

*bows down* were not worthy!!! :D

thank you sooo much, my own autocolor functions seem to always fail after about a halfhour, im very excited to use this! thanks!

Rikje

2008-03-05 09:01:48

Is V2 2 times better dan V1? :p
Thanks on releasing :)

I love the mark color thing!

Sumilion

2008-03-05 09:31:17

From: Rikje
Is V2 2 times better dan V1? :p
Thanks on releasing :)

I love the mark color thing!


It should be ;) thats why it is v2 :p

From: nielsie95
Which numbers? Those in the function tabs?


I think he means SynEdit, @mastaraymond, it is SynEdit :p

stampede10343

2008-03-05 14:04:38

I just got the first one a couple weeks ago after being stumped on RGB, this one looks great gj!!

munk

2008-03-05 16:18:27

yay! i can finally uninstall my SCAR 3.11 on this computer.

and now i can hopefully finally get ColorToleranceSpeed(2) workin how I want:D

thanks and great job!

[S]paz

2008-03-05 16:26:00

wow this is a good bit of coding here, but can someone expain how to use colortolerancespeeds and modifiers cos i search for some tuts and i still dont get it :S:S my msn is [email]spaztaz666@hotmail.com[/email]

~Spaz

lordsaturn

2008-03-05 19:33:52

If you could have sex in delphi, it would be the equivalent to this.

Nice job.

Smartzkid

2008-03-05 21:09:32

Verr' Nize! How many lines of code? Amazing job, guys!

Is it too much to ask for SMART compatibility? (custom DC/bitmap?)

mastaraymond

2008-03-06 09:37:35

From: Smartzkid
Verr' Nize! How many lines of code? Amazing job, guys!

Is it too much to ask for SMART compatibility? (custom DC/bitmap?)

Are you on crack?

king vash

2008-03-13 21:11:57

it won't take a list of colors more than 20 long

Naum

2008-03-14 03:56:50

Are you on crack?

I would guess so :p

HISTORY

2008-03-14 06:30:36

Woah, sexy program.

Sumilion

2008-03-14 09:46:17

From: king vash
it won't take a list of colors more than 20 long


Yes it will :p

From: Smartzkid
Verr' Nize! How many lines of code? Amazing job, guys!

Is it too much to ask for SMART compatibility? (custom DC/bitmap?)


No SMART compatibility, main unit is 1680 lines.

Naike

2008-03-22 20:34:08

This is the SHIT! xD!
Very very nice work, Stickie this?

Zezi

2008-03-23 09:02:08

I like this script very much, had to auto color my darn road, it's underground :(

Really helped, i like how you can scroll through the colours, and check if you've accidently clicked the wrong one etc,

And il ike how it automatically places into function

What kicks ass is how you can even save it :) ++ for yous :)

Tyvm for taking the time to make this,

Do i need to give credit before the function?

HellBoyz

2008-03-26 04:39:04

Nice it's just come for my rescue thumbs up… lol :)

nielsie95

2008-03-26 06:27:49

From: boxcrop
Do i need to give credit before the function?


Would be nice, yes :)

XRaye

2008-05-12 15:04:31

Wow, this is very nice!!!!

Drakan

2008-05-12 17:11:00

This looks sweet but my newby self cant figure it out! I click the colors I want, then press create function with RGB checking, and I try it and it dont work :S Can someone post a tutorial?

EDIT: I think i'm starting to get it =]

Scaper

2008-06-29 09:51:04

omg nice this is very handy very nice work boy's

rep++

Scaper

2008-06-30 14:32:49

maybe ya's could make a radialwalk 1 in like this 1 sometime that would be cool:)

and also how do i get it to get the full runescape screen i press get image tec and it doesent get the runescape screen??


mybe like the[cheese said post a lil tut plz

thax

Sumilion

2008-06-30 17:44:43

Doubt the radial walk will get in here.

For RS getting : Client > Client Window > Find RS
(this is the main menu, not the tabs)

Scaper

2008-07-03 21:36:21

From: Sumilion
Doubt the radial walk will get in here.

For RS getting : Client > Client Window > Find RS
(this is the main menu, not the tabs)



yer when i click find rs it has jus a lil bit of the runescape window and the rest of the drop down menu init:confused:
so were will the radial walking one be SRL mem :D

tell me will there be a radial walk 1??

Daniel

2008-07-04 02:15:32

From: scaper123
so were will the radial walking one be SRL mem :D
tell me will there be a radial walk 1??


From: Sumilion
Doubt the radial walk will get in here.


;)

Claymore

2008-07-05 15:34:05

Thanks!a nub like me who is beginning to learn SCAR is gonna have an easier time now!

lordsaturn

2008-07-23 22:03:05

What is the 'Max Distance' variable for?

Sumilion

2008-07-24 05:04:26

The Max Distance is the maximum amount 2 points can be from eachother before the script sees it as another object.

EvilChicken!

2008-07-24 05:26:14

From: lordsaturn
What is the 'Max Distance' variable for?


TPA splitting into ATPAs as far as I remember.

A TPA is an array of the x and y coordinates for every single pixel of matching colors for the search, in the search area. But we need to split these pixels into an array of boxes, otherwise moving the mouse to each of the pixels matching the color that was searched for, would be kinda time-consuming and bot-line, no? That's why we split them into boxes with only ONE point in each box instead of all the points.

The max distance variable is for you to enter what width and height those boxes should have. 15-30 is commonly used and works for most objects.

Feel free to ask if you didn't fully grasp something of what I just wrote. :rolleyes:

lordsaturn

2008-07-24 08:00:14

So you would want to use a higher number to be more safe with your object finding?

nielsie95

2008-07-24 09:47:37

If your color matches a lot of the object (mark color), you should use a small number. If not, use a higher number.


…………. - Small number
. . . -Larger number

. = matched color

lordsaturn

2008-07-24 22:06:53

From: nielsie95
If your color matches a lot of the object (mark color), you should use a small number. If not, use a higher number.


…………. - Small number
. . . -Larger number

. = matched color


Ah, okay. Now i understand.

Thanks all. =]

basic_i

2008-08-11 20:05:54

….so this program helps you make a function to find and object in the main screen???

like i could get a few colors of some cabbage and it would make a function to find the cabbage color????or what ….its a little complex

Sumilion

2008-08-12 04:04:03

From: basic_i
….so this program helps you make a function to find and object in the main screen???

like i could get a few colors of some cabbage and it would make a function to find the cabbage color????or what ….its a little complex


Yeh thats pretty much what it comes down to ;)

Get a few colors of your cabbage for example, make sure it doesn't find any (or at least not a lot) of other colors (by checking under the Client tab, pressing Mark Best Color after you've selected your colors). Then I suggest using the FindObjRecord tab to create the function that finds the object on the main screen :).

Melon

2008-09-21 09:30:39

(im beginer) So , for example i have took some colors of copper ore , and now i want so that my script finds the colors (that part is already done) and clicks on them. Wich part should be changer, or edited ?
program FindObject;
{.include SRL\SRL.scar}

var
x, y: Integer;

function FindObject(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

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

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

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 6.45) and (H <= 6.84) and (S >= 46.81) and (S <= 74.87) and (L >= 50.57) and (L <= 68.65) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 28.30) and (X <= 50.03) and (Y >= 24.07) and (Y <= 44.62) and (Z >= 8.93) and (Z <= 22.51) 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);

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

GetMousePos(fx, fy);
end;

begin
SetupSRL;
FindObject(x, y);
end.

Sumilion

2008-09-21 13:48:45

From: Melon
(im beginer) So , for example i have took some colors of copper ore , and now i want so that my script finds the colors (that part is already done) and clicks on them. Wich part should be changer, or edited ?
program FindObject;
{.include SRL\SRL.scar}

var
x, y: Integer;

function FindObject(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

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

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

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 6.45) and (H <= 6.84) and (S >= 46.81) and (S <= 74.87) and (L >= 50.57) and (L <= 68.65) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 28.30) and (X <= 50.03) and (Y >= 24.07) and (Y <= 44.62) and (Z >= 8.93) and (Z <= 22.51) 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);

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

GetMousePos(fx, fy);
end;

begin
SetupSRL;
FindObject(x, y);
end.


Well … in the end you could do this :

begin
SetupSRL;
FindObject(x, y);
Mouse(x, y, 0, 0, True);
end.

that will click on the found object, but… I made this function in SRL which does this, premade. I made a couple of TAutoColorInfo's (which stores the date you made in scar) of rocks and I use these for a rock finder.

For more info, http://www.villavu.com/forum/showthread.php?t=32668?t=35403

Melon

2008-09-22 10:44:25

Thanks … I will check http://www.srl-forums.com/forum/auto...3.html?t=35403 now …. rly thx x100 man ;)

soppa_z

2008-11-01 12:38:43

i Will try make a autoing script

Nava2

2008-11-03 14:06:07

Love this thing!

Just so you know, just a thought, remove the unnecessary begins and ends in the find object procedures.

Only thing I could find.. :)

Sumilion

2008-11-04 09:25:57

IMO it is more readable :) But I suggest using the TAutoColorInfo's feature anyway since it is more advanced, more bugs have been removed… its just better supported :)

lordsaturn

2009-01-27 18:40:33

Sorry for the bump, but I saw that the FindObject function could be optimized a little bit, so I did. :)


function FindObject(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2, c: Integer;
P: TPoint;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

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

arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
SetLength(arAP, (arL+1)*(arL2+1));

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 0.00) and (H <= 58.35) and (S >= 0.00) and (S <= 28.59) and (L >= 93.71) and (L <= 100.02) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 81.64) and (X <= 95.07) and (Y >= 86.07) and (Y <= 100.02) and (Z >= 95.49) and (Z <= 108.90) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
arAP[c] := arP[j];
Inc(c);
end;
end;
end;
end;
end;
SetLength(arAP, c);

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

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

So that you only edit the length of arAP twice, rather than each time you add a new index.

EvilChicken!

2009-01-28 02:37:41

Nice, saturn.
Might aswell remove the unneeded begins/ends?

lordsaturn

2009-01-28 02:53:48

Yeah, I was going to, but I figured nielsie/sumilion did it for a reason. Maybe for code cleanliness?

EvilChicken!

2009-01-28 03:23:59

From: lordsaturn
Yeah, I was going to, but I figured nielsie/sumilion did it for a reason. Maybe for code cleanliness?


Yeah, that's what they told me.
"It's easier to read that way."

Cazax

2009-01-29 19:50:37

May I ask you where did you get HSL and XYZ formula? Or did you find it?

Simtoon

2009-01-29 22:53:39

I like this heheh

Scaper

2009-04-07 17:52:28

hope you gyys wont mind i am going to post this on scion if you have any objections to this just say so and i will remove it, i have gave full credits to use guys

man slaughter

2011-07-15 17:12:29

Works epically on linux/wine. I'm using it to make a color blindness filter.

BraK

2011-07-15 18:02:12

Gravedig from hell XD

~BraK

Coh3n

2011-07-15 19:16:59

In this case, I think it's okay. This is a very useful tool that not all people will know about.

Gu3st...

2011-07-15 19:19:29

How come this isn't stickied, but APPA is?

Coh3n

2011-07-15 19:21:26

Older thread? I don't know. I'll stick it now.

weequ

2011-10-26 19:50:01

Great tool. I've been using this quite much. Especially the color marker and the best color+tolerance info are very useful.

grats

2011-10-26 19:57:02

From: weequ
Great tool. I've been using this quite much. Especially the color marker and the best color+tolerance info are very useful.


yea, I love this tool a lot.. also really good because it works on multiple monitors and simba colorpicker doesn't :P

Wizzup?

2011-10-26 20:11:12

From: grats
yea, I love this tool a lot.. also really good because it works on multiple monitors and simba colorpicker doesn't :P


Are you sure? That may depend on your monitor set up. Might want to file a bug. :)
Although I suppose I could be seen as nice behavior as well.

Narcle

2011-10-26 20:42:37

From: grats
yea, I love this tool a lot.. also really good because it works on multiple monitors and simba colorpicker doesn't :P


Simba actually does work with multi-monitor but in a funny way. If you have Simba on the far right monitor you cannot pick colors on any monitors to the left. However, if you have Simba on the far left monitor you can pick a color from any monitor.

grats

2011-10-26 21:10:28

From: Narcle
Simba actually does work with multi-monitor but in a funny way. If you have Simba on the far right monitor you cannot pick colors on any monitors to the left. However, if you have Simba on the far left monitor you can pick a color from any monitor.


oh lol that makes sense then.. I've never had it on any monitor other than my right monitor.. and smart / rs are usually in center

From: Wizzup?
Are you sure? That may depend on your monitor set up. Might want to file a bug. :)
Although I suppose I could be seen as nice behavior as well.


yea I talked about it somewhere, didn't think it was much of a problem not a lot of people have a bunch of monitors


yea narcle is correct, by putting it to my left one I can select on all of the monitors

Wizzup?

2011-10-30 15:23:41

From: grats
oh lol that makes sense then.. I've never had it on any monitor other than my right monitor.. and smart / rs are usually in center



yea I talked about it somewhere, didn't think it was much of a problem not a lot of people have a bunch of monitors


yea narcle is correct, by putting it to my left one I can select on all of the monitors


File a bug with description please. :)

Nava2

2011-10-30 18:56:15

What ever happened to this being implemented into the colour picker history?

Flight

2011-10-30 21:10:49

Well… I just used this little tool and I gotta say…. I'm thoroughly impressed.

DeSnob

2011-10-30 23:04:11

From: Flight
Well… I just used this little tool and I gotta say…. I'm thoroughly impressed.


Yeah, this is extremely useful! Especially with needing to know the color mods.

Wizzup?

2011-10-31 06:10:09

From: Nava2
What ever happened to this being implemented into the colour picker history?


Still a good idea. It just needs to be done. If you ask Nielsie nicely you could perhaps re-use (some of) their code?

E: Created a bug report for it.

Flight

2011-11-06 02:23:12

Hey I'm wondering, since the newest versions of Simba (0.98-rc1+) now have support for CTS 3, would it be much hassle to implant that in this tool?

Swatarianess

2011-11-06 06:19:35

Thanks :D this would be great if it were implemented into Simba. Using it now thanks

nielsie95

2011-11-08 14:40:44

From: Flight
Hey I'm wondering, since the newest versions of Simba (0.98-rc1+) now have support for CTS 3, would it be much hassle to implant that in this tool?


It probably would be a bit of a hassle to get things compiling again, yes :p
To get a multi platform version going, it might be a good idea to implement a version as an extension. A lot of the components from the DTM editor could be reused (the whole image/client display along with the mouse handling).

YoHoJo

2011-12-10 17:27:11

Hey nielsie95 CTS3 is out! Any way you could possibly add support for this to a new version of ACA that would be sweet!

DeSnob

2011-12-10 21:10:51

From: YoHoJo
Hey nielsie95 CTS3 is out! Any way you could possibly add support for this to a new version of ACA that would be sweet!


I swear CTS3's been out for a while now. :o

YoHoJo

2011-12-10 21:12:06

I think that was beta versions or something of Simba.
I think today the real stable version to have CTS3 came out.
Either way, it should be added.

Kyle Undefined

2011-12-10 21:17:11

That would be shweet!

DeSnob

2011-12-10 21:48:55

From: YoHoJo
I think that was beta versions or something of Simba.
I think today the real stable version to have CTS3 came out.
Either way, it should be added.


Whoa, really? Sweeet..

Nava2

2011-12-11 00:42:33

Nielsie has the source, and he is willing to share if you ask. But I'm not sure if he wants to FOSS it.

YoHoJo

2011-12-11 01:35:36

FOSS?
Also I'd have no idea how, someone who knows how/wants to should ask him for source and do it, it would be a really awesome addition.

wantonman

2011-12-30 02:12:15

I'm having trouble running this on simba. Ive been trying for 3 hours and still no luck finding a maple tree!

I chose 3 colors and selected best color, set uptext to chop, pasted findobject function to simba.


i always get unable to find object… the mouse never moves.

Brandon

2011-12-30 02:19:22

From: wantonman
I'm having trouble running this on simba. Ive been trying for 3 hours and still no luck finding a maple tree!

I chose 3 colors and selected best color, set uptext to chop, pasted findobject function to simba.


i always get unable to find object… the mouse never moves.



In Auto Colour aid.. Set your thing at the bottom right to ColorTolerance 2.. then choose colours.. then fill in the below function with the info you got from the find object creator[LEFT]

Procedure FindTree;
var
CTS: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.59, 3.70); //Fill this in with the info from auto color aid..
if FindColorSpiralTolerance(X, Y, Color, MSX1, MSY1, MSX2, MSY2, Tolerance) //Fill this in with the info from Autocolor Aid..
writeln('Found Tree');
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;

[/LEFT]

wantonman

2011-12-30 02:35:33

so basically don't use the script auto color aid generates? and just fill in the colors?

mormonman

2011-12-30 02:38:18

Sauce please :)

Swatarianess

2011-12-30 07:58:59

From: wantonman
so basically don't use the script auto color aid generates? and just fill in the colors?


if you want u can use it :p I used it was i was starting but as you read some of the tuts you'll understand more about how it works and maybe just take the info it gives you and make your own for whatever script you use ^^

nielsie95

2011-12-31 09:54:37

From: mormonman
Sauce please :)

http://villavu.com/forum/showthread.php?t=70704
This is a start of a Simba extension. Are you perhaps interested in doing some work on it?

And a question to everyone: what parts do you use most and what would you like to see different in a new version of ACA? Are the function generators a must? Do you like the current layout?

Daniel

2011-12-31 10:16:30

From: nielsie95
http://villavu.com/forum/showthread.php?t=70704
This is a start of a Simba extension. Are you perhaps interested in doing some work on it?

And a question to everyone: what parts do you use most and what would you like to see different in a new version of ACA? Are the function generators a must? Do you like the current layout?


Everythings fine.

I use it to get the best colour and tolerances, as-well as generating a function for a guide/just for copy and paste. :)

Yago

2011-12-31 16:56:42

It sometimes freezes when refreshing or getting a new target thingy…

imaloser

2012-01-07 17:05:51

From: ggzz
In Auto Colour aid.. Set your thing at the bottom right to ColorTolerance 2.. then choose colours.. then fill in the below function with the info you got from the find object creator[LEFT]

Procedure FindTree;
var
X, Y, CTS: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(HUE, SATURATION); //Fill this in with the info from auto color aid..
if FindColorSpiralTolerance(X, Y, Color, MSX1, MSY1, MSX2, MSY2, Tolerance) Then //Fill this in with the info from Autocolor Aid..
writeln('Found Tree');
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;

[/LEFT]


Missed somethings in the procedure :p

gerauchert

2012-01-07 17:33:58

From: nielsie95
http://villavu.com/forum/showthread.php?t=70704
This is a start of a Simba extension. Are you perhaps interested in doing some work on it?

And a question to everyone: what parts do you use most and what would you like to see different in a new version of ACA? Are the function generators a must? Do you like the current layout?


The only thing I would ask is to improve the debug images. It seems to freeze the program at times for me… but other than that everything has worked like a charm for me. :)

bg5

2012-02-11 03:42:00

It has problem with finding SMART. Find RS function works only in 10% tries.Mostly it says "succefully found RS" ,but it shows only small black rectangle (154x26). I tried 'Find clietn by name' ,but just "SMART" can't be found. I think whole window name is needed ,but SMART's caption is very long :P Any solution?

nielsie95

2012-02-11 04:05:30

Just use the whole desktop and scroll a little. Or you could just use the browser for picking colours. Or you could try to use the extension for Simba. Or type in the whole window name :p

goodyou

2012-02-12 20:22:35

Today be able to know everyone really happy.

goodyou

2012-02-12 23:28:44

meaning less time to work on it. Luckily it is already finished.

Emotional

2012-02-21 18:20:28

[Error] (5:10): Duplicate identifier 'AUTOCOLOR' at line 4
Compiling failed.

=/ Trying to work with Simba.

RISK

2012-02-21 18:36:21

Change the name to something like 'E_AutoColor'. It's simply telling you that there is more than one procedure or function with the name 'AutoColor'.

Emotional

2012-02-21 18:38:34

From: RISK
Change the name to something like 'E_AutoColor'. It's simply telling you that there is more than one procedure or function with the name 'AutoColor'.


program E_AutoColor;
{$i SRL/SRL.simba}

function AutoColor: Integer;

says the same thing….
EDIT: Nvm, Ty for you help(:

RISK

2012-02-21 18:39:38

Change the function name to E_AutoColor, not the program name. :)

Kyle Undefined

2012-02-21 18:40:29

No, you have to change the function "AutoColor" to something different, it doesn't matter what the program name is.

AutoColor is a function in SRL already, so that's why you have to change it.

horizon

2012-02-25 21:37:16

cooooooooooooooooooool, thx

YoHoJo

2012-03-06 06:34:41

Suggestion:
Have an option/tool to ZOOM into the client image to be more precise? :D

RISK

2012-03-06 06:37:32

+1 to this. I would LOVE this feature.

From: YoHoJo
Suggestion:
Have an option/tool to ZOOM into the client image to be more precise? :D

Majnoon

2012-03-06 11:04:47

Hi,

I ran in to a little problem, can't seem to find a fix.

When trying to find the Rs window, Client > Client Window > Find RS.
It just gives me a white screen, when i click on the white screen it does give me colors but i can't tell what is what. Any fix for this?

Littellj

2012-03-07 19:08:58

How do i define the AutoColor integer as a variable so that it doesn't do a different autocolor everytime?

Valithor

2012-03-23 18:48:24

From: Littellj
How do i define the AutoColor integer as a variable so that it doesn't do a different autocolor everytime?

Why would that be a problem? :confused:

On another note: Any ideas on how long it will be until this able to use CTS 3?

nielsie95

2012-03-24 07:02:53

Zoom and cts 3 are available in the Simba extension.
I don't think this version will get another update.

Imanoobbot

2012-03-25 09:51:25

For me it always give me that error message:

[Error] (17:13): Unknown identifier 'GetColorToleranceSpeed' at line 16
Compiling failed.

I got problems putting this into my scripts.


* Problem solved!

dragonbotz

2012-04-29 18:34:41

From: Imanoobbot
For me it always give me that error message:

[Error] (17:13): Unknown identifier 'GetColorToleranceSpeed' at line 16
Compiling failed.

I got problems putting this into my scripts.


* Problem solved!


I'm having that problem too. Could you tell me how you solved it?

Cinkupis

2012-05-14 11:26:37

From: Majnoon
Hi,

I ran in to a little problem, can't seem to find a fix.

When trying to find the Rs window, Client > Client Window > Find RS.
It just gives me a white screen, when i click on the white screen it does give me colors but i can't tell what is what. Any fix for this?


Same problem here. Any ideas on how to fix it?

beeb101

2012-05-22 11:01:17

whenever i click find rs it says rs found but just stays white ;/ help please

Abu

2012-05-22 11:04:54

Uninstall your Java completely including folders and install:

Java6u32

beeb101

2012-05-22 13:04:58

when i do java6 simba stops working.. all the scripts;/ i get error

this is the error:

Error: Exception: Access violation at line 101
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

Enter

2012-07-04 03:26:17

What do I use to open this?

[S]paz

2012-07-04 03:32:39

Unrar is with Winrar and you're away.

Enter

2012-07-04 11:52:05

From: [S]paz
Unrar is with Winrar and you're away.



What?

[S]paz

2012-07-04 12:40:03

Download winrar. Install that. Right click the .rar file. Extract here. Double click the .exe.

gavin0627

2012-11-27 09:27:06

thanks a lot!!!

key

2012-12-01 09:28:53

Thank you :D.

masterBB

2014-05-17 08:02:19

This tool was amazing. Thank you Sumilion and Nielsie95. It has been out there for a long time but has been superseded by CynicRus recently.

Not locked, but unstickified.

vvarfare

2014-09-23 15:24:56

Hi, when using your tool, both smart and the Rs client, just appear black on the client, am i doing something wrong?

Warco

2015-03-31 07:27:38

Thank you so much for this, really helping us new developers out!

srlMW

2015-06-04 00:17:25

Hey again, is this the #1 recommended tool to use still?

Cheers

DeniedHacker

2015-06-11 15:09:53

I still use it for getting colors on OSR