Jump to content

Search the Community

Showing results for tags 'automatic'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 10 results

  1. now i have done what the tutorial says up to my knowledge but i cant figure out exactly what mysql is and i cant find out based on my research, can somebody dumb it down a little bit for me? [URL=http://www.runelocus.com/forums/usertag.php?do=list&action=hash&hash=noob]#noob[/URL] thanks
  2. i need help with the automatic update system so people dont have to keep downloading new jars so we can just update the exsisting jar autmatically after updateing cache folder this is the code we are using. import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.FileWriter; import java.io.BufferedWriter; import java.io.BufferedOutputStream; import java.io.BufferedInputStream; import java.io.FileOutputStream; import java.io.FileInputStream; import java.io.InputStream; import java.net.URLConnection; import java.net.URL; import java.util.zip.ZipFile; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.Enumeration; import sign.signlink; public class CacheDownloader { private client client; private final int BUFFER = 1024; private final int VERSION = 10; private String cacheLink = "http://dl.dropbox.com/s/ckb6bmqpdmjrjkr/RealityScapeCache.zip"; private String fileToExtract = getCacheDir() + getArchivedName(); public CacheDownloader(client client) { this.client = client; } private void drawLoadingText(String text) { client.drawLoadingText(35, text); //System.out.println(text); } private void drawLoadingText(int amount, String text) { client.drawLoadingText(amount, text); //System.out.println(text); } private String getCacheDir() { return signlink.findcachedir(); } private String getCacheLink() { return cacheLink; } private int getCacheVersion() { return VERSION; } public CacheDownloader downloadCache() { try { File location = new File(getCacheDir()); File version = new File(getCacheDir() + "/cacheVersion" + getCacheVersion() + ".dat"); if(!location.exists()) { //drawLoadingText("Loading new Updates...."); downloadFile(getCacheLink(), getArchivedName()); unZip(); //System.out.println("UNZIP"); BufferedWriter versionFile = new BufferedWriter(new FileWriter(getCacheDir() + "/cacheVersion" + getCacheVersion() + ".dat")); versionFile.close(); deleteZIP(getArchivedName()); } else { if(!version.exists()) { //drawLoadingText("~ First Time Installation, Only Once! ~"); downloadFile(getCacheLink(), getArchivedName()); unZip(); //System.out.println("UNZIP"); BufferedWriter versionFile = new BufferedWriter(new FileWriter(getCacheDir() + "/cacheVersion" + getCacheVersion() + ".dat")); versionFile.close(); deleteZIP(getArchivedName()); } else { return null; } } } catch(Exception e) { } return null; } private void downloadFile(String adress, String localFileName) { OutputStream out = null; URLConnection conn; InputStream in = null; try { URL url = new URL(address); out = new BufferedOutputStream( new FileOutputStream(getCacheDir() + "/" +localFileName)); conn = url.openConnection();
  3. [FONT=Arial Black][SIZE=5][CENTER] I noticed that this was posted here: [url]http://www.runelocus.com/forums/showthread.php?5690-Automatic-Port-Forwarding[/url] but you may close this thread or use this as the font and such is a little better. His thread was copied and pasted also, mine was too. One of the many annoyances of running a server is having to open up port 43594 (or whatever port you are using) in your router. Portforward.com has helped make this an easy process, but if you don't know your password to your router, you're out of luck. Luckily, there's a technology called UPnP that can resolve this. Basically, it lets devices on your network discover and talk to each other. One use of this is to find the router, and tell it to add a port forwarding entry. We can use this to automatically port forward for our private server. Note: UPnP has to be enabled in the router for this to work, and in most routers it is. There is a UPnP library written in Java called UPnPLib, and I have packaged it along with a simple class I wrote to add port forwarding entries into this JAR file: [IMG]http://www.allgofree.org/pics/jar.png[/IMG] [URL="http://www.allgofree.org/java/AllGoFreePortForwarding.jar"]AllGoFreePortForwarding.jar[/URL] Step 1: Download the file above, and BACKUP your server before you attempt this. This is a very simple addition, but if you don't know what you've done wrong you will have a hard time fixing it! Step 2: Place the file in the correct location. If you are using a 317 server, place the JAR file in the server's folder with all the source (.java) and class (.class) files. [IMG]http://www.allgofree.org/pics/portforwardtutorial/317placement.png[/IMG] Step 3: Now that we have placed the JAR file in a location where the server can get at it, we need to include it in your server's classpath. The classpath is a list of places for the JVM to look for class files when the server is running. To add the JAR to your server's classpath, open the files you use to compile and run your server. Here is an example picture from a 317 server: [IMG]http://www.allgofree.org/pics/portforwardtutorial/317files1.png[/IMG] The -cp option is used with the compiler and the server to modify the classpath. To add multiple folders/files to the classpath, you separate the paths with a semicolon on Windows (;) and a colon (:) on UNIX-like systems such as Linux or Mac OS X. You must add the JAR file to the classpath of every java or javac command in both of the run and compile files. Follow these steps to do this: 1. If there isn't a -cp option anywhere in the file already, add one after the java/javac command. 317: [IMG]http://www.allgofree.org/pics/portforwardtutorial/317files2.png[/IMG] 2. Add the path to the JAR file to the classpath. Since we placed the JAR file in the same folder as the server code, the path to it is: .\AllGoFreePortForwarding.jar (or ./AllGoFreePortForwarding.jar on UNIX-like systems) If there is already something after the -cp option, add a path separator (the ; character on Windows) after what is already there, and then add the path to the JAR file. 317 (Windows file paths): [IMG]http://www.allgofree.org/pics/portforwardtutorial/317files3b.png[/IMG] Step 4: Test both the compile and run scripts that you just edited. They should work exactly as they did before, if they do not, restore your backup and start over from the beginning or post for help, including the contents of both your run and compile scripts, and what server type you are doing this on. Step 5: If your compile and run scripts are still functioning, then you are almost done! All you have to do is add in the few lines of code that actually do the port forwarding. 317: Open the file "Server.java" or "server.java", and find this: [CODE]public static void main(String[] args)[/CODE] [IMG]http://www.allgofree.org/pics/portforwardtutorial/317code1.png[/IMG] Once you've found it, simple add this code on a new line after the opening bracket of the method: [CODE]try { System.out.println("Automatically port forwarding..."); org.allgofree.upnp.UpnpPortForwarder.INSTANCE.addMapping(43594); System.out.println("Automatic port forwarding complete."); } catch (Exception ex) { System.out.println("Could not automatically port forward, stacktrace:"); ex.printStackTrace(); }[/CODE] [IMG]http://www.allgofree.org/pics/portforwardtutorial/317code2b.png[/IMG] Of course you can change 43594 to whatever port you want to be forwarded, but it should match the port that your server is running on. Step 6: Compile and run your server, and if you get the message "Automatic port forwarding complete.", then your server was successful in opening up the port in your router. Now pat yourself on the back and get back to work! Good luck. Need help? Ask me. I will help you install it for free. Credits to ry60003333 [/CENTER][/SIZE][/FONT]
  4. commands.java [CODE]if (playerCommand.equals("client") && c.playerRights >= 3) { for (int j = 0; j < Server.playerHandler.players.length; j++) if (Server.playerHandler.players[j] != null) { Client c2 = (Client)Server.playerHandler.players[j]; c2.getPA().sendFrame126("client link here", 12000); } }[/CODE] make sure the your link is like so- [CODE]www.yourwebsite.com/yourclientname.jar[/CODE] **update your client via ftp/whatever and then type ::client and it will download the new client for every user online**
  5. Hi there. Automatic server messages that load from a file and can be updated at any point without restarting the server. Yay :D Loads from data/messages.txt Simply write the messages in there. New line = new message [CODE]package com.rs.utils; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.Iterator; import java.util.LinkedList; import java.util.Random; import com.rs.game.World; import com.rs.game.player.Player; public class ServerMessages { private static LinkedList<String> messages = new LinkedList<String>(); static { readFromTextFile(); } public static final Random RANDOM = new Random(); public static void execute() { String string = messages.get((int) (Math.random() * messages.size())); for(Iterator<?> iterator = World.getPlayers().iterator(); iterator.hasNext();) { Player players = (Player)iterator.next(); players.sm("<col=006600><shad=000000>[Server]<col=ff0033>"+string); } } public static void readFromTextFile() { try { messages.clear(); BufferedReader reader = new BufferedReader(new FileReader(new File("./data/messages.txt"))); String text; while((text = reader.readLine()) != null) { messages.add(text); } reader.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } [/CODE] World.java [CODE]private static final void addServerMessageEvent() { CoresManager.slowExecutor.scheduleWithFixedDelay(new Runnable() { public void run() { try { ServerMessages.execute(); } catch (Exception e) { e.printStackTrace(); } catch (Error e) { e.printStackTrace(); } } }, 0, 1, TimeUnit.MINUTES); }[/CODE] under: public static final void init() { add: addServerMessageEvent(); Commands.java: [CODE]if(cmd[0].equalsIgnoreCase("reloadmessages")) { player.getPackets().sendGameMessage("Reloaded all server messages."); ServerMessages.readFromTextFile(); return true; }[/CODE] You'll have to change the way it loads/sends messages depending on your source. But it's extremely easy.
  6. Ok so I have this problem. I'm using teamtorva aka torvapkz source, which uses ErasedPkzcache. I have the cache uploaded on dropbox and all. The client downloads the cache, then puts it in the right place, PARTIALLY unzips it, says, Loading cache library, and then it says "Error loading… Contact staff" After that I checked my C drive, and it appears that the cache hasn't been downloaded fully, there is a folder containing my partially unzipped cache and my zipped cache which contains all files. The command prompt gives me this error: [CODE]ErasedPkz is loading.. java.io.FileNotFoundException: C:\ErasedPkzcache1\Maps\mapConfig.txt (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileReader.<init>(Unknown Source) at client.setNewMaps(client.java:80) at client.startUp(client.java:8754) at RSApplet.run(RSApplet.java:33) at client.run(client.java:6027) at java.lang.Thread.run(Unknown Source) java.lang.NegativeArraySizeException at client.drawLogo(client.java:3948) at client.startUp(client.java:8780) at RSApplet.run(RSApplet.java:33) at client.run(client.java:6027) at java.lang.Thread.run(Unknown Source) Error: loaderror Starting up 20 [/CODE] This is my signlink.java: [URL=http://pastebin.com/raw.php?i=2EtrEpdv]signlink.java[/URL] My client.java (Sorry, was too big to put on pastebin or here, so download from dropbox): [URL=http://dl.dropbox.com/u/29863986/client.java]client.java[/URL] My CacheDownloader.java: [URL=http://pastebin.com/raw.php?i=3XhALq7L]cachedownloader.java[/URL] And my cache link (on dropbox): [URL=http://dl.dropbox.com/u/29863986/ErasedPkzcache1.zip]ErasedPkzcache1[/URL] I will be VERY thankful to somebody who would help me fix this. Also, I'd be very glad to give you various ranks and features on my server, provided you wish that. Basically, my question is how to make it unzip the cache fully. Thanks a lot in advance!
  7. Instead of refreshing, add a script that activates whenever a PM is received. It'll be a window that says "New PM!" It'll give who it's from, and the subject. If you click 'ok', it will redirect you to the message, if you hit cancel, you will stay where you're at. Discuss?
  8. Hi. How can my Quest tab automatic update. It says that it has [B]6[/B] players online. But if i type ::players, it only have [B]5[/B] players online. How can my quest tab automatic update? Picture below :) [IMG]http://i39.tinypic.com/34drhxg.png[/IMG]
  9. Basically a live thread. If you're looking a thread and you think/know there are new posts, instead of refreshing, the forum should automatically add them to the thread you're reading. Live threads (if that makes sense)
  10. hi all in my server when player log out and he dont back up the player stay on even if he is off and thats a bad problem so i need to know how i can fix that problem i think by making it back up automaticilly so how i can do that? please help soso
×