Botre Posted June 6, 2016 Posted June 6, 2016 (edited) A few changes were made to prevent Scripters from touching things that would affect either the entire client or other scripts. Most notably, GameConstants has been hidden and setHumanInputEnabled has had the functionality stripped. For the human input, there are a lot of other ways to achieve the same result. Which alternatives exactly? Question: how can I programatically enable / disable human input without the setHumanInputEnabled(bool) method. Am I really going to have to write my own flag for this that might end up contradicting the "button" one and cause endless confusion? Edited June 6, 2016 by Botre
Token Posted June 6, 2016 Posted June 6, 2016 Detect user clicks on the canvas, send raycasts in runescape space and simulate it as bot input.
Botre Posted June 6, 2016 Author Posted June 6, 2016 Detect user clicks on the canvas, send raycasts in runescape space and simulate it as bot input. My question is: how can I programatically enable / disable human input without the setHumanInputEnabled(bool) method.
Token Posted June 6, 2016 Posted June 6, 2016 My question is: how can I programatically enable / disable human input without the setHumanInputEnabled(bool) method. Not possible in my opinion, but you can simulate the effect of human input as described above.
Botre Posted June 6, 2016 Author Posted June 6, 2016 Not possible in my opinion, but you can simulate the effect of human input as described above. Yeah nvm, I don't think you get my question :p
Token Posted June 6, 2016 Posted June 6, 2016 Yeah nvm, I don't think you get my question :p "Not possible" doesn't sound like an off-topic answer to me.
Botre Posted June 6, 2016 Author Posted June 6, 2016 (edited) Why do you still need that feature? if(state == SELECT_ITEM_WITH_MOUSE) setMouseInputEnabled(true); vs. if(state == SELECT_ITEM_WITH_MOUSE) message("Enable mouse input yourself to select item") Edited June 6, 2016 by Botre
Explv Posted June 6, 2016 Posted June 6, 2016 (edited) if(state == SELECT_ITEM_WITH_MOUSE) setMouseInputEnabled(true); vs. if(state == SELECT_ITEM_WITH_MOUSE) message("Enable mouse input yourself to select item") I don't think there is a way of enabling mouse input any more. You could always try and do some hacky stuff like this: getBot().getCanvas().addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { super.mouseClicked(e); getBot().getMouseEventHandler().generateBotMouseEvent( e.getID(), e.getWhen(), e.getModifiers(), e.getX(), e.getY(), e.getClickCount(), false, e.getButton(), true ); } }); Edited June 6, 2016 by Explv
Botre Posted June 6, 2016 Author Posted June 6, 2016 I don't think there is a way of enabling mouse input any more. You could always try and do some hacky stuff like this: getBot().getCanvas().addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { super.mouseClicked(e); getBot().getMouseEventHandler().generateBotMouseEvent( e.getID(), e.getWhen(), e.getModifiers(), e.getX(), e.getY(), e.getClickCount(), false, e.getButton(), true ); } });