Walker ====== ---- TRSWalker.GetMyPos ~~~~~~~~~~~~~~~~~~ :: function TRSWalker.GetMyPos: TPoint; Returns the players current position on the loaded map. Example:: WriteLn(Walker.GetMyPos()); // Check to see the match percentage if needed WriteLn(Walker.Similarity); ---- TRSWalker.WalkPath ~~~~~~~~~~~~~~~~~~ :: function TRSWalker.WalkPath(Path: TPointArray; WaitUntilDistance: Int32 = 0): Boolean; Walks a path of points taken from the loaded map. We advice that WaitUntilDistance is not 0. Parameters ---------- Path Array of points taken from the loaded map to walk. Must be ordered from start to finish. WaitUntilDistance Determines when the method returns once the final point has been clicked. Default value: 0. | *WaitUntilDistance=0* waits until the player has reached the final point. | *WaitUntilDistance=20* waits until the player is within 20 pixels of the final point. Example:: Walker.WalkPath([[100,100],[120,120],[140,140],[160,160],[180,180]]); ---- TRSWalker.WalkBlind ~~~~~~~~~~~~~~~~~~~ :: function TRSWalker.WalkBlind(Destination: TPoint; WaitUntilDistance: Int32 = 0): Boolean; "Blindly" walks to a point taken from the loaded map. A straight line is generated between the player's position and destination which is then walked. Parameters ---------- Destination Destination point taken from the loaded map. WaitUntilDistance Determines when the method returns once the final point has been clicked. Default value: 0. | *WaitUntilDistance=0* waits until the player has reached the final point. | *WaitUntilDistance=20* waits until the player is within 20 pixels of the final point. Example:: Walker.WalkBlind([300, 300]); ---- TRSWalker.WebWalk ~~~~~~~~~~~~~~~~~ :: function TRSWalker.WebWalk(Destination: TPoint; WaitUntilDistance: Int32 = 0; PathRandomness: Extended = 0): Boolean; Web walks to the destination point on the loaded map. Does **not** handle any obstacles. Please run ``webber.simba`` to see how webgraphs are built. Pre built webgraphs are available for "World" and "Zeah" when used. Parameters ---------- Destination Destination point taken from the loaded map. WaitUntilDistance Determines when the method returns once the final point has been clicked. Default value: 0. | *WaitUntilDistance=0* waits until the player has reached the final point. | *WaitUntilDistance=20* waits until the player is within 20 pixels of the final point. PathRandomness Randomness to add to the path so the absoulte shortest path isn't always taken. Must be between 0..1 Example:: var Walker: TRSWalker; Walker.Setup('world'); Walker.WebWalk([4595, 3575]); // Lumbridge // Or use a location from the webgraph Walker.WebWalk(WorldWeb.LOCATION_LUMBRIDGE); ---- TRSWalker.DebugPosition ~~~~~~~~~~~~~~~~~~~~~~~ :: procedure TRSWalker.DebugPosition(EnsureVisible: Boolean = True); DESC Example:: EXAMPLE ---- TRSWalker.GetTileMSEx ~~~~~~~~~~~~~~~~~~~~~ :: function TRSWalker.GetTileMSEx(Me, Loc: TPoint; TileVector: Vector3 = [1, 1, 0]; Offset: Vector2 = [0, 0]): TQuad; Used to convert a coordinate in our map to a tile on the mainscreen relative to the position passed in to **Me**. This can be used to predict location of things before hand by passing in our future position or the current location by passing in TRSWalker.GetMyPos(). To achieve this it calls **Minimap.GetTileMS()** internally. TileVector is used to specify the size and height of the tile: **TileVector.X** is the size of the rectangle from west to east in game. **TileVector.Y** is the size of the rectangle from north to south in game. **TileVector.Z** is the height of the rectangle in game. There's no way to accurately measure it but for a rough idea, a player's height is about 6 or 7. To accurately guessing the height you need you should use **Debug()** like the example below. Example:: MyTile := [100, 100]; Debug(Walker.GetTileMSEx(Walker.GetMyPos(), MyTile)); ---- TRSWalker.GetTileMS ~~~~~~~~~~~~~~~~~~~ :: function TRSWalker.GetTileMSEx(Me, Loc: TPoint; WESize, NESize: Double = 1; Height:Double=0; Offx,Offy:Double=0): TQuad; Method to convert a coordinate in our map to a tile on the mainscreen without the need to pass in our position. This calls TRSWalker.GetTileMSEx internally with TRSWalker.GetMyPos() passed in. TileVector is used to specify the size and height of the tile: **TileVector.X** is the size of the rectangle from west to east in game. **TileVector.Y** is the size of the rectangle from north to south in game. **TileVector.Z** is the height of the rectangle in game. There's no way to accurately measure it but for a rough idea, a player's height is about 6 or 7. To accurately guessing the height you need you should use **Debug()** like the example below. Example:: MyTile := [100, 100]; Debug(Walker.GetTileMS(MyTile));