Jump to content

setHumanInputEnabled alternative?


Botre

Recommended Posts

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
Link to comment
Share on other sites

 

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
Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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