Adblock breaks this site

My Auto Seller

Discussion in 'Programming General' started by SuF, Nov 5, 2007.

Thread Status:
Not open for further replies.
  1. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    My Auto Seller

    I made this awhile ago but never got it to work in GUI untill tonight.... Not very useful now that they have sell 50 option but what ever...
    any advice is appreishated


    Code:
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.Scanner;
    import java.awt.Robot;
    
    @SuppressWarnings("serial")
    public class ClickMe extends JFrame implements ActionListener
    {
    	private JButton help, step2, step3, step4, start;
    	private JTextField items;
    	
    	static boolean stop = true;
    	static Scanner sc = new Scanner(System.in);
    	static boolean con = true;
    		public static void main(String [] args)throws Exception
    		{
    			
    			new ClickMe();	
    		}
    
    	
    		public ClickMe()throws Exception
    		{	
    	    
    			this.setSize(400,200);
    			this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    			this.setTitle("SuF's Auto Clicker");
    			this.setLocationRelativeTo(null);
    	    
    			JPanel panel1 = new JPanel();
    		
    			help = new JButton("Step 1");
    			help.addActionListener(this);
    			panel1.add(help);
    	    
    			step2 = new JButton("Step 2");
    			step2.addActionListener(this);
    			panel1.add(step2);
    	    
    			step3 = new JButton("Step 3");
    			step3.addActionListener(this);
    			panel1.add(step3);
    	    
    			step4 = new JButton("Step 4");
    			step4.addActionListener(this);
    			panel1.add(step4);
    	 
    			panel1.add(new JLabel("Enter How Many Items You Want Sold"));
    	    
    			items = new JTextField(15);
    			panel1.add(items);
    	    
    			start = new JButton("Start");
    			start.addActionListener(this);
    			panel1.add(start);
    	    
    			this.add(panel1);
    		    this.setVisible(true);
    		}
    	   
    		public void actionPerformed(ActionEvent e)
    			{
    				if (e.getSource() == help)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Put the item you want to sell in the bottom row second place in. " ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    				if (e.getSource() == step2)
    					{
    						JOptionPane.showMessageDialog(ClickMe.this,"Make sure EliteShift is open and maximized and that you can see the top bar of EliteShift. " ,
    						"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    					}
    	
    				if (e.getSource() == step3)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Put in the amount of items you have to sell. You will login when done." ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    		
    				if (e.getSource() == step4)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Set your mouse type to one butten. Open up the store trade window and hit start." ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    	
    				if (e.getSource() == start)
    				{
    			
    					int j = Integer.parseInt(items.getText());		
    					double d = j / 50;
    					for(int c = 0; c < d; c++)
    					{
    						try
                            {
                                start();
                            }
                             catch (Exception r)
                            {
                               
                            }
    					}
    					
    				}
    		
    	
    			}	
    					
    			
    			public static void autoclicker() throws Exception
    				{
    					int low = 100;
    					int high = 300;
    					int a = (int)(Math.random() * (high - low + 1)) + low;
    				
    						Robot auto = new Robot();
    							{
    								int x = 613;
    								int y = 496;
    								auto.mouseMove(x,y);
    								auto.mousePress(InputEvent.BUTTON1_MASK);
    								auto.mouseRelease(InputEvent.BUTTON1_MASK);
    								auto.delay(a);
    							} 
    				}
    			
    			public static void getrs() throws Exception
    				{
    					while(con)
    						{
    			
    							Robot move = new Robot();
    								{
    									int x = 607;
    									int y = 9;
    									move.mouseMove(x,y);
    									move.mousePress(InputEvent.BUTTON1_MASK);
    									move.mouseRelease(InputEvent.BUTTON1_MASK);
    								}
    								con = false;
    						}
    				}
    			public static void start() throws Exception
    			{
    				getrs();
    				autoclicker();
    				autoclicker();
    			}
    }
     
  2. speedster239

    speedster239 Forum Addict
    Java Programmers

    Joined:
    Jan 21, 2007
    Posts:
    313
    Referrals:
    0
    Sythe Gold:
    0
    My Auto Seller

    Good job on this! It always makes me happy to see people making autos in java.
     
  3. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    My Auto Seller

    O yea i forgots this works 1024 by 768 with elite switch or shift or what ever... i may make it work for diffrent thingyss and test if it does already and make it so it logs its self out auto maticaly.....
     
  4. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    My Auto Seller

    I updated it a bit. It acualy logs you out now XD. If anyone would help me make it so that I can like every 40 cycles of clicking change the range of ms that it can select. PM me for a better explaination. XD

    O yes i fixxed a few other things too....

    Code:
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.Scanner;
    import java.awt.Robot;
    
    @SuppressWarnings("serial")
    public class ClickMe extends JFrame implements ActionListener
    {
    	private JButton help, step2, step3, step4, start;
    	private JTextField items;
    	
    	static boolean stop = true;
    	static Scanner sc = new Scanner(System.in);
    	static boolean con = true;
    	static boolean con1 = true;
    	static int hi;
    		
    	public static void main(String [] args)throws Exception
    		{
    			
    			new ClickMe();	
    		}
    
    	
    		public ClickMe()throws Exception
    		{	
    	    
    			this.setSize(400,200);
    			this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    			this.setTitle("SuF's Auto Seller");
    			this.setLocationRelativeTo(null);
    	    
    			JPanel panel1 = new JPanel();
    		
    			help = new JButton("Step 1");
    			help.addActionListener(this);
    			panel1.add(help);
    	    
    			step2 = new JButton("Step 2");
    			step2.addActionListener(this);
    			panel1.add(step2);
    	    
    			step3 = new JButton("Step 3");
    			step3.addActionListener(this);
    			panel1.add(step3);
    	    
    			step4 = new JButton("Step 4");
    			step4.addActionListener(this);
    			panel1.add(step4);
    	 
    			panel1.add(new JLabel("Enter How Many Items You Want Sold"));
    	    
    			items = new JTextField(15);
    			panel1.add(items);
    	    
    			start = new JButton("Start");
    			start.addActionListener(this);
    			panel1.add(start);
    	    
    			this.add(panel1);
    		    this.setVisible(true);
    		}
    	   
    		public void actionPerformed(ActionEvent e)
    			{
    				if (e.getSource() == help)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Put the item you want to sell in the bottom row second place in. " ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    				if (e.getSource() == step2)
    					{
    						JOptionPane.showMessageDialog(ClickMe.this,"Make sure EliteShift is open and maximized and that you can see the top bar of EliteShift. " ,
    						"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    					}
    	
    				if (e.getSource() == step3)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Put in the amount of items you have to sell. Set your mouse type to one butten.  " ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    		
    				if (e.getSource() == step4)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Open up the store trade window and hit start. You will logout when done." ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    	
    				if (e.getSource() == start)
    				{
    			
    					int j = Integer.parseInt(items.getText());		
    					double d = j / 50;
    					for(int c = 0; c < d; c++)
    					{
    						try
                            {
                                start();
                            }
                             catch (Exception r)
                            {
                               
                            }
    					}
    					try 
    					{
    					logout();				
    					}
    					catch (Exception r)
    					{
    						
    					}
    				}
    		
    	
    			}	
    					
    			
    			public static void autoclicker() throws Exception
    				{
    					
    						
    			
    						Robot auto = new Robot();
    							{
    								
    									int l = 25;
    									int h = 250;
    									int l1 = (int)(Math.random() * (h - l + 1)) + l;
    									int low = l1;
    									int high = l1 + 50;
    									int a = (int)(Math.random() * (high - low + 1)) + low;
    									int x = 625;
    									int y = 496;
    									auto.mouseMove(x,y);
    									auto.mousePress(InputEvent.BUTTON1_MASK);
    									auto.mouseRelease(InputEvent.BUTTON1_MASK);
    									auto.delay(a);	
    							
    							
    						
    								
    								
    								
    							} 
    				}
    			
    			public static void getrs() throws Exception
    				{
    					while(con)
    						{
    			
    							Robot move = new Robot();
    								{
    									int x = 607;
    									int y = 9;
    									move.mouseMove(x,y);
    									move.mousePress(InputEvent.BUTTON1_MASK);
    									move.mouseRelease(InputEvent.BUTTON1_MASK);
    								}
    								con = false;
    						}
    				}
    			public static void logout() throws Exception
    			{
    				
    				Robot logout = new Robot();
    				{
    					int u = 485;
    					int ii = 79;
    					int x = 640;
    					int y = 523;
    					logout.mouseMove(u,ii);
    					logout.delay(100);
    					logout.mousePress(InputEvent.BUTTON1_MASK);
    					logout.mouseRelease(InputEvent.BUTTON1_MASK);
    					logout.delay(75);
    					logout.mouseMove(x,y);
    					logout.delay(99);
    					logout.mousePress(InputEvent.BUTTON1_MASK);
    					logout.mouseRelease(InputEvent.BUTTON1_MASK);
    					logout.delay(45);
    					logout.mouseMove(639,412);
    					logout.delay(78);
    					logout.mousePress(InputEvent.BUTTON1_MASK);
    					logout.mouseRelease(InputEvent.BUTTON1_MASK);
    				}
    				
    			}
    			
    			public static void start() throws Exception
    			{
    				getrs();
    				autoclicker();
    				autoclicker();
    			}
    }
     
  5. speedster239

    speedster239 Forum Addict
    Java Programmers

    Joined:
    Jan 21, 2007
    Posts:
    313
    Referrals:
    0
    Sythe Gold:
    0
    My Auto Seller

  6. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    My Auto Seller

    ooooo TY XD
     
  7. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    My Auto Seller

    NVM I got it to work... Here is my new version...

    Code:
    import javax.swing.*;
    
    import java.awt.event.*;
    import java.util.Scanner;
    import java.awt.Robot;
    
    
    @SuppressWarnings("serial")
    public class ClickMe extends JFrame implements ActionListener
    {
    	private JButton help, step2, step3, step4, start;
    	private JTextField items;
    	
    	static boolean stop = true;
    	static Scanner sc = new Scanner(System.in);
    	static boolean con = true;
    	static boolean con1 = true;
    	static int hi;
    		
    	public static void main(String [] args)throws Exception
    	{
    		
    		new ClickMe();	
    	
    	
    	}
    
    	
    		public ClickMe()throws Exception
    		{	
    	    
    			this.setSize(400,150);
    			this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    			this.setTitle("SuF's Auto Seller");
    			this.setLocationRelativeTo(null);
    	    
    			JPanel panel1 = new JPanel();
    		
    			help = new JButton("Step 1");
    			help.addActionListener(this);
    			panel1.add(help);
    	    
    			step2 = new JButton("Step 2");
    			step2.addActionListener(this);
    			panel1.add(step2);
    	    
    			step3 = new JButton("Step 3");
    			step3.addActionListener(this);
    			panel1.add(step3);
    	    
    			step4 = new JButton("Step 4");
    			step4.addActionListener(this);
    			panel1.add(step4);
    	 
    			panel1.add(new JLabel("Enter How Many Items You Want Sold"));
    	    
    			items = new JTextField(15);
    			panel1.add(items);
    	    
    			start = new JButton("Start");
    			start.addActionListener(this);
    			panel1.add(start);
    	    
    			this.add(panel1);
    		    this.setVisible(true);
    		}
    	   
    		public void actionPerformed(ActionEvent e)
    			{
    				if (e.getSource() == help)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Put the item you want to sell in the bottom row second place in. " ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    				if (e.getSource() == step2)
    					{
    						JOptionPane.showMessageDialog(ClickMe.this,"Make sure EliteShift is open and maximized and that you can see the top bar of EliteShift. " ,
    						"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    					}
    	
    				if (e.getSource() == step3)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Put in the amount of items you have to sell. Set your mouse type to one butten.  " ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    		
    				if (e.getSource() == step4)
    				{
    					JOptionPane.showMessageDialog(ClickMe.this,"Open up the store trade window and hit start. You will logout when done." ,
    					"Step 1", JOptionPane.INFORMATION_MESSAGE);
    				    
    				}
    	
    				if (e.getSource() == start)
    				{
    			
    					int j = Integer.parseInt(items.getText());		
    					double d = j / 50;
    					for(int c = 0; c < d; c++)
    					{
    						try
                            {
                                start();
                            }
                             catch (Exception r)
                            {
                               
                            }
    					}
    					try 
    					{
    					logout();				
    					}
    					catch (Exception r)
    					{
    						
    					}
    				}
    		
    	
    			}	
    					
    			
    			public static void autoclicker() throws Exception
    				{
    					
    						
    			
    						Robot auto = new Robot();
    							{
    								
    									int l = 25;
    									int h = 250;
    									int l1 = (int)(Math.random() * (h - l + 1)) + l;
    									int low = l1;
    									int high = l1 + 50;
    									int a = (int)(Math.random() * (high - low + 1)) + low;
    									int x = 625;
    									int y = 496;
    									auto.mouseMove(x,y);
    									auto.mousePress(InputEvent.BUTTON1_MASK);
    									auto.mouseRelease(InputEvent.BUTTON1_MASK);
    									auto.delay(a);	
    							
    							
    						
    								
    								
    								
    							} 
    				}
    			
    			public static void getrs() throws Exception
    				{
    					while(con)
    						{
    			
    							Robot move = new Robot();
    								{
    									int x = 607;
    									int y = 9;
    									move.mouseMove(x,y);
    									move.mousePress(InputEvent.BUTTON1_MASK);
    									move.mouseRelease(InputEvent.BUTTON1_MASK);
    								}
    								con = false;
    						}
    				}
    			public static void logout() throws Exception
    			{
    				
    				Robot logout = new Robot();
    				{
    					int rx = 482;
    					int ry = 76;
    					int tx = 490;
    					int ty = 85;
    					int movetox = (int)(Math.random() * (tx - rx + 1)) + rx;
    					int movetoy = (int)(Math.random() * (ty - ry + 1)) + ry;
    					System.out.print("" + movetox + " " + movetoy);
    					int startpointx = 625;
    					int startpointy = 496;
    					int keepx = startpointx - movetox;
    					int keepy = startpointy - movetoy;
    					
    					while(con1)
    					{
    						if((keepy > 0)|(keepx > 0))
    						{
    							int xory = (int)(Math.random() * (5 - 2 + 1)) + 2;
    							if ((xory == 2) & (keepx > 0))
    							{
    								logout.mouseMove(startpointx,startpointy);
    								
    								startpointx -= 1;
    								keepx -= 1;
    								System.out.print("   Keepx  " + keepx + "   Keepy  " + keepy);
    								System.out.print("   xory   " + xory);
    								System.out.print("   startpointx  " + startpointx + "   spy  " + startpointy);
    							}
    							else if ((xory > 2) & (keepy > 0))
    							
    							{
    								logout.mouseMove(startpointx,startpointy);
    								
    								startpointy -= 1;
    								keepy -= 1;
    								System.out.print("   Keepx  " + keepx + "   Keepy  " + keepy);
    								System.out.print("   xory   " + xory);
    								System.out.print("   startpointx  " + startpointx + "   spy  " + startpointy);
    							}
    						
    						}
    						else
    						{
    							con1 = false;
    							
    						}
    					}
    						
    					
    					int delay1 = (int)(Math.random() * (25 - 40 + 1)) + 40;
    					int delay2 = (int)(Math.random() * (25 - 40 + 1)) + 40;
    					int delay3 = (int)(Math.random() * (10 - 25 + 1)) + 25;
    					int delay4 = (int)(Math.random() * (10 - 25 + 1)) + 25;
    					int delay5 = (int)(Math.random() * (10 - 25 + 1)) + 25;
    					
    					logout.mousePress(InputEvent.BUTTON1_MASK);
    					logout.delay(delay1);
    					logout.mouseRelease(InputEvent.BUTTON1_MASK);
    					logout.delay(delay2);
    						logout.delay(75);
    						logout.mouseMove(640,523);
    						logout.delay(99);
    						logout.mousePress(InputEvent.BUTTON1_MASK);
    						logout.mouseRelease(InputEvent.BUTTON1_MASK);
    						logout.delay(45);
    						logout.mouseMove(639,412);
    						logout.delay(78);
    						logout.mousePress(InputEvent.BUTTON1_MASK);
    						logout.mouseRelease(InputEvent.BUTTON1_MASK);
    						
    					
    					
    				}
    				
    			}
    			
    			public static void start() throws Exception
    			{
    				getrs();
    				autoclicker();
    				autoclicker();
    			}
    }
    
    
     
  8. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    My Auto Seller

    It has a lack of objects for a language such as Java. For all I could care it could be written in VB6 ;)

    Lol.
     
  9. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    My Auto Seller

    o well =P i could care less about objects really.... its just a small program that does a small job...
     
  10. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    My Auto Seller

    You are the anti-christ. My legions shall move against you.
     
  11. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    My Auto Seller

    O yes? I think my guns will beat your damned swords in such a short program like this. =P
     
  12. bojanglesman

    bojanglesman Member

    Joined:
    Nov 4, 2007
    Posts:
    32
    Referrals:
    0
    Sythe Gold:
    0
    My Auto Seller


    Yea you should learn vb6 you can make awesome macros with it :cool:
    im currently learning vb6.
     
  13. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    My Auto Seller

    Java is better :/ you can make it use RS crap and make cool things with it if your smart enough unlike me =P
     
  14. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    My Auto Seller

    Rofl. I was definitely not implying that VB6 was better. Do a few things for me:

    1) Learn what object orientation is.
    2) Notice how the comment 'degrades' the java code to something as low as VB6
    3) Realise that VB6 was released in 19-fucking-98.
    4) Learn something worth while ;)
     
  15. _3x6

    _3x6 Active Member
    Banned

    Joined:
    Dec 23, 2007
    Posts:
    232
    Referrals:
    0
    Sythe Gold:
    0
    My Auto Seller

    its glitchy but o0well
     
  16. syther133

    syther133 Active Member
    Banned

    Joined:
    Feb 17, 2007
    Posts:
    203
    Referrals:
    0
    Sythe Gold:
    0
    My Auto Seller

    Swan, calm down, there is no need for cursing... -.-
     
< Interested in learning Java. | Dynamic something >
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site