Mapwalk ======= The Mapwalk include contains all Mapwalking functions MakeCompass ~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal SetAngle ~~~~~~~~ .. code-block:: pascal procedure SetAngle(Highest : Boolean); Sets the mainscreen at highest\lowest angle (Depends on the boolean) .. note:: by Raymond, edit by NaumanAkhlaQ Example: .. code-block:: pascal ClickNorth ~~~~~~~~~~ .. code-block:: pascal procedure ClickNorth(AngleHigh : boolean); Clicks the compass to make it perfect North. Will set angle at highest depending on AngleHigh .. note:: by R1ch Example: .. code-block:: pascal GetWallAngle ~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal RunAway ~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal StoreToRoadColorArray ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure StoreToRoadColorArray; Stores RoadColor to an array. Debugging and logging purposes. .. note:: by Wizzup? / WT-Fakawi, rewritten by EvilChicken! Example: .. code-block:: pascal GetOldRoadColors ~~~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal GetNewRoadColor ~~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal RoadColorChecker ~~~~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal LinearWalkEx ~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal RadialWalkEx ~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal RadialWalk ~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal LinearWalk ~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal LinearWalkTolerance ~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function LinearWalkTolerance(TheColor, Direction, Radius, Xmod, Ymod, Tol : Integer): Boolean; Same as LinearWalk, but with a tolerance. .. note:: by Nielsie95 Example: .. code-block:: pascal RadialRoadWalk ~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal RadialWalkTolerance ~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function RadialWalkTolerance(Color, sRadial, eRadial, r, modX, modY, Tol: Integer): Boolean; Same as RadialWalk, but with a tolerance. .. note:: by Coh3n Example: .. code-block:: pascal RadialWalkAutoColor ~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function RadialWalkAutoColor(autoColorConst, sRad, eRad, r, modX, modY: Integer): Boolean; Uses the TAutoColorInfo record to radial walk. .. note:: by Coh3n Example: .. code-block:: pascal LinearRoadWalk ~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal WaterWalk ~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal GetMiniMapDotsIn ~~~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal GetMiniMapDots ~~~~~~~~~~~~~~ .. code-block:: pascal function GetMiniMapDots(WhatDot: String): TPointArray; Results the dots specified by WhatDot on the Minimap. See GetMiniMapDots in for more information. .. note:: by Nava2 Example: .. code-block:: pascal CountDots ~~~~~~~~~ .. code-block:: pascal function CountDots(WhatDot: String): integer; Counts the occurance of WhatDot on the MiniMap. See GetMiniMapDots in for more information. .. note:: by Nava2 Example: .. code-block:: pascal MouseMM ~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal