Table Of Contents

Previous topic

Login

Next topic

Math

This Page

Mapwalk

The Mapwalk include contains all Mapwalking functions

MakeCompass

function MakeCompass(Direction: Variant): Boolean;
Aligns RS to specified direction
  • Enter a compass angle (‘n’, ‘s’, ‘e’, ‘w’) or degree (23.3, 25, 205.2)

    and it will move the compass to that angle. Also accepts ‘random’, and ‘rand’ to make the compass a random direction.

Note

by Nielsie95 & Nava2

Example:

SetAngle

procedure SetAngle(Highest : Boolean);

Sets the mainscreen at highestlowest angle (Depends on the boolean)

Note

by Raymond, edit by NaumanAkhlaQ

Example:

ClickNorth

procedure ClickNorth(AngleHigh : boolean);

Clicks the compass to make it perfect North. Will set angle at highest depending on AngleHigh

Note

by R1ch

Example:

GetWallAngle

Function GetWallAngle(Ps: TPointArray): Extended;

Get’s the Minimap angle using Walls. Returns Angle in Radians. Used in Maze.scar, but feel free to use for Perfect map aligning projects.

Note

by Wizzup?

Example:

RunAway

procedure RunAway(dir: string; RunFar: Boolean; Action, WaitTime: Integer);
  • Runs away in minimap related direction, based on north.

  • Dir can be ‘N’, ‘E’, ‘S’, ‘W’ or an angle in degrees (145, 93, 180, etc).

  • RunFar will run further than normal.

  • Action can be either 1, 2 or 3:

    1. RunAway + Wait(WaitTime) + RunBack
    2. RunAway + Wait(WaitTime)
    3. RunBack

Note

WaitTime is in milliseconds!

Note

by nielsie95 modified by ZephyrsFury

Example:

StoreToRoadColorArray

procedure StoreToRoadColorArray;

Stores RoadColor to an array. Debugging and logging purposes.

Note

by Wizzup? / WT-Fakawi, rewritten by EvilChicken!

Example:

GetOldRoadColors

function GetOldRoadColors: Boolean;

Checks if RoadColor matches with any color stored in RoadColors array. If successful, it sets the roadcolor.

Note

by Wizzup? / WT-Fakawi, edited by EvilChicken!

Example:

GetNewRoadColor

function GetNewRoadColor(xs, ys, xe, ye, tol: Integer): Boolean;

Searches for new RoadColor in box xs, ys, xe, ye by comparing all the colors found within box against current RoadColor.

Note

by Wizzup?/WT-Fakawi, edited by Ron & EvilChicken!

Example:

RoadColorChecker

function RoadColorChecker: Boolean;

Checks for presence of RoadColor. If none is found, it will try various methods to find it. If successful, it sets RoadColor to the new color.

Note

by Wizzup?/WT-Fakawi, edited by Ron & EvilChicken!

Example:

LinearWalkEx

function LinearWalkEx(var TPA: TPointArray; cx, cy, TheColor, tol, Direction, Radius: Integer): Boolean;

Finds TheColor from Radial (scanning outwards) for Radius Distance. Valid Arguments:

  • tpa. Result points.
  • Direction. Any number between 0-720. 0=N,90=E,180=S,270=W.
  • Radius. Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72

Note

by Nielsie95

Example:

RadialWalkEx

function RadialWalkEx(var TPA: TPointArray; cx, cy, TheColor, tol, StartRadial, EndRadial, Radius: Integer): Boolean;

Finds TheColor from StartRadial to EndRadial for Radius Distance. Valid Arguments:

  • tpa. Result points.
  • StartRadial/EndRadial. Any number between 0-720. 0=N,90=E,180=S,270=W.
  • Radius. Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72

Note

by Nielsie95

Example:

RadialWalk

function RadialWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod: Integer): Boolean;

Walks TheColor from StartRadial to EndRadial for Radius Distance Valid Arguments:

  • TheColor. Any Color, but Road- or WaterColor will do fine :)
  • StartRadial/EndRadial. Any number between 0-720. 0=N,90=E,180=S,270=W.
  • Radius. Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
  • XMod, YMod: deviation from MouseFindFlag. -2 to 2.

