Jugg_ 6 Share Posted August 15, 2022 I feel like im just missing something here. I'm working on a script for fishing. Everything works perfectly until the first log-out break timer hits, it breaks for the appropriate amount of time and logs back in. After logging back in it gets caught in a walking loop like it doesnt know where it is, even though its in the same exact spot that it was able to click the fishing spots from last time. Am i missing something? I can send screenshots if needed but since it works perfect until the break im stumped. Link to comment Share on other sites More sharing options...
Hans Zimmer 19 Share Posted August 15, 2022 We can't really help you unless you show us some piece of code. Link to comment Share on other sites More sharing options...
Jugg_ 6 Author Share Posted August 15, 2022 Here's the loop Link to comment Share on other sites More sharing options...
420x69x420 72 Share Posted August 15, 2022 (edited) change if(Inventory.isFull()) to else, also are you using the built-in Dreambot breaks? Or your own custom functions to break? And most likely also have to post code for startFishing(fishingAction), walkTo(Area), and startBanking(), cuz otherwise it looks good to me Edited August 15, 2022 by 420x69x420 Link to comment Share on other sites More sharing options...
Jugg_ 6 Author Share Posted August 15, 2022 I am attempting to use dreambot's built-in breaks, and this issue is happening on all of my scripts. Ill get some screenshots together, thanks for the help Link to comment Share on other sites More sharing options...
Jugg_ 6 Author Share Posted August 15, 2022 Link to comment Share on other sites More sharing options...
420x69x420 72 Share Posted August 16, 2022 (edited) I do believe that you should access your player as Players.localPlayer() every time instead of setting Player player = Players.localPlayer() on script start. Or at least re-assign it on each loop. Because after login that old Player object is null and your same acc has a new Player object I think (I am not sure). Edited August 16, 2022 by 420x69x420 Jugg_ 1 Link to comment Share on other sites More sharing options...
420x69x420 72 Share Posted August 16, 2022 Here's what I tested on this, I started the tester script which assigned a local Player object on start and compares it to current player, then I enabled mouse and logged out manually, let the Login Solver log me in, and the results indicate that my character was assigned a new Player Object but the old one is not null, yet doesn't exist and has fixed location and therefore is not suitable to use anymore, you must re-assign the Player Object after logout Jugg_ and abouhanafy87 1 1 Link to comment Share on other sites More sharing options...
Jugg_ 6 Author Share Posted August 16, 2022 That seems to have done it! Makes sense when you explain it that way. Thank you so much for helping out! I had a variable for Players.localPlayer() and once i swapped it like you said it works after a break. 420x69x420 1 Link to comment Share on other sites More sharing options...
mcleod63 2 Share Posted April 23, 2023 Wow! Excellent detective work by 420x69x420 to track this down. I recently changed from using Players.getLocal() to using hero (I placed public static Player hero = Players.getLocal() at the top of my script). Sure enough, I found the bot walking aimlessly inside Edgeville bank, and the log showed that it started immediately after returning from a short break and had been doing it for 30 minutes before I saw it. I'm keeping my fingers crossed that jagex won't see it. No more nicknames for my bot - it will always be Players.getLocal() in future. 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