Search the Community
Showing results for tags '562opening'.
Found 1 result
-
difficultly = 1 knowledge = copy/paste what you're makein [URL="http://www.youtube.com/embed/Xp14g2E_62E"]CLICK HERE[/URL] [SIZE="6"]CLIENT SIDE:[/SIZE] open up [COLOR="Cyan"]packetparser.java[/COLOR] \client\src\[COLOR="CYAN"]packetparser.java[/COLOR] At the top of the page you should see imports kinda like this: [CODE]import java.awt.Color; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException;[/CODE] Add this to the imports [CODE]import java.awt.Desktop; import java.net.URL; import java.net.*; import java.io.*;[/CODE] ok now search for [CODE]if ((i_311_ ^ 0xffffffff) != -100) {[/CODE] You should see something like this [CODE] if ((i_311_ ^ 0xffffffff) != -100) { if (!string_314_.equals("") && Class214.method2787(string_314_, -122)) { Class131_Sub35.anInt4583 = -1; return true; [COLOR="Red"]}[/COLOR][/CODE] after the [COLOR="red"]}[/COLOR] add this [CODE] if (string_315_.contains(":url:")) { String url = string_315_; string_315_ = "Opening browser to: "+url.substring(6); if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI(url.substring(6))); } catch (Exception e) { } } else { openURL(url.substring(6)); } }[/CODE] finally add (IF YOU DON'T KNOW WHERE TO PUT DO THE SPOILER) [CODE] public static void openURL(String url) { String osName = System.getProperty("os.name"); try { if (osName.startsWith("Windows")) Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + url); else { String[] browsers = { "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape" }; String browser = null; for (int count = 0; count < browsers.length && browser == null; count++) if (Runtime.getRuntime().exec( new String[] { "which", browsers[count] }) .waitFor() == 0) browser = browsers[count]; Runtime.getRuntime().exec(new String[] { browser, url }); } } catch (Exception e) { System.out.println( "Error in opening browser" + ":\n" + e.getLocalizedMessage()); } }[/CODE] [SPOILER="Click here if you dont know where to put"]finally search for [CODE]public static void method1577(int arg0) {[/CODE] above this add [CODE] public static void openURL(String url) { String osName = System.getProperty("os.name"); try { if (osName.startsWith("Windows")) Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + url); else { String[] browsers = { "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape" }; String browser = null; for (int count = 0; count < browsers.length && browser == null; count++) if (Runtime.getRuntime().exec( new String[] { "which", browsers[count] }) .waitFor() == 0) browser = browsers[count]; Runtime.getRuntime().exec(new String[] { browser, url }); } } catch (Exception e) { System.out.println( "Error in opening browser" + ":\n" + e.getLocalizedMessage()); } }[/CODE][/SPOILER] Thats it for client side [SIZE="6"]SERVER SIDE:[/SIZE] open up[COLOR="CYAN"] CommandPacketHandler.java[/COLOR] \SERVERNAME\src\com\rs2hd\packethandler\[COLOR="CYAN"]CommandPacketHandler.java[/COLOR] Add this command: [CODE]if (cmd[0].equals("[COLOR="red"]google[/COLOR]")) { player.getActionSender().sendMessage("[COLOR="Lime"]:url: http://www.google.com[/COLOR]"); }[/CODE] now open up [COLOR="CYAN"] CommandsPacketHandler.java[/COLOR] \SERVERNAME\src\com\rs2hd\packethandler\[COLOR="CYAN"]CommandsPacketHandler.java[/COLOR] and add same command but with "::" [CODE] if (cmd[0].equals("[COLOR="red"]::google[/COLOR]")) { player.getActionSender().sendMessage("[COLOR="Lime"]:url: http://www.google.com[/COLOR]"); }[/CODE] [COLOR="red"]google[/COLOR] can be change for the name of the command [COLOR="Lime"]:url: [url=http://www.google.com]Google[/url][/COLOR] can be change for the url but you need to keep :url: (website) should be rest let me know if i'm missing something :) if you used this please click [url]http://adf.ly/2uuNt[/url] thanks :) if you want to donate: [URL="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=3FYEJGY3CW9CC&lc=US¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"][IMG]http://4.bp.blogspot.com/_KLy8J18UpsI/TUDqlcPqxyI/AAAAAAAAAFI/iE8RCsXEE6Y/s1600/paypal.png[/IMG][/URL] *** i did not copy steve his tut is way diff from mine?:rofl: i obviously took my time in it? so didn't copy him at all. (not saying "steve" didnt take time)
- 10 replies
-
- 562opening
- command
-
(and 1 more)
Tagged with: