Jump to content

Fixed walking API


Maxi

Recommended Posts

  • Developer

Hi everyone! I have fixed the walking completely. It was unfortunate it wasn't tested that well before, but when I had a closer look the method to calculate minimap coordinates was completely off. I have also extend the api for walking, making it as customizable as you like:

 

     /**     * Walks to a location and makes sure your ending position is the specified destination.     * @param dest The specified destination to go to.     * @return     * @throws InterruptedException     */    public boolean walkExact(Position dest) throws InterruptedException     /**     * Walks to a location and makes sure your ending position is the specified destination.     * @param dest The specified destination to go to.     * @param mainScreenDistanceThreshold The distance to the destination for which this method will use main     *                                    screen walking. Beyond this distance, it will use minimap walking.     * @return     * @throws InterruptedException     */    public boolean walkExact(Position dest, int mainScreenDistanceThreshold) throws InterruptedException      /**     * Walks to a location but doesn't make sure your ending destination is exactly as specified. Usually it will be,     * but it could be 1 or 2 tiles off.     * @param dest The specified destination to go to.     * @return     * @throws InterruptedException     */    public boolean walk(Position dest) throws InterruptedException      /**     * Walks to a location with the specified distance threshold for main screen walking, but doesn't make sure     * your ending destination is exactly as specified. Usually it will be,     * but it could be 1 or 2 tiles off.     * @param dest The destination specified to go to.     * @param mainScreenDistanceThreshold The distance to the destination for which this method will use main     *                                    screen walking. Beyond this distance, it will use minimap walking.     * @return     * @throws InterruptedException     */    public boolean walk(Position dest, int mainScreenDistanceThreshold) throws InterruptedException	 /**	 * Walks towards a position on the map.	 * @param dest The destination.     * @param forcePosition Whether or not to make sure the ending position is the same as the specified destination.     * @param mainScreenDistanceThreshold The distance to the destination for which this method will use main     *                                    screen walking. Beyond this distance, it will use minimap walking.	 * @throws InterruptedException	  */	public boolean walk(Position dest, boolean forcePosition, int mainScreenDistanceThreshold) throws InterruptedException
  • Like 1
Link to comment
Share on other sites

  • Developer

Furthermore we added a fix for checking entity facing where it regarded other characters facing your local player. This functions properly now. I also added this little method for it, to make it easier to check:

/**     * Returns whether this character is facing, or as you may call it interacting, with the     * specified Character.     * @param character The specified character.     * @return     */    public boolean isFacing(Character character)
Last but not least Laz and I are trying to get this update ready for today with the features we mentioned all over the forums.Stay tuned,Maxi
Link to comment
Share on other sites

sweet man thanks for all the work. I am correct in my understanding that the bot's walking method walkExact for example will walk to any given tile in the game without the need to set up pathing (of course sometimes it may be desired, for which you could just use a number of walk methods using closer together directed tiles) ?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...