NiCbaZ
2008-12-01 03:06:19
function N_WhatAxe: String;
var
cts,I,Z,II : Integer;
TPA: TPointArray;
T : Integer;
H : TBox;
Col: TIntegerArray;
begin
T := GetCurrentTab;
If T <> 4 then
GameTab(4);
for ii:= 0 to 28 do
begin
H := InvBox(II);
Col := [791905,6313793,4478276,5914173,1{steel},1{iron},1{bronze}];
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;
if z > 0 then
Break;
end;
case z of
1: Result:= 'dragon';
2: Result:= 'rune';
3: Result:= 'addy';
4: Result:= 'mith';
5: Result:= 'steel';
5: Result:= 'iron';
5: Result:= 'bronze';
end;
end;Should work with Wc axe's and pickaxes, Need cols for iron steel and bronze, could get mixed up with other items but il get fix that up.