Xeon's Functions & Procedures
I will update this page every time I create a new function/ procedure. (Hopefully make this an include when I have enough procedures/ functions/ feedback [Xi.scar])
I will be taking any requests for new Functions & Procedures or modifications to existing ones.
Please comment on anything you see, as for SCAR is not my primary coding language and I need feed back.
Every one is allowed to use the below just as long as you credit properly. 
-Change Log-
Code:
6th June 2007 - Added XiCompassWalk, description tags too. Rev3.
27th May 2007 - Revised XiAutoColor, Now has a StartTol. Rev2
27th May 2007 - Added the Function & Procedure request option.
27th May 2007 - Created Thread and Added Auto Color Function. Rev1
-Functions-
SCAR Code:
{*******************************************************************************
function XiAutoColor(BitMap, StartTol, MaxTol, xs, ys, xe, ye: Integer): Integer;
By: Xeon.
Description: Returns the color of a given Bit Map.
*******************************************************************************}
function XiAutoColor(BitMap, StartTol, MaxTol, xs, ys, xe, ye: Integer): Integer;
var
XAC: TPoint;
begin
while not (FindBitMapToleranceIn(BitMap, XAC.x, XAC.y, xs, ys, xe, ye, StartTol))
or (StartTol > MaxTol) do
begin
StartTol := StartTol + 1;
end;
if not (StartTol > MaxTol) then
begin
Result := GetColor(XAC.x, XAC.y);
Writeln('Color Auto Picked with a ' + IntToStr(StartTol) + ' tolerance.');
end;
end;
Will add more soon...
-Procedures-
SCAR Code:
{*******************************************************************************
procedure XiCompassWalk(Radial, Radius, xmod, ymod : Integer);
By: Xeon, orignally by Sythe's A-Walk.
Description: Walks "Blindly" According to which direction the compass is facing.
*******************************************************************************}
procedure XiCompassWalk(Radial, Radius, xmod, ymod : Integer);
var
XCW: TPoint;
begin
XCW.x := Round(Radius * Sin((Pi/180)* FixD(rs_GetCompassAngleDegrees + Radial)) + MMCX);
XCW.y := Round(-Radius * Cos((Pi/180)* FixD(rs_GetCompassAngleDegrees + Radial)) + MMCY);
MouseFindFlag(XCW.x, XCW.y, xmod, ymod);
Flag;
end;
Will add more soon...
-XEON