Putting SRL Functions Into Your Scripts
I am currently making a willow cutter/banker. I know how to put SRL procedures into your own scripts (thats fairly obvious) but I don't know how to put the functions in. The function I want is--
SCAR Code:
{*******************************************************************************
function FindEnt(TreeColor: Integer): Boolean;
By:
Description: Will look for an Ent
*******************************************************************************}
function FindEnt(TreeColor: Integer): Boolean;
var
i : Integer;
begin
if(Option2('Chop'))then
begin
if(FindColorTolerance(x, y, 383705, 9, 9, 233, 24, 20))or
(FindColorTolerance(x, y, 65535, 9, 9, 233, 24, 20))then
begin
GetMousePos(x,y);
Mouse(x, y, 5, 5,false);
if(FindText(x, y, 'Chop down', UpChars, x - 50, y - 50, x + 100, y + 50))then
begin
if(FindColor(x, y, 65535, x + 70, y, x + 100, y + 10))then
begin
for i := 1 to 2 do
begin
Mouse(648, 83, 1, 1, True)
Flag;
end;
WriteLn('Found ent! Waiting for it to go away');
Wait(30000 + random(5000));
Result := True;
EntsAvoided := EntsAvoided + 1;
end;
end else
ChooseOption(x, y, 'Cancel');
end;
end;
end;
I tried typing in FindEnt; and FindEnt(TreeColor: Integer): Boolean; but neither worked.
Anybody know?