PDA

View Full Version : MultiColoring 101(int)



pwnaz0r
08-25-2007, 09:07 PM
MultiColoring 101


Table of Contents

Introduction
Format
Uses & Examples
Introduction


Mutlicoloring is the process of looking at colors and tolerances in addition to other colors and their tolerances to find different points. It is not as difficult as it sounds, yet when it is taken to the next level, it is. In this tutorial, we will not take it to the next level, we will keep it easy :).


Format


The Basic format for mutlicoloring is



That way, if your script finds {color1}, it will search for {color2} in a box of 5x5 from the color. In this way , you can find objects that contain different colors easier.



If FindColorTolerance(x,y,{color1},{Coords Here},{tolerance})then
If FindColorTolerance(x,y, {color2},X - 5, Y - 5,X + 5, Y + 5, {tol}) then
begin




Uses and Examples


Well one of the ways I used mine was to find the alter of at the air runes place because there are so many colors close to that color. So i got all the points where it found the stone color and then looked for the greenish color within 5 pixels of them and moved the mouse there until it said "Enter Alter" or whatever it says ;).


function FindAlter : TPoint;
var
tmpTArray : array [0..1] of array of Tpoint;
I : integer;
begin
ColorToleranceSpeed(2);

FindColorsSpiralTolerance(x,y,tmpTArray[0],4542039,MSX1,MSY1,MSX2,MSY2,1)
For I := 0 to getArrayLength(tmpTArray[0]) - 1 do
begin
If FindColorTolerance(x,y,5200209,tmpTArray[0][I].X - 5, tmpTArray[0][I].Y - 5, tmpTarray[0][I].X + 5, tmpTarray[0][I].Y + 5, 15)then
begin
MMouse(x,y,0,0);
If IsUpText('sterious') then
begin
GetMousePos(result.X,Result.Y);
exit;
end;
end;
end;
end;

You Can Also vary this by adding TBoxes.

Have fun

dvdcrayola
08-26-2007, 06:37 AM
first post :p

interesting.. i like the concept, what exactly is the "next level"? haha.

good tut

Bourdou!
08-26-2007, 06:42 AM
ooh I am going to use this in my script thx!

Pyro
08-26-2007, 06:56 AM
ahhh i dont quite get why you used a array like that?

array:tpointarray will give you the format array[0].x or whatever you want.

Bourdou!
08-26-2007, 06:58 AM
ahhh i dont quite get why you used a array like that?

array:tpointarray will give you the format array[0].x or whatever you want.

:(

You just had to say something that I didnt understand didnt you? lol. I hate arrays.

dvdcrayola
08-26-2007, 07:00 AM
oh.. what does (int) mean?

pwnaz0r
08-26-2007, 07:38 PM
ahhh i dont quite get why you used a array like that?

array:tpointarray will give you the format array[0].x or whatever you want.

Bc I copied it out of a procedure that I had in another script and it did you the other one