SCAR Code:
{*******************************************************************************
function FindTalismanInBank(TalismanName: String; tol: Integer): Boolean;
By: The Claw - base on FindTalismanInInvent by Bebemycat2
Description: Returns true if the specifyed talisman is in bank
air - mind - water - earth - fire - body - cosmic - chaos - nature - law - death
*******************************************************************************}
function FindTalismanInBank(TalismanName: string; tol: Integer): Boolean;
begin
case LowerCase(TalismanName) of
'air':
begin
if (FindBitmapToleranceIn(talis_air, x, y, MSX1, MSY1, MSX2, MSY2, tol))
then
Result := True
else
Result := False
end;
'mind':
begin
if (FindBitmapToleranceIn(talis_mind, x, y, MSX1, MSY1, MSX2, MSY2, tol))
then
Result := True
else
Result := False
end;
'water':
begin
if (FindBitmapToleranceIn(talis_water, x, y, MSX1, MSY1, MSX2, MSY2,
tol)) then
Result := True
else
Result := False
end;
'earth':
begin
if (FindBitmapToleranceIn(talis_earth, x, y, MSX1, MSY1, MSX2, MSY2,
tol)) then
Result := True
else
Result := False
end;
'fire':
begin
if (FindBitmapToleranceIn(talis_fire, x, y, MSX1, MSY1, MSX2, MSY2, tol))
then
Result := True
else
Result := False
end;
'body':
begin
if (FindBitmapToleranceIn(talis_body, x, y, MSX1, MSY1, MSX2, MSY2, tol))
then
Result := True
else
Result := False
end;
'cosmic':
begin
if (FindBitmapToleranceIn(talis_cosmic, x, y, MSX1, MSY1, MSX2, MSY2,
tol)) then
Result := True
else
Result := False
end;
'chaos':
begin
if (FindBitmapToleranceIn(talis_chaos, x, y, MSX1, MSY1, MSX2, MSY2,
tol)) then
Result := True
else
Result := False
end;
'nature':
begin
if (FindBitmapToleranceIn(talis_nature, x, y, MSX1, MSY1, MSX2, MSY2,
tol)) then
Result := True
else
Result := False
end;
'law':
begin
if (FindBitmapToleranceIn(talis_law, x, y, MSX1, MSY1, MSX2, MSY2, tol))
then
Result := True
else
Result := False
end;
'death':
begin
if (FindBitmapToleranceIn(talis_death, x, y, MSX1, MSY1, MSX2, MSY2,
tol)) then
Result := True
end;
end;
FreeBitmap(talis_air)
FreeBitmap(talis_body)
FreeBitmap(talis_chaos)
FreeBitmap(talis_cosmic)
FreeBitmap(talis_death)
FreeBitmap(talis_earth)
FreeBitmap(talis_fire)
FreeBitmap(talis_law)
FreeBitmap(talis_mind)
FreeBitmap(talis_nature)
FreeBitmap(talis_water)
end;