Log in

View Full Version : Putting SRL Functions Into Your Scripts



Skys Shadow
12-13-2006, 12:35 AM
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--

{************************************************* ******************************
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?

I Karma I
12-13-2006, 12:38 AM
FindEnt(TreeColor: Integer): Boolean;

change that too:
FindEnt(PUTTREECOLORHERE): True;

Skys Shadow
12-13-2006, 12:49 AM
FindEnt(TreeColor: Integer): Boolean;

change that too:
FindEnt(PUTTREECOLORHERE): True;

thanks =D

I figured it out like 2 seconds after i posted but thanks anyways

I Karma I
12-13-2006, 01:31 AM
Lol, its all good xD