Deep Slayer 20 Share Posted January 12 (edited) Hi everyone, I'm currently developing a script and have encountered a problem related to the player's position in relation to a specific area after world hopping. The issue is primarily with the East-West coordinates. Lets say this is the defined area in my script for example: private final Area myArea = new Area(1234, 1235, 1236, 1237); After the bot performs a world hop, its understanding of its position in relation to myArea becomes inaccurate. Specifically, the bot perceives itself to be about 8-10 tiles East or West of where it actually is. This error is throwing off the script's logic, as it thinks it's in one area when, in reality, it's off by a significant margin. Interestingly, the North-South coordinates remain accurate; the issue is only with the East-West alignment. I have tried implementing a 15-20 second delay between each world hop to address this, but the problem persists. Also note that the script works perfectly until a world hop occurs I've pasted my world hop logic below Has anyone else experienced this? Any insights or solutions would be greatly appreciated. Thank you! private void hopToWorld() { World world = Worlds.getRandomWorld(w -> w.isF2P() && !w.isPVP() && w.getMinimumLevel() == 0); WorldHopper.hopWorld(world); sleep(15000,20000); } Edited January 12 by Deep Slayer Link to comment Share on other sites More sharing options...
MaximusPrimo 59 Share Posted January 12 I think there is something wrong with your script logic here because your position doesn't change if you hop worlds. The issue won't be with your hop logic. If you enable 'show player position' in the client does the position actually change after hopping? Link to comment Share on other sites More sharing options...
Deep Slayer 20 Author Share Posted January 12 (edited) 10:26:17 am: [SCRIPT] MY CURRENT POSITION BEFORE HOP: (3073, 3856, 0) 10:26:34 am: [SCRIPT] MY CURRENT POSITION AFTER HOP: (3073, 3864, 0) using myPlayer.getTile()); to read those coordinates before and after using the below method private void hopToWorld() { World world = Worlds.getRandomWorld(w -> w.isF2P() && !w.isPVP() && w.getMinimumLevel() == 0); WorldHopper.hopWorld(world); sleep(15000,20000); } The Player position in developer mode on the client is different than getTile() method after hopping worlds although its the same, before hopping. Edited January 12 by Deep Slayer Link to comment Share on other sites More sharing options...
Aeglen 294 Share Posted January 13 23 minutes ago, Deep Slayer said: 10:26:17 am: [SCRIPT] MY CURRENT POSITION BEFORE HOP: (3073, 3856, 0) 10:26:34 am: [SCRIPT] MY CURRENT POSITION AFTER HOP: (3073, 3864, 0) using myPlayer.getTile()); to read those coordinates before and after using the below method private void hopToWorld() { World world = Worlds.getRandomWorld(w -> w.isF2P() && !w.isPVP() && w.getMinimumLevel() == 0); WorldHopper.hopWorld(world); sleep(15000,20000); } The Player position in developer mode on the client is different than getTile() method after hopping worlds although its the same, before hopping. 1) You should ensure the world is properly loaded in after the hop 2) You should re-grab the player every time, changing worlds probably invaldiates the old Player object and puts it to 0,0 of the chunk or something. Deep Slayer 1 Link to comment Share on other sites More sharing options...
Deep Slayer 20 Author Share Posted January 13 Problem fixed - I realized that the player was instantiated outside the main loop. Thanks for the help, @Aeglen!" Thanks, @Aeglen Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now