Zenarchist 40 Share Posted September 17, 2018 Hey guys, I'm having a bit of trouble getting shift-drop to work in my scripts. I just can't seem to get shift to hold properly no matter what I try. There is no information on the DreamBot API about key holding so I am just trying to wing it using IntelliJ's code suggestions: // Check if quick drop is activated, otherwise use menu to drop if(action.equals("Drop") && quickDropActive() && gui.getBoolean("shift")) { final int idx = i; getKeyboard().holdShift(() -> getInventory().getItemInSlot(CLICK_ORDER[idx]) == null, r(250, 500)); //s.getKeyboard().setHoldingShift(true); getMouse().move(getInventory().getItemInSlot(CLICK_ORDER[i]).getDestination()); sleep(1, 25); getMouse().click(); } else getInventory().slotInteract(CLICK_ORDER[i], r(0, 100) < 1 && action.equals("Drop") ? "Examine" : action); Neither getKeyboard().holdShift() nor getKeyboard().setHoldingShift() seem to have any affect on my script, it just keeps clicking items and using them on each other 😕 what am I doing wrong? Link to comment Share on other sites More sharing options...
rubex 28 Share Posted September 17, 2018 This is a very simplified version of what I use: main.getKeyboard().pressShift(); for(Item item : itemsToDrop) { item.interact("Drop"); } main.getKeyboard().releaseShift(); Link to comment Share on other sites More sharing options...
Zenarchist 40 Author Share Posted September 17, 2018 Interesting, thanks bro I'll give that a try! Link to comment Share on other sites More sharing options...
Zenarchist 40 Author Share Posted September 23, 2018 Thanks brother! That approach works perfectly Link to comment Share on other sites More sharing options...
century 26 Share Posted October 1, 2018 Glad this works for you! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.