Jump to content

setHumanInputEnabled alternative?


Recommended Posts

Posted (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 by Botre
Posted (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 by Explv
Posted

 

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
        );
    }
});

 

240x196px-LL-e66ddef6_reverse-1253886001

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...