GPSwap Posted August 4, 2017 Share Posted August 4, 2017 (edited) kick = widgets.getWidgetContainingText(7, user); log(kick); if(kick.interact("Kick user " + user)){ sleep(5000); } when running this because of how ccs work(both leftclick and rightclick just open the "rightclick"dropdown menu) it thinks the action was sucessfull but it wasn't it just opens the options menu anyone know a way to fix this? Edited August 4, 2017 by GPSwap Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted August 4, 2017 Share Posted August 4, 2017 Try an InteractionEvent maybe although I'm not sure it'll make a difference, otherwise just use a right click and the menu API although that's a bodge fix IMO 1 Quote Link to comment Share on other sites More sharing options...
GPSwap Posted August 4, 2017 Author Share Posted August 4, 2017 (edited) 5 minutes ago, HeyImJamie said: Try an InteractionEvent maybe although I'm not sure it'll make a difference, otherwise just use a right click and the menu API although that's a bodge fix IMO InteractionEvent didnt work, but menu api did, it takes a couple trys but it works, thankyou Edited August 4, 2017 by GPSwap Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted August 4, 2017 Share Posted August 4, 2017 (edited) 13 minutes ago, GPSwap said: InteractionEvent didnt work, but menu api did, it takes a couple trys but it works, thankyou Why's it take a few tries? Haven't tested but something like this should work ;o private boolean kickPlayer(String username){ if (getMenuAPI().isOpen()){ if (getMenuAPI().selectAction("Kick user")){ return true; } } else { RS2Widget userWidget = getWidgets().getWidgetContainingText(7, username); if (userWidget != null){ if (userWidget.interact()){ new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getMenuAPI().isOpen(); } }.sleep(); } } } return false; } } Edited August 4, 2017 by HeyImJamie 1 Quote Link to comment Share on other sites More sharing options...