With this code you will be able to open users Default Browser with one or more URLs you choose, for example you dont need anymore to send the URL via text message which must be copied and paste to browser letter by letter BUT it will automatically open the browser with the URLs you choose, the code works on JAVA6+
String URLs[]=
{
"www.maxcheaters.com",//Delete or add more
"www.maxcheaters.com/forum/index.php",
};
try
{
if (Desktop.isDesktopSupported())
{
Desktop desktop = Desktop.getDesktop();
if (desktop.isSupported(Desktop.Action.BROWSE))
{
for (int i=0; i!=URLs.length; i++)
desktop.browse(new URI(URLs[i]));
}
}
}
catch (Exception e)
{
e.printStackTrace();
}
You can put this code in any command or in any action, even in enterworld.java!
For example I created a /vote command so you can test(which AUTOMATICALLY redirects you to your vote web page), you add your URLs or a single URL into the String border and the command opens those URLs automatically, so lets start...
Download the command http://www.4shared.com/file/bMDkyi-u/Vote.html? and paste it on your scripts\handlers\usercommandhandlers, then add the imports on your MasterHandler.java,
and make it:
import handlers.usercommandhandlers.Time;
+import handlers.usercommandhandlers.Vote;
AND on same file MasterHandler.java
Time.class,
+Vote.class,
OlympiadStat.class,
Also for the command to work you must add this line to your CommandName-e located in your System file (if you get errors open it reply here) i opened mine with ct2.4 file edit
133 109 a,Olympiad Score\0
+134 133 a,vote\0
Credits me for both of the code and vote, and OFC google books for help:)