Laimonas171
2009-08-31 18:23:21
Everybody Knows functions like
So i dicede to make something useful. I added RadialWalk and FindSymbol into one function. And get this function.
How it works?
Example:
[INDENT]You standing on road and you need to get near bank doors.
(i need it if i do not see bank symbol.)
Road color can find with FindVarrockRoadColor;
Simple FindSymbol can find just Guide symbol for example. and RadialWalk
Scan[/INDENT]
RadialWalk Scan for
StartRadial 350 EndRadial 10
Scans it look on image.

And get colors in that range

So mouse click depends for Radius value.
it can click to low or high on minimap. +-.. I dont saying what they are bad but you should know where you standing or something.
RadialWalkFS Scan for
StartRadial 260 EndRadial 280

And get colors in that range.

I think, I really proved what it is more accurate in that situation. (and it can be also used in more other i think. )
~Laimonas171
{*******************************************************************************
function RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
by Nielsie95
And
{*******************************************************************************
function FindSymbol(var rx, ry: Integer; Name: String): Boolean;
By: Stupid3oooSo i dicede to make something useful. I added RadialWalk and FindSymbol into one function. And get this function.
{*******************************************************************************
function RadialWalkFS(Name: String;TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
By: Laimonas171
Description: Walks TheColor from StartRadial to EndRadial for Radius Distance from found symbol.
Valid Arguments:
TheColors: Any Typed Color, RoadColor or WaterColor will can be to.
StartRadial/EndRadial: 0=N,90=E,180=S,270=W. (numbers Between 0 and 359 (360=0))
Radius: Distance from Found Symbol on minimap.
XMod, YMod: deviation from MouseFindFlag. -2 to 2.
IMPORTANT:
Make sure you search color not out of minimap, example symbol apears on very right side.
You shouldn't search color on StartRadial=45, EndRadial=135.
*******************************************************************************}
function RadialWalkFS(Name: String;TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
var
tpa: TPointArray;
I, rx, ry: Integer;
begin
FindSymbol(rx, ry, Name);
Result := (GetSymbolColor(rx, ry, LowerCase(Name)) > 0);
Begin
Result := False;
if RadialWalkEx(tpa, rx, ry, TheColor, 0, StartRadial, EndRadial, Radius) then
for I := 0 to High(tpa) do
if MFNF(tpa[I].x, tpa[I].y, Xmod, Ymod) then
begin
FFlag(10);
Result := True;
Break;
end;
end;
end;
How it works?
Example:
[INDENT]You standing on road and you need to get near bank doors.
(i need it if i do not see bank symbol.)
Road color can find with FindVarrockRoadColor;
Simple FindSymbol can find just Guide symbol for example. and RadialWalk
Scan[/INDENT]
RadialWalk Scan for
StartRadial 350 EndRadial 10
Scans it look on image.
Procedure FaindRoadNearBankDoors;
var RoadColour, c:integer;
begin
repeat
c := c + 1;
if (not(RadialWalk(RoadColour, 350, 10, 72, 0, 0))) then
begin
RoadColour := FindVarrockRoadColor
c := c - 1;
end;
until(c >= 1);
end;
And get colors in that range
So mouse click depends for Radius value.
it can click to low or high on minimap. +-.. I dont saying what they are bad but you should know where you standing or something.
RadialWalkFS Scan for
StartRadial 260 EndRadial 280
Procedure FaindRoadNearBankDoors;
var RoadColour, c:integer;
begin
repeat
c := c + 1;
if (not(RadialWalkFS('guide', RoadColour, 260, 280, 90, 0, 0))) Then
begin
RoadColour := FindVarrockRoadColor
c := c - 1;
end;
until(c >= 1);
end;
Scans it look on image.And get colors in that range.
I think, I really proved what it is more accurate in that situation. (and it can be also used in more other i think. )
~Laimonas171