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
  • Interacting with an item that is on the ground


    Kirito
     Share

    Recommended Posts

    import org.dreambot.api.wrappers.items.GroundItem;

     

    GroundItem bones = getGroundItems().closest("Bones");

     

    bones.interact("Take");

    Link to comment
    Share on other sites

    import org.dreambot.api.wrappers.items.GroundItem;

     

    GroundItem bones = getGroundItems().closest("Bones");

     

    bones.interact("Take");

    ty ^^ i'm kinda fucked now --' i closed the window where you see all the packages and sources -.-

    Link to comment
    Share on other sites

    What? In your IDE? What are you using

    fixed it now i'm in need off a counter so i currently got this int bID = 1050; but i have 8 items that need to be counted how would i make it count the 8 items?

    Link to comment
    Share on other sites

    Not sure what you mean

    so i'm working on my paint right now but for now lets say iron ore was looted while it also needs to loot coal tin copper etc but now it only counts iron ore while it needs to count all the other ores

     

     

     

    public void pick(String[] party) {
           int bID = 1050;
           if (getInventory().isFull()){
                   if (getLocalPlayer().distance(party) >3) {
                       getWalking().walk(party);
                       sleepUntil(() ->!getLocalPlayer().isMoving(), 300);
                   }else if (!getLocalPlayer().isAnimating() && !getLocalPlayer().isMoving() && party.exists() && party.isOnScreen()) { //&& myORE != null
                       int bCount = getInventory().count(438);
                       party.interact("Take");
                           if(getLocalPlayer().isAnimating()) {
                               sleepUntil(() -> getInventory().count(bID) > bCount, Calculations.random(10000, 15000));
                               picked++;
                           }
                   }else getCamera().rotateToEntity(getGroundItems().closest(party));
               }else if (getInventory().isFull()) {
                   State = State.BANK;
               }
           }
    Edited by Kirito
    Link to comment
    Share on other sites

    GroundItem groundItemsToLoot = getGroundItems().closest("item1", "item2");
    if (groundItemsToLoot != null)
       groundItemsToLoot.interact("Take");
    

    something like that. written off the top of my head.

     

    Look here for more information http://dreambot.org/javadocs/

    For multiple counters

     

    just make a switch(int) and pass the groundItem id. if it matches the case -> increment by 1 on the specified variable

    Link to comment
    Share on other sites

     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.