Thread: [PI] Command Control Interface [PI]

Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 47
  1. #21  
    Banned
    Join Date
    Nov 2011
    Posts
    136
    Thanks given
    32
    Thanks received
    13
    Rep Power
    0
    Code:
    public CommandControl commandControl = new CommandControl(this);
    Thanks for that,

    Now I don't have to load my commands through the client anymore.
    Reply With Quote  
     

  2. #22  
    Misthalin OSRS
    Valerian's Avatar
    Join Date
    Jan 2009
    Age
    26
    Posts
    3,951
    Thanks given
    459
    Thanks received
    420
    Rep Power
    3992
    Why the fuck does this go to my client settings panel, at my music tab xD
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #23  
    Howdy

    gold_fish's Avatar
    Join Date
    Nov 2010
    Posts
    1,062
    Thanks given
    144
    Thanks received
    147
    Rep Power
    107
    Quote Originally Posted by u22u View Post
    Code:
    public CommandControl commandControl = new CommandControl(this);
    Thanks for that,

    Now I don't have to load my commands through the client anymore.
    Your welcome, I think?

    Quote Originally Posted by Ahridok View Post
    Why the fuck does this go to my client settings panel, at my music tab xD

    Did you change something to c.getPA().setsideBarInterface()?

    Reply With Quote  
     

  4. #24  
    Registered Member
    Join Date
    Dec 2009
    Posts
    250
    Thanks given
    30
    Thanks received
    4
    Rep Power
    1
    still didn't figure out where this goes;

    Code:
    staffControls(rsFonts);
    Galkons 474 refactored client ;3
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #25  
    King of the North
    Lord Stark's Avatar
    Join Date
    Jan 2010
    Age
    27
    Posts
    1,071
    Thanks given
    105
    Thanks received
    41
    Rep Power
    28
    this. i like.
    spoiler for people i respect
    [SPOIL]galkon, Cocoa, infexis, daza, SWAT, penor, clienthax, k4rn4ge, garyking, Ghost++, kenneh, coder alex, sanity, badger41, vagoo [/SPOIL]
    most epic series [email protected]!!
    [SPOIL]
    [/SPOIL]
    Reply With Quote  
     

  6. #26  
    King of the North
    Lord Stark's Avatar
    Join Date
    Jan 2010
    Age
    27
    Posts
    1,071
    Thanks given
    105
    Thanks received
    41
    Rep Power
    28
    Quote Originally Posted by jochem View Post
    still didn't figure out where this goes;

    Code:
    staffControls(rsFonts);
    Galkons 474 refactored client ;3
    bro just search "(rsFonts);" and add it with the rest.
    spoiler for people i respect
    [SPOIL]galkon, Cocoa, infexis, daza, SWAT, penor, clienthax, k4rn4ge, garyking, Ghost++, kenneh, coder alex, sanity, badger41, vagoo [/SPOIL]
    most epic series [email protected]!!
    [SPOIL]
    [/SPOIL]
    Reply With Quote  
     

  7. Thankful user:


  8. #27  
    Howdy

    gold_fish's Avatar
    Join Date
    Nov 2010
    Posts
    1,062
    Thanks given
    144
    Thanks received
    147
    Rep Power
    107
    Quote Originally Posted by king elf View Post
    bro just search "(rsFonts);" and add it with the rest.
    Glad you like it, and thanks for helping him out before i got there xD lol

    Reply With Quote  
     

  9. #28  
    Banned

    Join Date
    Jul 2011
    Age
    27
    Posts
    748
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    [SPOIL]
    Quote Originally Posted by Artesia View Post
    I'm making this a snippet because I really don't feel the need to explain how things work besides the JOptionPane and thats it. There is also a little anti-leech so if you don't have common sense please leave (Anti-Leech is in Step4)

    TIP: You can change the text of the buttons so you don't need to have all the same commands I do in this.
    TIP: If you do not move after logging in and you have not clicked the button to open the interface yet the JOptionPane, it will usually appear behind the client, so if you don't see it after clicking dont freak out and just look behind the client.
    TIP: You wont have the new scroll bar because thats custom added thanks to the help of [Only registered and activated users can see links. ]

    Base: Project Insanity
    Difficulty: 3.5/10 - need a brain
    Credits:
    93% Myself
    5% Sanity - ideas
    1% I'm a Jerk (help on idea when working with Zepsity)
    1% Jagex for the sprites

    How JOptionPane works: It opens a interface , [Only registered and activated users can see links. ]


    Step 1, Download the sprites [Only registered and activated users can see links. ];Extract the folder into your sprites folder (Client side you derps)

    Step 2, RSInterface.java, client sided.

    Code:
    staffControls(rsFonts);
    and

    Code:
    public static void staffControls(RSFont[] TDA) {
    			RSInterface tab = addTabInterface(37000);
    			RSInterface scroll = addTabInterface(37002, 2);
    			addSprite(37001, 0, "staffControl/backdrop");
    			//information box and title 
    			addText(37080, "Enter Title", 0xFF981F, false, true, 52, TDA, 2); //Title
    			addText(37081, "Information, enter here", 0xFF981F, false, true, 52, TDA, 2); //Information
    			addText(37082, "Information, enter here", 0xFF981F, false, true, 52, TDA, 2); //Information
    			addText(37083, "Information, enter here", 0xFF981F, false, true, 52, TDA, 2); //Information
    			tab.totalChildren(6);
    			//Interface
    			tab.child(0, 37001, 0, 0);
    			tab.child(1, 37002, -147, 80);
    			tab.child(2, 37080, 23, 20);
    			tab.child(3, 37081, 243, 157);
    			tab.child(4, 37082, 243, 187);
    			tab.child(5, 37083, 243, 217);
    			//information box and title start
    			
    			//information box and title end
    			scroll.width = 312;//312
    			scroll.height = 248;//248
    			scroll.scrollMax = 785;//735
    		
    			//buttons themself, in order
    			addButton(37011, 0, "staffControl/mod", 116, 26, "Lock Account", 1);
    			addButton(37012, 0, "staffControl/mod", 116, 26, "Kick Player", 1);
    			addButton(37013, 0, "staffControl/mod", 116, 26, "Mute Player", 1);
    			addButton(37014, 0, "staffControl/mod", 116, 26, "Jail Player", 1);
    			addButton(37015, 0, "staffControl/mod", 116, 26, "IpMute Player", 1);
    			addButton(37016, 0, "staffControl/mod", 116, 26, "Un-Mute Player", 1);
    			addButton(37017, 0, "staffControl/mod", 116, 26, "Un-Jail Player", 1);
    			addButton(37018, 0, "staffControl/mod", 116, 26, "Check Bank", 1);
    			addButton(37019, 0, "staffControl/mod", 116, 26, "Check Inventory", 1);
    			addButton(37020, 0, "staffControl/admin", 116, 26, "Announcement", 1);
    			addButton(37021, 0, "staffControl/admin", 116, 26, "Ban Player", 1);
    			addButton(37022, 0, "staffControl/admin", 116, 26, "Ip-Ban Player", 1);
    			addButton(37023, 0, "staffControl/admin", 116, 26, "Teleport to", 1);
    			addButton(37024, 0, "staffControl/admin", 116, 26, "Teleport to me", 1);
    			addButton(37025, 0, "staffControl/admin", 116, 26, "Un-Ban Player", 1);
    			addButton(37026, 0, "staffControl/admin", 116, 26, "Un-IpBan Player", 1);
    			addButton(37027, 0, "staffControl/admin", 116, 26, "Un-IpMute Player", 1);
    			addButton(37028, 0, "staffControl/admin", 116, 26, "Coming Soon!", 1);
    			addButton(37029, 0, "staffControl/admin", 116, 26, "Coming Soon!", 1);
    			addButton(37030, 0, "staffControl/admin", 116, 26, "Coming Soon!", 1);
    			
    			//buttons text, in order
    			addText(37050, "Lock", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37051, "Kick", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37052, "Mute", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37053, "Jail", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37054, "Ip-Mute", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37055, "Un-Mute", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37056, "Un-Jail", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37057, "Check Bank", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37058, "Check Inv", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37059, "Announce", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37060, "Ban", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37061, "Ip-Ban", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37062, "Teleport To", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37063, "Tele To Me", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37064, "Un-Ban", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37065, "Un-IpBan", 0xFF981F, false, true, 52, TDA, 2);
    			addText(37066, "Un-IpMute", 0xFF981F, false, true, 52, TDA, 2);
    			
    			scroll.totalChildren(37); 
    			//buttons and text start
    			scroll.child(0, 37011, 177, 8);
    			scroll.child(1, 37012, 177, 47);
    			scroll.child(2, 37013, 177, 85);
    			scroll.child(3, 37014, 177, 123);
    			scroll.child(4, 37015, 177, 161);
    			scroll.child(5, 37016, 177, 199);
    			scroll.child(6, 37017, 177, 237);
    			scroll.child(7, 37018, 177, 275);
    			scroll.child(8, 37019, 177, 313);
    			scroll.child(9, 37020, 177, 351);
    			scroll.child(10, 37021, 177, 389);
    			scroll.child(11, 37022, 177, 427);
    			scroll.child(12, 37023, 177, 465);
    			scroll.child(13, 37024, 177, 503);
    			scroll.child(14, 37025, 177, 541);
    			scroll.child(15, 37026, 177, 579);
    			scroll.child(16, 37027, 177, 617);
    			scroll.child(17, 37028, 177, 655);
    			scroll.child(18, 37029, 177, 693);
    			scroll.child(19, 37030, 177, 731);
    			scroll.child(20, 37050, 203, 15);
    			scroll.child(21, 37051, 203, 54);
    			scroll.child(22, 37052, 203, 92);
    			scroll.child(23, 37053, 203, 130);
    			scroll.child(24, 37054, 203, 168);
    			scroll.child(25, 37055, 203, 207);
    			scroll.child(26, 37056, 203, 245);
    			scroll.child(27, 37057, 203, 282);
    			scroll.child(28, 37058, 203, 321);
    			scroll.child(29, 37059, 203, 359);
    			scroll.child(30, 37060, 203, 397);
    			scroll.child(31, 37061, 203, 435);
    			scroll.child(32, 37062, 203, 473);
    			scroll.child(33, 37063, 203, 511);
    			scroll.child(34, 37064, 203, 550);
    			scroll.child(35, 37065, 203, 588);
    			scroll.child(36, 37066, 203, 625);
    			//buttons and text end
    		}

    Step 3, Open up your source folder to "\Source\src\server\model\players"

    Step 4, Create a new .java file called CommandControl.java and put this in it
    Anti-Leech: I'm only giving you one command, get your lazy butt to work and do the rest, 1 reason is because your commands could be different than mine etc...
    Code:
    
    package server.model.players;
    
    import java.util.Arrays;
    import server.core.config.*;
    import server.Server;
    import server.model.players.packets.Commands;
    import server.model.players.*;
    import server.util.Misc;
    import server.net.Connection;
    import javax.swing.*;
    
    /**
      * Made By: Artesia/Nathan
      * 5/14/2012
     **/
    
    public class CommandControl {
    
    	public CommandControl(Client c) {
    		this.c = c;
    	}
    
    	private Client c;
    	
    	public long clickDelay = 0;
    
    	public boolean clickButtons(int id) {
    		if(System.currentTimeMillis() - clickDelay < 1000) {
    			return false;
    		}
    		clickDelay = System.currentTimeMillis();
    		//This is a warning/information message letting you know that you have opened the interface
    		if (id == #####)
    		{
    			JOptionPane.showMessageDialog(null,
    			"You have opened up the staff control panel.\n " + "Clicking a commmand will open up a dialouge\n " + "box for you to enter the name of a victom", 
    			"Control Information", JOptionPane.INFORMATION_MESSAGE);
    			c.getPA().showInterface(37000);
    		}
                    //Command start
    		if (id == 144148) 
    		{
    			c.getPA().closeAllWindows();
    			if(c.playerRights > 0)
    			{
    				String kick = " ";
    				kick = JOptionPane.showInputDialog(null, "Enter the name of the player \n" + "that you wish to kick.", "Kick Player", JOptionPane.WARNING_MESSAGE);
    					try {	
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(kick)) {
    								Server.playerHandler.players[i].disconnected = true;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Incorrect name or invalid player.");
    				}	
    			}
    			return true;
    		}
    	}
    }
    Step 5, In client.java add this
    Code:
    public CommandControl commandControl = new CommandControl(this);
    Step 6, In clickingbuttons.java add this
    Code:
    if(c.commandControl.clickButtons(actionButtonId))
    				return;
    Step 7, Congratulations you have just added this interface:

    Step 8, Get your lazy-ness to work and attempt to create the other commands

    Step 9, Enjoy and if your feeling sexy drop a thanks and maybe ill help you with some commands if your a newb
    [/SPOIL]

    So using
    Reply With Quote  
     

  10. #29  
    Howdy

    gold_fish's Avatar
    Join Date
    Nov 2010
    Posts
    1,062
    Thanks given
    144
    Thanks received
    147
    Rep Power
    107
    Quote Originally Posted by Ambient View Post
    [SPOIL]


    [/SPOIL]

    So using
    Haha thanks

    Reply With Quote  
     

  11. #30  
    Registered Member Pentiun's Avatar
    Join Date
    Jun 2010
    Posts
    167
    Thanks given
    5
    Thanks received
    9
    Rep Power
    0
    Nice release, thanks for this,may use in the future

    Proud ZaZuScape Founder
    We are back... We are not forgotten... We are ZaZuScape.


    ZaZuScape is Back, and we are trying to Find a Client Developer for Renamed - Do you wish to be apart? Pm Me
    Reply With Quote  
     

Page 3 of 5 FirstFirst 12345 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. Control panel: How do i add a command to it?
    By Runebay™ in forum Help
    Replies: 0
    Last Post: 10-14-2009, 06:26 AM
  2. new pest control interface
    By Poxer in forum Show-off
    Replies: 7
    Last Post: 04-18-2009, 10:33 PM
  3. New Pest Control Interface
    By Scu11 in forum Show-off
    Replies: 12
    Last Post: 03-26-2009, 07:58 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •