I wrote some functions:
- function A:
SCAR Code:
function SmeltingScreen: boolean;
var
x,y : integer;
begin
result := FindText(x, y, 'smelt', npcchars, 155, 354, 374, 387);
end;
for smithing.scar.
- function B:
SCAR Code:
function FindCookedFishInInv(Tol : integer; var x,y : integer; fish : string): boolean;
begin
GameTab(4);
case lowercase(fish) of
'shrimps': if FindBitmapToleranceIn(srl_GetBitmap(76), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'anchovies': if FindBitmapToleranceIn(srl_GetBitmap(77), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'tuna': if FindBitmapToleranceIn(srl_GetBitmap(78), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'trout': if FindBitmapToleranceIn(srl_GetBitmap(79), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'pike': if FindBitmapToleranceIn(srl_GetBitmap(80), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'salmon': if FindBitmapToleranceIn(srl_GetBitmap(81), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'lobster': if FindBitmapToleranceIn(srl_GetBitmap(82), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'swordfish': if FindBitmapToleranceIn(srl_GetBitmap(83), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
else
Writeln('Invalid option');
Result := False;
end; // case
end;
for cooking.scar, you have to include srl/srl/misc/bitmaps.scar, but, it gave me this error:
Line 14: [Error] (12595:1): Duplicate identifier 'srl_Bitmaps' in script
-function C:
SCAR Code:
function FindRawFishInInv(Tol : integer; var x,y : integer; fish : string): boolean;
begin
GameTab(4);
case lowercase(fish) of
'shrimps': if FindBitmapToleranceIn(srl_GetBitmap(86), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'anchovies': if FindBitmapToleranceIn(srl_GetBitmap(87), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'tuna': if FindBitmapToleranceIn(srl_GetBitmap(88), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'trout': if FindBitmapToleranceIn(srl_GetBitmap(89), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'pike': if FindBitmapToleranceIn(srl_GetBitmap(90), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'salmon': if FindBitmapToleranceIn(srl_GetBitmap(91), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'lobster': if FindBitmapToleranceIn(srl_GetBitmap(92), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
'swordfish': if FindBitmapToleranceIn(srl_GetBitmap(93), x, y, MIX1, MIY1, MIX2, MIY2, Tol) then Result := True; srl_FreeBitmaps;
else
Writeln('Invalid option');
Result := False;
end; // case
end;
for cooking.scar, but the same error as the function B...
- function D:
SCAR Code:
function CookScreen: boolean;
var
x,y : integer;
begin
result := FindText(x, y, 'cook', npcchars, 137, 355, 384, 385);
end;