Jugg_ 6 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.
Hans Zimmer 26 Posted August 15, 2022 We can't really help you unless you show us some piece of code.
420x69x420 73 Posted August 15, 2022 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
Jugg_ 6 Author 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
420x69x420 73 Posted August 16, 2022 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).
420x69x420 73 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_ 6 Author 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.
mcleod63 2 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.