Jack Posted December 23, 2013 Share Posted December 23, 2013 (edited) Hi scripters. Here is code to put a mini screen the user can use to babysit their bot. import java.awt.BorderLayout; import java.awt.Graphics; import java.awt.image.BufferedImage; import javax.swing.JFrame; import javax.swing.JPanel; public class GUI extends JFrame{ private JPanel contentPane; BufferedImage capture; public GUI() { setResizable(false); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setSize(384, 255); contentPane = new JPanel(); setContentPane(contentPane); JPanel panel = new JPanel(); contentPane.add(panel, BorderLayout.CENTER); } public void paint(Graphics g) { g.drawImage(capture,2,30,getContentPane().getWidth(),getContentPane().getHeight(),getContentPane()); } public void setImage(BufferedImage image) { capture = image; } } How to Implement: BufferedImage capture; GUI gui; public int onLoop() throws InterruptedException { capture = client.getColorPicker().getBufferedImage(); gui.setImage(capture); gui.repaint(); return 200; } public void onStart(){ gui = new GUI(); gui.setVisible(true); } Edited December 23, 2013 by 25sittin25m 1 Link to comment Share on other sites More sharing options...
merch999k Posted December 23, 2013 Share Posted December 23, 2013 that would be good for people who are vip and need to overview all of their bots, otherwise theres not really an essential point to it Link to comment Share on other sites More sharing options...
Toph Posted December 23, 2013 Share Posted December 23, 2013 Aww it's so cute. 2 Link to comment Share on other sites More sharing options...
DignityOnline Posted December 23, 2013 Share Posted December 23, 2013 Nice bro Link to comment Share on other sites More sharing options...
Disboyer Posted December 23, 2013 Share Posted December 23, 2013 Cool Link to comment Share on other sites More sharing options...
lolmanden Posted January 3, 2014 Share Posted January 3, 2014 This is beast Jack! Link to comment Share on other sites More sharing options...
W8621 Posted January 3, 2014 Share Posted January 3, 2014 Nice man, I wish i knew how to use it loookks guuuud! Link to comment Share on other sites More sharing options...
Sippin Posted January 3, 2014 Share Posted January 3, 2014 such a good idea Link to comment Share on other sites More sharing options...
Ericthecmh Posted January 3, 2014 Share Posted January 3, 2014 Wow, this is a really clever idea. You should have release this sooner now OSBot 2 is gonna come out Link to comment Share on other sites More sharing options...
Kenneh Posted January 8, 2014 Share Posted January 8, 2014 Note that it's a resource waste and it won't draw paint information. It's funny to watch though Link to comment Share on other sites More sharing options...
TheScrub Posted January 15, 2014 Share Posted January 15, 2014 instead of putting it on in the on loop wouldn't it be better for script performance to put it in the paint thread? Link to comment Share on other sites More sharing options...
Jack Posted January 15, 2014 Author Share Posted January 15, 2014 instead of putting it on in the on loop wouldn't it be better for script performance to put it in the paint thread? no because then it would be called 60 times per second not 5 times per second Link to comment Share on other sites More sharing options...
Failed4life Posted February 4, 2014 Share Posted February 4, 2014 awesome ^.^ Link to comment Share on other sites More sharing options...
Beau Posted February 4, 2014 Share Posted February 4, 2014 I believe the Robot class in java can make this easier. Link to comment Share on other sites More sharing options...
dude098 Posted February 4, 2014 Share Posted February 4, 2014 Great idea, it looks good. Thanks. Link to comment Share on other sites More sharing options...