Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Script breaking after logging in from break


    Jugg_

    Recommended Posts

    Posted

    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.

    Posted

    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

    Posted

    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

    Posted

    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).

    Posted

    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 logoutMaMo6BA.png

    Posted

    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.

    • 8 months later...
    Posted

    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. 

     

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.