Nice script, nice script guys!
Timer, you became much better since you applied for SRL Member:p
I saw your GetWaterColor and I remembered I made on aswell, based off the one made by The Fawkinator:) (I was planning to make a fighter, I never finnish my scipts:rolleyes:)
Here, you can barrow it:p
{********************
function GetWaterColor: integer;
Description: Will put ColorToleranceSpeed to 0 and search for present
mm watercolor. The usage of "FindColoredAreaTolerance" also checks
for a min area of that color, to be sure it is a lake.
This function actually is an edit of WT-Fakawi's one (w_GetWaterColor
that wizzup? uses in his Fly Fisher), thus credits to him ;)
********************}
function GetWaterColor: integer;
var
x, y, CTS: integer;
begin
if not(LoggedIn) then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
if FindColoredAreaTolerance(x, y, 12226942, mmx1, mmy1, mmx2, mmy2, 10, 30)then
begin
Result := GetColor(x, y);
Writeln('Water color: '+inttostr(result));
end else
begin
Writeln('Water color NOT found. Lets try SRLs one.');
Result := FindWaterColor;
if (Result > 0) then
begin
Writeln('Water color: '+inttostr(result));
end else
begin
Writeln('SRLs FindWaterColor function also failured. No water color found.');
Result := 0;
TerminateScript;
end;
end;
ColorToleranceSpeed(CTS);
end;
Also if you need a findsymbol function:
{********************
function MyFindSymbol(name: string; x1, y1, x2, y2: integer;
walk: boolean): boolean;
Description: A findsymbol function with SymbolAccuracy disceasing
and walk option.
********************}
function MyFindSymbol(name: string; x1, y1, x2, y2: integer;
walk: boolean): boolean;
var
i, cx, cy: integer;
Acc: extended;
begin
if not(LoggedIn) then Exit;
Acc := SymbolAccuracy;
for i:= 1 to 8 do
begin
case (walk) of
true: begin
if FindSymbolIn(cx, cy, name, x1, y1, x2, y2)then
begin
Mouse(cx, cy, 0, 0, true);
FFlag(0);
result:= true;
break;
end;
end;
false: begin
if FindSymbolIn(cx, cy, name, x1, y1, x2, y2)then
begin
result:= true;
break;
end;
end;
end;
SymbolAccuracy := Acc-0.05;
end;
SymbolAccuracy := Acc;
end;
Btw for that auto railcolor function you need, why don't you try the art of arrays?
Regards,
-Tsn.