Thread: Ruse Control Panel

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 Ruse Control Panel 
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    675
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    Based of the 718 Version runeslaer25 Released.

    Tested the following + update and they work.
    Attached image

    Picture of Panel:
    Attached image

    The following are confirmed to work:
    *Dance
    *Update
    *Kill
    *Jail
    *Giveitem
    *Teleport
    *Promote Mod
    *Promote Donor
    *Freeze
    *Force Chat
    *Mute

    Removed the takeitem and takeall.

    GameLoader.java:
    Code:
    serviceLoader.execute(() -> Panel.main());
    Panel.java:
    Code:
    package com.mpk;
    
    import java.awt.EventQueue;
    
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.border.EmptyBorder;
    
    import com.ruseps.engine.task.Task;
    import com.ruseps.engine.task.TaskManager;
    import com.ruseps.engine.task.impl.PlayerDeathTask;
    import com.ruseps.model.Animation;
    import com.ruseps.model.PlayerRights;
    import com.ruseps.model.Position;
    import com.ruseps.world.World;
    import com.ruseps.world.content.PlayerPunishment;
    import com.ruseps.world.content.WellOfGoodwill;
    import com.ruseps.world.content.PlayerPunishment.Jail;
    import com.ruseps.world.content.clan.ClanChatManager;
    import com.ruseps.world.content.grandexchange.GrandExchangeOffers;
    import com.ruseps.world.entity.impl.player.Player;
    
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.JButton;
    import javax.swing.JOptionPane;
    
    import java.awt.event.*;
    
    
    
    
    
    public class Panel extends JFrame {
    
    	/**
    	 * 
    	 */
    	private static final long serialVersionUID = 6688741257614555809L;
    	private JPanel contentPane;
    	private JTextField textField;
    	
    	
    
    	/**
    	 * Launch the application.
    	 */
    	public static void main() {
    		EventQueue.invokeLater(new Runnable() {
    			public void run() {
    				try {
    					Panel frame = new Panel();
    					frame.setVisible(true);
    				} catch (Exception e) {
    					e.printStackTrace();
    				}
    			}
    		});
    	}
    
    	/**
    	 * Create the frame.
    	 */
    	public Panel() {
    		setTitle("Control Panel");
    		setBounds(100, 100, 408, 456);
    		contentPane = new JPanel();
    		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    		setContentPane(contentPane);
    		contentPane.setLayout(null);
    		
    		textField = new JTextField();
    		textField.setBounds(87, 25, 194, 20);
    		contentPane.add(textField);
    		textField.setColumns(10);
    		
    		JLabel lblUsername = new JLabel("Username");
    		lblUsername.setBounds(156, 11, 92, 14);
    		contentPane.add(lblUsername);
    		
    		JLabel lblPunishment = new JLabel("Punishment");
    		lblPunishment.setBounds(73, 60, 104, 14);
    		contentPane.add(lblPunishment);
    		
    		/*JProgressBar progressBar = new JProgressBar();
    		progressBar.setBounds(10, 372, 372, 35);
    		contentPane.add(progressBar);
    		progressBar.setIndeterminate(true);*/
    		
    		JButton btnIpban = new JButton("IPBan");
    		btnIpban.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent arg0) {
    				IPban();
    			}
    		});
    		btnIpban.setBounds(0, 85, 89, 23);
    		contentPane.add(btnIpban);
    		
    		JButton btnMute = new JButton("Mute");
    		btnMute.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				mute();
    			}
    		});
    		btnMute.setBounds(99, 85, 89, 23);
    		contentPane.add(btnMute);
    		
    		JButton btnBan = new JButton("Ban");
    		btnBan.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				ban();
    			}
    		});
    		btnBan.setBounds(0, 119, 89, 23);
    		contentPane.add(btnBan);
    		
    		JButton btnJail = new JButton("Jail");
    		btnJail.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent arg0) {
    				jail();
    			}
    		});
    		btnJail.setBounds(0, 153, 89, 23);
    		contentPane.add(btnJail);
    		
    		JButton btnKill = new JButton("Kill");
    		btnKill.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				kill();
    			}
    		});
    		btnKill.setBounds(99, 119, 89, 23);
    		contentPane.add(btnKill);
    		
    		JButton btnFreezeunfreeze = new JButton("Freeze");
    		btnFreezeunfreeze.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent arg0) {
    				freeze();
    			}
    		});
    		btnFreezeunfreeze.setBounds(99, 153, 89, 23);
    		contentPane.add(btnFreezeunfreeze);
    		
    		JLabel lblItemManagment = new JLabel("Item Managment");
    		lblItemManagment.setBounds(261, 60, 104, 14);
    		contentPane.add(lblItemManagment);
    		
    		JButton btnGiveItem = new JButton("Give Item");
    		btnGiveItem.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				giveItem();
    			}
    		});
    		
    		btnGiveItem.setBounds(204, 85, 89, 23);
    		contentPane.add(btnGiveItem);
    		/*
    		JButton btnTakeItem = new JButton("Take Item");
    		btnTakeItem.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				takeItem();
    			}
    		});
    		
    		btnTakeItem.setBounds(303, 85, 89, 23);
    		contentPane.add(btnTakeItem);
    		*/
    		JButton btnGiveAll = new JButton("Give All");
    		btnGiveAll.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				giveAll();
    			}
    		});
    		
    		btnGiveAll.setBounds(204, 119, 89, 23);
    		contentPane.add(btnGiveAll);
    		/*
    		JButton btnTakeAll = new JButton("Take All");
    		btnTakeAll.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				takeAll();
    			}
    		});
    		
    		btnTakeAll.setBounds(303, 119, 89, 23);
    		contentPane.add(btnTakeAll);
    		*/
    		JLabel lblTeleportation = new JLabel("Teleportation");
    		lblTeleportation.setBounds(73, 206, 104, 14);
    		contentPane.add(lblTeleportation);
    		
    		JButton btnTeleport = new JButton("Teleport");
    		btnTeleport.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				teleport();
    			}
    		});
    		btnTeleport.setBounds(57, 231, 89, 23);
    		contentPane.add(btnTeleport);
    		
    		JButton btnSendhome = new JButton("Tele All");
    		btnSendhome.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				teleAll();
    			}
    		});
    		btnSendhome.setBounds(57, 265, 89, 23);
    		contentPane.add(btnSendhome);
    		
    		JLabel lblFunPanel = new JLabel("Fun Panel");
    		lblFunPanel.setBounds(261, 177, 56, 14);
    		contentPane.add(lblFunPanel);
    		
    		JButton btnMakeDance = new JButton("Make Dance");
    		btnMakeDance.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				makeDance();
    			}
    		});
    		btnMakeDance.setBounds(231, 202, 114, 23);
    		contentPane.add(btnMakeDance);
    		
    		JButton btnDanceAll = new JButton("Dance All");
    		btnDanceAll.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				danceAll();
    			}
    		});
    		btnDanceAll.setBounds(231, 236, 114, 23);
    		contentPane.add(btnDanceAll);
    		
    		JButton btnForceChat = new JButton("Force Chat");
    		btnForceChat.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				forceChat();
    			}
    		});
    		btnForceChat.setBounds(231, 270, 114, 23);
    		contentPane.add(btnForceChat);
    		
    		JButton btnSmite = new JButton("Promote: Mod");
    		btnSmite.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				smite();
    			}
    		});
    		btnSmite.setBounds(231, 304, 114, 23);
    		contentPane.add(btnSmite);
    		
    		JButton btnFuckUp = new JButton("Promote: Donator");
    		btnFuckUp.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				fuckUp();
    			}
    		});
    		btnFuckUp.setBounds(231, 338, 114, 23);
    		contentPane.add(btnFuckUp);
    		
    		JButton btnNewButton = new JButton("Shutdown Server");
    		btnNewButton.addActionListener(new ActionListener() {
    			public void actionPerformed(ActionEvent e) {
    				shutdown();
    			}
    		});
    		btnNewButton.setBounds(10, 299, 194, 62);
    		contentPane.add(btnNewButton);
    		
    	}
    	
    	public String getUsernameInput() {
    		return textField.getText();
    	}
    	
    	public void ban() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		PlayerPunishment.ban(name);
    		System.out.println("Console: Successfully Banned "
    				+ name + ".");
    		JOptionPane.showMessageDialog(null, "Successfully Banned "+name, "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist");
    		}
    	}
    
    	public void forceChat() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		String chat = JOptionPane.showInputDialog("What Do You Want Him To Say?");
    		target.forceChat(chat);
    		System.out.println("Console: Forcing "+name+" To Say "+chat+"!");
    		JOptionPane.showMessageDialog(null, "Forcing "+name+" To Say "+chat+"!", "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist");
    		}
    	}
    	
    	public void shutdown() {
    		String name = getUsernameInput();
    	World.getPlayerByName(name);
    		String sht = JOptionPane.showInputDialog("Shudown Delay?");
    		int delay = Integer.parseInt(sht);
    		TaskManager.submit(new Task(delay) {
    			@Override
    			protected void execute() {
    				for (Player player : World.getPlayers()) {
    					if (player != null) {
    						World.deregister(player);
    					}
    				}
    				WellOfGoodwill.save();
    				GrandExchangeOffers.save();
    				ClanChatManager.save();
    				GameServer.getLogger().info("Update task finished!");
    				stop();
    			}
    		});
    		System.out.println("Console: Shutting Server Down!");
    		JOptionPane.showMessageDialog(null, "Shutting Server Down!", "Console", JOptionPane.PLAIN_MESSAGE);
    	}
    	
    	public void makeDance() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		target.setAnimation(new Animation(7071));
    		System.out.println("Console: You Have Made "+name+" Dance!");
    		JOptionPane.showMessageDialog(null, "You Have Made "+name+" Dance!", "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist");
    		}
    	}
    	
    	public void smite() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		target.setRights(PlayerRights.forId(1));
    		System.out.println("Console: You Have promoted "+name+"!");
    		JOptionPane.showMessageDialog(null, "You Are A Mod, "+name+"!", "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist");
    		}
    	}
    	
    	public void fuckUp() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		target.setRights(PlayerRights.forId(5));
    		System.out.println("Console: You Have Made "+name+" a donator!");
    		JOptionPane.showMessageDialog(null, "You Have promoted "+name+"!", "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist");
    		}
    	}
    	
    	public void IPban() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		final String bannedIP = target.getHostAddress();
    		PlayerPunishment.addBannedIP(bannedIP);
    		System.out.println("Console: Successfully IP Banned "
    				+ name + ".");
    		JOptionPane.showMessageDialog(null, "Successfully IP Banned "+name, "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist!", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist!");
    		}
    	}
    	
    	public void mute() {
    		String name = getUsernameInput();
    		//String player2 = Misc.formatText(wholeCommand.substring(5));
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		PlayerPunishment.mute(name);
    		System.out.println("Console: Muted "
    				+ name + ".");
    		JOptionPane.showMessageDialog(null, "Successfully Muted "+name, "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist!", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist!");
    		}
    	}
    	
    	public void kill() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		TaskManager.submit(new PlayerDeathTask(target));
    		System.out.println("Console: Killed "
    				+ name + ".");
    		JOptionPane.showMessageDialog(null, "Successfully Killed "+name, "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist!", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist!");
    		}
    	}
    	public void jail() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		Jail.jailPlayer(target);
    		System.out.println("Console: Jailed "
    				+ name + ".");
    		JOptionPane.showMessageDialog(null, "Successfully Jailed "+name, "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist!", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist!");
    		}
    	}
    	
    	public void freeze() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		target.isFrozen();
    		System.out.println("Console: Frozen "
    				+ name + ".");
    		JOptionPane.showMessageDialog(null, "Successfully Frozen "+name, "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist!", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist!");
    		}
    	}
    	
    	public void giveItem() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		String id = JOptionPane.showInputDialog("Item Id");
    		String quantity = JOptionPane.showInputDialog("Item Amount");
    		int item = Integer.parseInt(id);
    		int amount = Integer.parseInt(quantity);
    		target.getInventory().add(item, amount);
    		System.out.println("Console: Given Item To "
    				+ name + ".");
    		JOptionPane.showMessageDialog(null, "Given Item To "+name, "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist!", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist!");
    		}
    	}
    	
    	public void teleport() {
    		String name = getUsernameInput();
    	Player target = World.getPlayerByName(name);
    	if (target != null) {
    		String x = JOptionPane.showInputDialog("Coordinate X");
    		String y = JOptionPane.showInputDialog("Coordinate Y");
    		String h = JOptionPane.showInputDialog("Height Level");
    		int coordx = Integer.parseInt(x);
    		int coordy = Integer.parseInt(y);
    		int height = Integer.parseInt(h);
    		Position position = new Position(coordx, coordy, height);
    		target.moveTo(position);
    		System.out.println("Console: Teleported "+name+" To "+coordx+", "+coordy+", "+height);
    		JOptionPane.showMessageDialog(null, "Console: Teleported "+name+" To "+coordx+", "+coordy+", "+height, "Console", JOptionPane.PLAIN_MESSAGE);
    	} else {
    		JOptionPane.showMessageDialog(null, name+" Doesn't Exist!", "Console", JOptionPane.ERROR_MESSAGE);
    		System.out.println("Console: Player Doesn't Exist!");
    		}
    	}
    	
    	public void teleAll() {
    		String name = getUsernameInput();
    	World.getPlayerByName(name);
    		String x = JOptionPane.showInputDialog("Coordinate X");
    		String y = JOptionPane.showInputDialog("Coordinate Y");
    		String h = JOptionPane.showInputDialog("Height Level");
    		int coordx = Integer.parseInt(x);
    		int coordy = Integer.parseInt(y);
    		int height = Integer.parseInt(h);
    		for (Player teleall : World.getPlayers()) {
    			Position position = new Position(coordx, coordy, height);
    			teleall.moveTo(position);
    		}
    		System.out.println("Console: Teleported Everyone To "+coordx+", "+coordy+", "+height);
    		JOptionPane.showMessageDialog(null, "Console: Teleported Everyone To "+coordx+", "+coordy+", "+height, "Console", JOptionPane.PLAIN_MESSAGE);
    }
    	
    	public void danceAll() {
    		String name = getUsernameInput();
    	World.getPlayerByName(name);
    		for (Player danceAll : World.getPlayers()) {
    			danceAll.setAnimation(new Animation(7071));
    		}
    		System.out.println("Console: Making Everyone Dance!");
    		JOptionPane.showMessageDialog(null, "Console: Making Everyone Dance!", "Console", JOptionPane.PLAIN_MESSAGE);
    }
    	
    	public void giveAll() {
    		String name = getUsernameInput();
    	World.getPlayerByName(name);
    		String id = JOptionPane.showInputDialog("Item Id");
    		String quantity = JOptionPane.showInputDialog("Item Amount");
    		int item = Integer.parseInt(id);
    		int amount = Integer.parseInt(quantity);
    		for (Player giveall : World.getPlayers()) {
    			giveall.getInventory().add(item, amount);
    		}
    		System.out.println("Console: Given Item "+item+" To All Players");
    		JOptionPane.showMessageDialog(null, "Given Item "+item+" To All Players", "Console", JOptionPane.PLAIN_MESSAGE);
    	}
    
    }
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member Wintersoul's Avatar
    Join Date
    Apr 2015
    Posts
    72
    Thanks given
    23
    Thanks received
    5
    Rep Power
    11
    Thanks for the release!
    Reply With Quote  
     

  4. #3  
    Banned
    Join Date
    Apr 2016
    Posts
    357
    Thanks given
    65
    Thanks received
    16
    Rep Power
    0
    lot of ruse users will find use useful for sure thanks for contribution i guess
    Reply With Quote  
     

  5. #4  
    hopeless grinder
    peer1k's Avatar
    Join Date
    Aug 2014
    Posts
    227
    Thanks given
    110
    Thanks received
    60
    Rep Power
    53
    Quote Originally Posted by TA TA View Post
    lot of ruse users will find use useful for sure thanks for contribution i guess
    will find use useful?
    Reply With Quote  
     

  6. #5  
    Banned
    Join Date
    Apr 2016
    Posts
    357
    Thanks given
    65
    Thanks received
    16
    Rep Power
    0
    Quote Originally Posted by Peurrno View Post
    will find use useful?
    Dammit didnt saw that. xD
    Reply With Quote  
     

  7. #6  
    Donator


    Join Date
    Sep 2013
    Posts
    159
    Thanks given
    133
    Thanks received
    57
    Rep Power
    130
    This is very unattractive. Take a look at this release for a better cp.
    Reply With Quote  
     

  8. #7  
    Registered Member
    Join Date
    Jul 2009
    Posts
    145
    Thanks given
    5
    Thanks received
    1
    Rep Power
    1
    thanks for this.
    Reply With Quote  
     

  9. #8  
    Registered Member Ombra's Avatar
    Join Date
    Feb 2017
    Posts
    83
    Thanks given
    2
    Thanks received
    25
    Rep Power
    35
    Some might find this useful, nice contribution
    Reply With Quote  
     

  10. #9  
    Member

    Join Date
    Nov 2008
    Age
    27
    Posts
    4,859
    Thanks given
    774
    Thanks received
    341
    Rep Power
    0
    Thanks for the release, but I'm sure I've seen one so similar to this in 2010/2011
    Reply With Quote  
     

  11. #10  
    AleronPS


    Join Date
    Dec 2017
    Posts
    93
    Thanks given
    99
    Thanks received
    10
    Rep Power
    73
    Great tool! Definitely will try it once i found the Thanks button ;-)
    Yours Sincerely,
    Eliyahu | Aleron

    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. need server control panel!!!
    By cavallers in forum Requests
    Replies: 3
    Last Post: 04-26-2009, 07:57 PM
  2. §~the Best Server Control Panel - Ghost~§
    By slay_blad3 in forum Tutorials
    Replies: 93
    Last Post: 09-30-2008, 10:54 PM
  3. Open GHOST™ 1.0 (Remote Control Panel)
    By scriptscape in forum Tutorials
    Replies: 18
    Last Post: 03-26-2008, 03:58 PM
  4. My Control Panel *REPOST*
    By Lord JavaNerd in forum Tutorials
    Replies: 3
    Last Post: 01-31-2008, 04:34 AM
  5. My Control Panel
    By JavaNerd in forum Tutorials
    Replies: 9
    Last Post: 01-31-2008, 02:10 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •