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
  • Try asking for help in the chatbox
  • Problems with initiating RandomManager object


    una_maquina
     Share

    Recommended Posts

    Hey, I wanna basically stop autologin solver and then re-enable it again after condition is met; but I'm having "you can't run non-static on static" error.

    So usually when this happens, I just initiate a class object:

    RandomManager rm = new RandomManager();

    But it asks for Thread and Abstract script inputs, and that's what I don't get -- what are those? I tried putting in:

    RandomManager rm = new RandomManager(null, null);

    But then it doesn't work when I do rm.disableSolver(RandomEvent.LOGIN); it doesn't disable the solver.

    Link to comment
    Share on other sites

    Have you tried getting the already existing RandomManager and using that? Something like what I have below.

    getRandomManager().disableSolver(RandomEvent.LOGIN);

     

    Link to comment
    Share on other sites

    On 5/16/2021 at 1:07 AM, Bonfire said:

    Have you tried getting the already existing RandomManager and using that? Something like what I have below.

    
    getRandomManager().disableSolver(RandomEvent.LOGIN);

     

    Just tried putting it in, says the method is undefined :( 

    Looks like I need to define RandomManager object, but then again, what the heck are those two parameters it needs? Thread and AbstractScript

    Edited by una_maquina
    Link to comment
    Share on other sites

    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • 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.