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
  • Why does the bot hover ABOVE the item it wants to interact with?


    Deniii

    Recommended Posts

    So I am learning the API of Dreambot and making a simple Cowhide looter/Cow killer that banks in Al-Kharid. The script works pretty good, but sometimes it just messes up and I have to restart the script.

     

    Basically the bot does not click on the cows to attack nor clicks on the cowhides to loot. Instead it "tries" to click it while hovering ABOVE the item thus not getting the interact option at all.

    This only happens sometimes, and when it does happen - a restart is needed. Is this a bug with Dreambot or something wrong with my code?

            if (groundItem != null)
            {
                log("Taking cowhides.");
                //get current inv count
                int inventoryCount = getInventory().fullSlotCount();
                //take cowhide
                if (!groundItem.isOnScreen())
                {
                    getCamera().rotateToEntity(groundItem);
                }
                if (groundItem.interact("Take"))
                {
                    //sleep until it is picked up or after 6 seconds.
                    if(sleepUntil(() -> getInventory().fullSlotCount() > inventoryCount, 6000))
                    {
                        hidesLooted++;
                    }
                }
    
            }
    

    It keeps twitching the camera a little (like the item is not on screen, but really small camera movements) and hovers above the item instead of actually putting the cursor on the item and interacting.

    Link to comment
    Share on other sites

    Make sure your client is at default zoom and fixed video mode.

     

    fixedMode.gif

    Thanks, I forget that when debugging and zooming etc.

     

    wow that sleep until is really clever :P will copy

    Yeah, it is so we can be 100% sure that we picked up something.

    Link to comment
    Share on other sites

    • 2 weeks later...

    Dreambot's client automatically sets the fixed static video, so that's not a big deal. The zoom is different though :P

    Link to comment
    Share on other sites

    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.