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
  • Fast clicking in inventory (i.e herb cleaning, shift dropping, etc.)


    Chichoo

    Recommended Posts

    Posted

    Hi all,

    I was wondering how I should go about doing clicks in an inventory full of items, is there a concrete way of doing it or is brute forcing clicks the usual go? When I want to use -> item it'll take a long time to go through the inventory. I would like to mimic a more human speed. If anyone could provide a snippet or point me in the right direction, that would be super helpful!

    Thank you in advance.

    Posted
    public void dropItems() {
    	int dropOrder[] = {0,1,2,3,7,6,5,4,8,9,10,11,15,14,13,12,16,17,18,19,23,22,21,20,24,25,26,27};
    	getKeyboard().pressShift();
    	for(int i : dropOrder) {
    		Item item = getInventory().getItemInSlot(i);
    		if(item != null && !shouldKeep(item.getName())) {
    			item.interact();
    			sleep(150, 300);
    		}
    	}
    	getKeyboard().releaseShift();
    }
    
    public boolean shouldKeep(String itemName) {
    	return itemName.equals("Coins") || itemName.contains(" axe");
    }

    I made this a while ago to shift drop items, you can adapt it to work for you. :) 

    Posted

    Thank you! It works flawlessly! What exactly does the sleep function do?

    Posted
    1 hour ago, Chichoo said:

    Thank you! It works flawlessly! What exactly does the sleep function do?

    It sleeps the current thread, which is the ScriptExecutor Thread.

    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.