NiCbaZ
2008-11-20 02:01:30
Just a simple axe detector..
function N_WhatAxe: String;
var
cts,I,Z : Integer;
TPA: TPointArray;
T : Integer;
H : TBox;
Col: TIntegerArray;
begin
T := GetCurrentTab;
If T <> 4 then
GameTab(4);
H := InvBox(1);
Col := [791905,6313793,4478276,5914173];
For I:= 0 to High(col) do
begin
if FindColorsTolerance(TPA,Col[I], h.X1, h.Y1, h.X2, h.Y2 , 15) then
if Length(TPA) > 20 then
begin
Z:= I + 1;
Break;
end;
end;
case z of
1: Result:= 'dragon';
2: Result:= 'rune';
3: Result:= 'addy';
4: Result:= 'mith';
end;
end;