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
  • Mouse.click will right click sometimes


    greekhaima

    Recommended Posts

    sleepUntil ( () ->org.dreambot.api.methods.magic.Magic.castSpell(toCast), 40);
    sleepUntil ( () ->Mouse.move(enemy), 300);
    Mouse.click(false);

     

    I have the following code but it will right click sometimes instead. 

     

    Also tried this but it will move the camera randomly and weird sometimes:

     

    Magic.castSpellOn(toCast, enemy), 100)
    Link to comment
    Share on other sites

    9 hours ago, greekhaima said:
    sleepUntil ( () ->org.dreambot.api.methods.magic.Magic.castSpell(toCast), 40);
    sleepUntil ( () ->Mouse.move(enemy), 300);
    Mouse.click(false);

     

    I have the following code but it will right click sometimes instead. 

     

    Also tried this but it will move the camera randomly and weird sometimes:

     

    Magic.castSpellOn(toCast, enemy), 100)

    Try enemy.interactForceLeft();

    Edited by Genius
    Link to comment
    Share on other sites

    You don't need to sleep until, do:

    if(!Magic.castSpellOn(toCast, enemy)) return;

    Sleep.sleep(300,1000);

    You need to always randomize your sleeping times, Sleep#sleep, if you give two numbers, it will randomize the sleeping time for you, and when you're using Sleep#sleepUntil, use Calculations.random(2000,4000) for the timeout:

    sleepUntil ( () ->Mouse.move(enemy), 300); =====> sleepUntil ( () ->Mouse.move(enemy), Calculations.random(300,600));

    Hope this helps.

     

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