Thread: can anyone make me these commands

Results 1 to 5 of 5
  1. #1 can anyone make me these commands 
    Registered Member
    T-Sex's Avatar
    Join Date
    Jan 2008
    Posts
    1,824
    Thanks given
    0
    Thanks received
    3
    Rep Power
    130
    delta base...

    need a comand were it will send u to the link on fourms if u type ::vote


    also

    need a command were i do like reset then a number so it resets server in like 20 seconds but saves everyones characters

    will rep thanks
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2009
    Posts
    608
    Thanks given
    1
    Thanks received
    17
    Rep Power
    6
    For the first thing, btw this is untested.
    Add this in client.java:
    Code:
    import java.net.URLConnection;
    import java.net.URL;
    
    private String link = "Link Here"; // Link to site
    Now add this somewhere above customCommands:
    Code:
    	private static void openUpWebSite(String url) {
    		Desktop d = Desktop.getDesktop();
    		try {
    			d.browse(new URI(url)); 	
    		} catch (Exception e) {
    		}
    	}
    Now for the command, add this under customCommands:
    Code:
    if (command.equalsIgnoreCase("vote")) {
    openUpWebSite("Link Here!");
    }
    Reply With Quote  
     

  3. #3  
    Registered Member
    T-Sex's Avatar
    Join Date
    Jan 2008
    Posts
    1,824
    Thanks given
    0
    Thanks received
    3
    Rep Power
    130
    get this error

    Code:
    client.java:22: class, interface, or enum expected
    private String link = "http://www.hiscapepkz.smfnew.com/index.php?topic=6.msg617
    #new";
            ^
    1 error
    Press any key to continue . . .

    S
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Aug 2009
    Posts
    608
    Thanks given
    1
    Thanks received
    17
    Rep Power
    6
    Delete that private String link, it's not used anymore.
    Reply With Quote  
     

  5. #5  
    Registered Member
    T-Sex's Avatar
    Join Date
    Jan 2008
    Posts
    1,824
    Thanks given
    0
    Thanks received
    3
    Rep Power
    130
    i'll do this another time need do the other thing
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

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