Note

by Nielsie95 from an original idea by WT-Fakawi

Example:

LinearWalk

function LinearWalk(TheColor, Direction, Radius, Xmod, Ymod: Integer): Boolean;

Walks TheColor from Direction MIDDLE OUT!by performing windscreenlike scanning movements for Radius Distance Valid Arguments:

  • TheColor. Any Color, but Road- or WaterColor will do fine :)
  • Direction. Any number between 0-720. 0=N,90=E,180=S,270=W.
  • Radius. Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72.
  • XMod, YMod: deviation from MouseFindFlag. -2 to 2.

Note

by Nielsie95 from another original idea by WT-Fakawi

Example:

LinearWalkTolerance

function LinearWalkTolerance(TheColor, Direction, Radius, Xmod, Ymod, Tol : Integer): Boolean;

Same as LinearWalk, but with a tolerance.

Note

by Nielsie95

Example:

RadialRoadWalk

function RadialRoadWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod: Integer): Boolean;

Walks TheColor from StartRadial to EndRadial for Radius Distance Valid Arguments:

  • TheColor. RoadColor. RoadColor will be dynamically updated.
  • StartRadial/EndRadial. Any number between 0-720. 0=N,90=E,180=S,270=W.
  • Radius. Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72 XMod, YMod: deviation from MouseFindFlag. -2 to 2.

Note

by WT-Fakawi?

Example:

RadialWalkTolerance

function RadialWalkTolerance(Color, sRadial, eRadial, r, modX, modY, Tol: Integer): Boolean;

Same as RadialWalk, but with a tolerance.

Note

by Coh3n

Example:

RadialWalkAutoColor

function RadialWalkAutoColor(autoColorConst, sRad, eRad, r, modX, modY: Integer): Boolean;

Uses the TAutoColorInfo record to radial walk.

Note

by Coh3n

Example:

LinearRoadWalk

function LinearRoadWalk(TheColor: Integer; Direction: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;

Walks TheColor from Direction MIDDLE OUT!by performing windscreenlike scanning movements for Radius Distance Valid Arguments:

  • TheColor. Any Color, but Road- or WaterColor will do fine :)
  • Direction. Any number between 0-720. 0=N,90=E,180=S,270=W.
  • Radius. Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
  • XMod, YMod: deviation from MouseFindFlag. -2 to 2.

Note

by Nielsie95

Example:

WaterWalk

function WaterWalk(StartRadial, EndRadial, Radius, FFlagBreakOut, Xoff, Yoff, Xmod, Ymod: Integer): Boolean;
Walks alongside Water.
  • StartRadial/EndRadial = Any number between 0-720. 0=N,90=E,180=S,270=W.
  • Radius. Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
  • FFlagBreakOut. Distance to flag where it will break out. 15 - 10 is good.
  • Xoff, Yoff. Added to found point.
  • XMod, YMod. deviation from MouseFindFlag. -2 to 2.

Note

by Nielsie95 from a third original idea by WT-Fakawi

Example:

GetMiniMapDotsIn

function GetMiniMapDotsIn(WhatDot: String; x1, y1, x2, y2: Integer): TPointArray;

Results the dots specified by WhatDot in x1, y1, x2, y2. Usage:

  • ‘npc’, ‘yellow’ = Yellow Dot;
  • ‘cape’, ‘blue’ = Blue Dot;
  • ‘item’, ‘red’ = Red Dot;
  • ‘player’, ‘white’ = White Dot;
  • ‘friend’, ‘green’ = Green Dot;

Note

by

Example:

GetMiniMapDots

function GetMiniMapDots(WhatDot: String): TPointArray;

Results the dots specified by WhatDot on the Minimap. See GetMiniMapDots in for more information.

Note

by Nava2

Example:

CountDots

function CountDots(WhatDot: String): integer;

Counts the occurance of WhatDot on the MiniMap. See GetMiniMapDots in for more information.

Note

by Nava2

Example:

MouseMM

procedure MouseMM(x, y, randX, randY: Integer);

Clicks (x, y) on the MM, taking Map Angle into Account. Be sure to choose the coords when Map Angle = 0 !

Note

by mixster

Example: