Jump to content

Override client settings for random/user input handling


Solzhenitsyn

Recommended Posts

thats really, really sketchy

 

It's because I'm using a mouse listener to to add user input to the event queue so that they will not interrupt the script logic.

 

I wish you wouldn't assume the worst about my intentions, especially considering I typically make scripts for my own personal use.

Edited by Solzhenitsyn
Link to comment
Share on other sites

It's because I'm using a mouse listener to to add user input to the event queue so that they will not interrupt the script logic.

 

I wish you wouldn't assume the worst about my intentions, especially considering I typically make scripts for my own personal use.

I would like to see an answer to this as well. The bots over obfuscation really limits script flexibility for fully automated farms. 

Link to comment
Share on other sites

I don't see any reason why it's hindering you.

 

Break handler in the way? Make your own

Login Handler override? It's possible

Dismiss randoms? Enable it once, quit client, restart and it's on until the next time you disable it, or write your own

Capture user input? Paint a canvas sized element that is transparrent and captures clicks

...

 

 

 

Edited by Abuse
  • Like 1
Link to comment
Share on other sites

From what I understand you want to capture if a user clicks somewhere, and add it to the event queue to the bot will execute that sometime in the future. Capturing the user input is actually easier than you'd think:

private BotMouseListener listener = new BotMouseListener() {
    // Required funcs
    @ Override
    public void mouseReleased(MouseEvent e) {}
    @ Override
    public void mousePressed(MouseEvent e) {}
    @ Override
    public void mouseExited(MouseEvent e) {}
    @ Override
    public void mouseEntered(MouseEvent e) {}
    @ Override
    public void mouseClicked(MouseEvent e) {
        if (e.getPoint().equals(getMouse().getPosition()))
            return; // The bot generated this click, ignore it
        
        if (getClient().isHumanInputEnabled())
           return; // Ignore incase they have human input enabled
        
        // Queue human interaction or w/e
    }
}
 
// Then add these lines to script startup
getBot().getCanvas().addMouseListener(listener);

// Then add these lines to script stop
getBot().getCanvas().removeMouseListener(listener);
 

From here you can make a queue that your script can process when it is ready.

 

Edit: Also in the future, its usually easier to explain your end-game (in this case queuing user actions to be performed by the bot). Tends to get more possible solutions quicker.

Edit2: OSBot don't like my "@ Override" (references some banned dude lol), so had to add spaces. Heres a pastebin: http://pastebin.com/kVzsuAba

Edited by Lemons
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...