Frement
2010-07-05 07:39:34
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- Fletching routines --//
//-----------------------------------------------------------------//
// * procedure SetupFletching; // by SRL
// * procedure LoadFletchingBitmaps; // by Frement
// * function KnifeExists(var x, y: Integer): Boolean; // by Frement
// * procedure FreeFletching; // by Frement
{ var Knife: Integer;
Description: Variables containing the fletching bitmaps. }
var
Knife: Integer;
{*******************************************************************************
procedure LoadFletchingBitmaps;
By: Frement
Description: Loads bitmaps into memory.
*******************************************************************************}
procedure LoadFletchingBitmaps;
begin
Knife := BitmapFromString(5, 4, 'meJxjYmBIScmIi0uKiooLDglnYmBI' +
'SEiJiUkIC4vq7ZvCqesKRD09k6qqGoBSEC4EAbkAA6YPWA==');
end;
{*******************************************************************************
function KnifeExists(var x, y: Integer): Boolean;
By: Frement
Description: Checks if there is Knife present in inventory.
Returns 'x' and 'y' values it is found at.
*******************************************************************************}
function KnifeExists(var x, y: Integer): Boolean;
begin
Gametab(tab_Inv);
Wait(300 + Random(300));
Result := FindBitmapToleranceIn(Knife, x, y, MIx1, MIy1, MIx2, MIy2, 10);
end;
{*******************************************************************************
procedure FreeFletching;
By: Frement
Description: Frees Global Bitmaps.
*******************************************************************************}
procedure FreeFletching;
begin
FreeBitmap(Knife);
end;
{*******************************************************************************
procedure SetupFletching;
By: SRL
Description: Declares Global Bitmaps.
*******************************************************************************}
procedure SetupFletching;
begin
LoadFletchingBitmaps;
end;Some stuff that I thought would be useful, as FireMaking.scar will have (?) these additions.
Well, anyway, tested, works.