Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Scripting 101


    Hashtag

    Recommended Posts

    Thank you so much for the GUI guide. I have got a GUI working because of this but see the following warning about this GUI have performance issues, is there something wrong with my code, its being called via the onStart method?

     

    private void createGUI()
        {
            JFrame frame = new JFrame();
            frame.setTitle("Al Kharid Beer Glass Collector");
            frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            frame.setLocationRelativeTo(getClient().getInstance().getCanvas());
            frame.setPreferredSize(new Dimension(400,50));
            frame.getContentPane().setLayout(new BorderLayout());
    
            JPanel settingPanel = new JPanel();
            settingPanel.setLayout(new GridLayout(0,1));
    
            JCheckBox lootBronzeMace = new JCheckBox();
            lootBronzeMace.setText("Pick up Bronze Maces");
            settingPanel.add(lootBronzeMace);
    
            lootBronzeMace.addActionListener(new ActionListener()
            {
                @Override
                public void actionPerformed(ActionEvent e)
                {
                    LootBronzeMaces = lootBronzeMace.isSelected();
                }
            });
            frame.getContentPane().add(settingPanel, BorderLayout.NORTH);
            frame.pack();
            frame.setVisible(true);
        }

     

    Link to comment
    Share on other sites

    5 hours ago, RSMasterGuard said:

    Thank you so much for the GUI guide. I have got a GUI working because of this but see the following warning about this GUI have performance issues, is there something wrong with my code, its being called via the onStart method?

     

    private void createGUI()
        {
            JFrame frame = new JFrame();
            frame.setTitle("Al Kharid Beer Glass Collector");
            frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            frame.setLocationRelativeTo(getClient().getInstance().getCanvas());
            frame.setPreferredSize(new Dimension(400,50));
            frame.getContentPane().setLayout(new BorderLayout());
    
            JPanel settingPanel = new JPanel();
            settingPanel.setLayout(new GridLayout(0,1));
    
            JCheckBox lootBronzeMace = new JCheckBox();
            lootBronzeMace.setText("Pick up Bronze Maces");
            settingPanel.add(lootBronzeMace);
    
            lootBronzeMace.addActionListener(new ActionListener()
            {
                @Override
                public void actionPerformed(ActionEvent e)
                {
                    LootBronzeMaces = lootBronzeMace.isSelected();
                }
            });
            frame.getContentPane().add(settingPanel, BorderLayout.NORTH);
            frame.pack();
            frame.setVisible(true);
        }

     

    https://dreambot.org/guides/scripter-guide/troubleshooting/

    Link to comment
    Share on other sites

    • 6 months later...
    • 1 month later...
    • 4 weeks later...
    47 minutes ago, arrlength said:

    Thank you for the walkthrough, very useful.

    Where are you getting the getClient method in frame.setLocationRelativeTo call in createGUI method?

    That's old API way to access the Client class. Now you can statically reference to the public fields and methods in Client.

    Link to comment
    Share on other sites

    On 11/17/2022 at 12:29 AM, CyanCipher said:

    is this guide updated for Dreambot 3 API? if not, please update it 😃

    This is for the old API. I'm afraid I don't have the time to update it.

    Link to comment
    Share on other sites

    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
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.