So what i need to do :/ is like
HERE IS ONE COLOR
000000000000000000000 THE CENTER 0000000000000000000000000000000000000 SECOND COLOR
000000000000000000000000000THIRD COLOR
How i can make script to get The Center :/ ?
Thanks,
~Home
So what i need to do :/ is like
HERE IS ONE COLOR
000000000000000000000 THE CENTER 0000000000000000000000000000000000000 SECOND COLOR
000000000000000000000000000THIRD COLOR
How i can make script to get The Center :/ ?
Thanks,
~Home
What you mean Centre?
[CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
[CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]
[CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]
you mean ddtms?
i think he mean. is there is a big spot of 1 color. it will click in the middel of it:
function FindColorSpiral2(var x,y: Integer; color, xs, ys, xe, ye: Integer): Boolean; - find color just like FindColorSpiral, and if there is a big spot of that color then it finds the center of it.
//From the help file from scar.
if not then he mean DTM and DDTM.
Edit: DTMs![]()
U know he could use DDTM's, it would be more effective, but a lot harder than FindColorSpiral2.
Ur choice, speed or accuracy (FindColorSpiral2 is accurate nonetheless)
--------------------------------------------------------- ![]()
Pm me if you need any math functions made. Me = l0ving t3h mathz
--------------------------------------------------------- ![]()
It's very simple, really.
Count up all the x and y's into a var.
Divide it by the amount of points you just counted.
Like this:
SCAR Code:Function WeirdMiddle(TPA: TpointArray): TPoint;
Var
L, I: Integer;
Begin
If GetArrayLength(TPA) = 0 Then
Exit;
L := GetArrayLength(TPA) - 1;
For I := 0 To L Do
Begin
Result.X := Result.X + TPA[I].X;
Result.Y := Result.Y + TPA[I].Y;
End;
Result.X := Round(Result.X Div GetArrayLength(TPA));
Result.Y := Round(Result.Y Div GetArrayLength(TPA));
End;
I was wondering about this too, but I really don't understand arrays..![]()
Arrays are just a bunch of varriables stuffed into one name.
can hold the same ammount of information asSCAR Code:Var
i:Array 0..2 of Integer;and they are easier to use.SCAR Code:Var
i:Integer;
q:Integer;
w:Integer;
--------------------------------------------------------- ![]()
Pm me if you need any math functions made. Me = l0ving t3h mathz
--------------------------------------------------------- ![]()
What i mean is like in Wt Fawkis Godlin Scheduler,
Look This Pic :/ And You Get IDea what DO I MEAN
http://img230.imageshack.us/my.php?image=nimetnme5.jpg
~Home
that ar (d)dtms![]()
but for the minimap DDTM ar much better. johoyo have a imo great tut on them.
edit link:
http://www.villavu.com/forum/showthr...4?goto=newpost



i think this is what you need
FindColorTriangleTolerance(x, y, colorinthecenter, xofcolor1, yofcolor1, xofcolor2, yofcolor2, xofcolor3, yofcolor3, tolerance);
You Can Use Wizzup? Method but it wont always work.. because if you get one pixel in there from a diffrent spot (you dont want) it will screw the hole thing up.
Try These....
SCAR Code:function AMaxPoint(P : TPointArray) : TPoint;
var
i : integer;
begin
if (GetArrayLength(P)=0) then exit;
Result := P[0];
for i := 1 to GetArrayLength(P)-1 do
if (P[i].x >= Result.x) and (P[i].y >= Result.y) then
Result := P[i];
end;
function AMinPoint(P : TPointArray) : TPoint;
var
i : integer;
begin
if (GetArrayLength(P)=0) then exit;
Result := P[0];
for i := 1 to GetArrayLength(P)-1 do
if (P[i].x <= Result.x) and (P[i].y <= Result.y) then
Result := P[i];
end;
function AMidPoint(P : TPointArray) : TPoint;
var
I, N, L, Index : Integer;
begin
L := Length(P);
if (L = 0) then Exit;
for N := 0 to L / 2 do
begin
Result := P[0];
for i := 1 to L-1 do
if (P[i].x >= Result.x) and (P[i].y >= Result.y) then
begin
Result := P[i];
Index := i;
end;
P[Index] := Point(-1, -1);
end;
end;
There are currently 1 users browsing this thread. (0 members and 1 guests)