Page 5 of 9 FirstFirst ... 34567 ... LastLast
Results 101 to 125 of 222

Thread: Pumba [OSR color java bot] dev thread

  1. #101
    Join Date
    Feb 2015
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    dude this looks so sick cant wait to see this actually become one of the topbots (get my pun?) LOL.

  2. #102
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Looks like everything is coming together! Wish i had a long enough stick so i could poke you every now an then.. for the odd motivation =P

    ** them dam typos

    <------------------>



  3. #103
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by AFools View Post
    Looks like everything is coming together! Wish i had a long enough stick so i could poke you ever now an then.. for the odd motivation =P
    https://www.youtube.com/watch?v=otCpCn0l4Wo can't touch this (or in this case, me)


    some really BIG changes today, check the dev thread in a few hours for more information!

  4. #104
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    https://www.youtube.com/watch?v=otCpCn0l4Wo can't touch this (or in this case, me)


    some really BIG changes today, check the dev thread in a few hours for more information!
    Don't tell me that! now i'm refreshing the page every minute!

    <------------------>



  5. #105
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by AFools View Post
    Don't tell me that! now i'm refreshing the page every minute!
    Im still at school for a few more hours

  6. #106
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Although I'm also looking forward to pumba being released, I'm a little interested in how you structured the bot.. I know how a basic client loader is put together but I'd like some more info on what makes the bot work.. Could you tell me some of the functions you borrowed/ported from SRL/Simba into java (BL's mouse splines come to mind)? What is different? How will break handling work and stuff like that..?
    P.s. Get on steam

  7. #107
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    Although I'm also looking forward to pumba being released, I'm a little interested in how you structured the bot.. I know how a basic client loader is put together but I'd like some more info on what makes the bot work.. Could you tell me some of the functions you borrowed/ported from SRL/Simba into java (BL's mouse splines come to mind)? What is different? How will break handling work and stuff like that..?
    P.s. Get on steam
    Benland's mouse splines were originally written in Java. No need to port, the original source is still widely available. And its distributed with SMART.

    As far as what makes it work...

    1) You said you know how to put together a client loader - so we will skip all that
    2) Next is deciding approach. This one is color. Java has many, many many useful things built in. For example, BufferedReader.getRGB(x, y).
    3) The bot has an abstract class (or interface) called (for example) BotScript.
    4) The script writer includes the bot as a dependency, has their script extend BotScript.
    5) Bot side uses a ClassLoader to load scripts and execute them.

    Very brief points. If you'd like more info on a specific topic and less generic then feel free to ask cheers!

  8. #108
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Quote Originally Posted by the bank View Post
    Benland's mouse splines were originally written in Java. No need to port, the original source is still widely available. And its distributed with SMART.

    As far as what makes it work...

    1) You said you know how to put together a client loader - so we will skip all that
    2) Next is deciding approach. This one is color. Java has many, many many useful things built in. For example, BufferedReader.getRGB(x, y).
    3) The bot has an abstract class (or interface) called (for example) BotScript.
    4) The script writer includes the bot as a dependency, has their script extend BotScript.
    5) Bot side uses a ClassLoader to load scripts and execute them.

    Very brief points. If you'd like more info on a specific topic and less generic then feel free to ask cheers!
    I was wondering specifically about the colour detection part and the mouse actions though I guess he would use the event listener? I've never actually used it but I've heard it requires a bit of work to simulate a real mouse event..

  9. #109
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    I was wondering specifically about the colour detection part and the mouse actions though I guess he would use the event listener? I've never actually used it but I've heard it requires a bit of work to simulate a real mouse event..
    Okay I'll try and touch on those and give you some insight

    Color detection:

    As I mentioned earlier, Java has great built in functions for this. With a little adaptation, it is easy to create something very simba-esque.

    BufferedImage.getRGB(x, y) will return an RGB object of the color located at (X, Y) of the BufferedImage. Knowing this, we will need to get a BufferedImage of the client window, then we can write a FindColor function.

    ex.

    Java Code:
    public BufferedImage clientToImage() {
        BufferedImage image = new BufferedImage(client.getWidth(), client.getHeight(), BufferedImage.TYPE_INT_RGB);
        Graphics g = client.getGraphics();
        image.paint(g);
        return image;
    }

    public boolean FindColor(int x, int y, RGB color) {
        if (clientToImage().getRGB(x, y).equals(color))
            return true;
        return false;
    }

    Note the above was written in this text editor with no context. "client" is equal to the Applet object from your initial loader. Tolerance can be added easily by creating minimum and maximum values for each red, green and blue from a tolerance parameter. The returned values would then be checked to see if they fall within that range. Also note that this uses an RGB object, not the integer representation we use in Simba.


    Mouse actions:

    Alright so a couple of options here. Would you like minimizable, virtual mouse? Or one that will take over your actual mouse? I will demonstrate both.

    Taking over your mouse:

    Java has a great object called Robot. Check it out here: https://docs.oracle.com/javase/7/doc...awt/Robot.html

    Notice there are two ways to initialize one. Either the default constructor, or you can pass a GraphicsDevice representing the screen to use.

    Let's just use the default one for now. Now it is as simple as:

    Java Code:
    Robot r = new Robot();
    r.moveMouse(x, y); //To move to the top of the screen: r.moveMouse(0, 0);

    //Left Clicking:
    r.mousePress(InputEvent.BUTTON1_MASK);
    r.mouseRelease(InputEvent.BUTTON1_MASK);

    Minimizable:

    We send events to the applet. The applet reacts as though we had done an action, even though we never actually did.

    Java Code:
    public void moveMouse(int x, int y) {
            applet.getComponentAt(1, 1).dispatchEvent(
                    new MouseEvent(applet.getComponentAt(1, 1), 503, System
                            .currentTimeMillis(), 0, x, y, 0, false));
        }

    Hope that gives you some insight

  10. #110
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Quote Originally Posted by the bank View Post
    Hope that gives you some insight
    Thanks for your very informative reply, the bank! It was a very nice read. Seems that you've done this before

  11. #111
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat View Post
    Thanks for your very informative reply, the bank! It was a very nice read. Seems that you've done this before
    No problem! The code for moving the mouse was taken directly from my bot, I just reformatted it a bit so it fit the context. You can replace 503 with the MouseEvent move constant, I can't remember it off the top of my head but it would be in the Javadoc.

    If you're looking for a public bot source to check out, check out Moparisthebest's Cherokee bot. Its old, but the essentials are still the same.
    http://cherokeeengine.svn.sourceforge.net/

    He also included his own version of my Reflection Explorer in the source as an extra goody pretty sure he called it Reflection Buddy or something to that extent.

  12. #112
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    269
    Mentioned
    17 Post(s)
    Quoted
    161 Post(s)

    Default

    This looks so sexy

  13. #113
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    https://www.youtube.com/watch?v=otCpCn0l4Wo can't touch this (or in this case, me)


    some really BIG changes today, check the dev thread in a few hours for more information!
    COUGH COUGH*** I have been hitting the F5 button for what seems likely eternity =P

    If only we could discard life and those pesky distractions that always arise.


    (Hope your exams went well!)

    <------------------>



  14. #114
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by AFools View Post
    COUGH COUGH*** I have been hitting the F5 button for what seems likely eternity =P

    If only we could discard life and those pesky distractions that always arise.


    (Hope your exams went well!)
    They went very well!
    I wanted to post some new things, but the graphics are not done yet. Thats the reason why i didnt post anything yet

  15. #115
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    They went very well!
    I wanted to post some new things, but the graphics are not done yet. Thats the reason why i didnt post anything yet
    All good... i was just being a pain in the ass =P

    <------------------>



  16. #116
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by AFools View Post
    All good... i was just being a pain in the ass =P
    nah its okay, at least somebody paying attention

  17. #117
    Join Date
    Dec 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Good stuff, looking forward to more work

  18. #118
    Join Date
    Jun 2014
    Posts
    463
    Mentioned
    27 Post(s)
    Quoted
    229 Post(s)

    Default

    Quote Originally Posted by zachera View Post
    Good stuff, looking forward to more work
    The past 4 posts i've seen from you are saying in some way "can't wait to see more!"

    If you want post count, actually post. Please.

    On topic: How're you going about loading the new client coming out?
    Tsunami

  19. #119
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by Lucidity View Post
    On topic: How're you going about loading the new client coming out?
    No way to know until it comes out! Should be relatively easy though, perhaps even more so than it is now depending on how native they go.

  20. #120
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by Lucidity View Post
    On topic: How're you going about loading the new client coming out?
    Quote Originally Posted by the bank View Post
    No way to know until it comes out! Should be relatively easy though, perhaps even more so than it is now depending on how native they go.
    It's for OSR only.

    ---

    I started working on a "browser" version of the bot too so you can run it on any client. Here is a small teaser picture (graphics are not done yet).
    note 1: scripts are fake, just a simple preview
    note 2: GUI is far from done, graphics are still needed together with a lot of styling. (example: main menu bar needs to be changed)
    note 3: depending on your script category, there will be a small logo where the * is.
    note 4: might change the size of the GUI

  21. #121
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    It's for OSR only.

    ---

    I started working on a "browser" version of the bot too so you can run it on any client. Here is a small teaser picture (graphics are not done yet).
    note 1: scripts are fake, just a simple preview
    note 2: GUI is far from done, graphics are still needed together with a lot of styling. (example: main menu bar needs to be changed)
    note 3: depending on your script category, there will be a small logo where the * is.
    note 4: might change the size of the GUI
    http://puu.sh/n3h0S/e46d426239.png
    Ashaman only has one script? FAKE lol
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  22. #122
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default How these projects typically progress.


    <------------------>



  23. #123
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default

    I'm really looking forward to Potato Picker Pro

  24. #124
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by AFools View Post
    sssshhh, its an additional feature
    Quote Originally Posted by mudda_fudda View Post
    I'm really looking forward to Potato Picker Pro
    its not a real script.

  25. #125
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    sssshhh, its an additional feature

    its not a real script.
    Forgot the sarcasm tags :P

Page 5 of 9 FirstFirst ... 34567 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •