Jump to content


  • Content count

  • Joined

  • Last visited

  1. Where do you set a respawn time? More Info: The frost dragons are correctly added to NPCSpawning.java;however, they do not respawn on death.
  2. Strange error. Here it is, sir. [IMG]http://i50.tinypic.com/352hxdh.png[/IMG] Note: Flo.dat is in the right place and the mapConfig.txt is in the right place too.
  3. It's uploading now. I had to finish something on my server first. I'll reply letting you know if it works:)
  4. Thank you for the reply! I'll reupload it.
  5. I'm having problems with my cache downloader file. It won't extract the folders, but it extracts all the main files. CacheDownloader.java: [Code]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 = 1; // Version of cache private String cacheLink = "https://dl.dropbox.com/u/70627523/intdubpkcache.zip"; // Link to cache 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(adress); out = new BufferedOutputStream( new FileOutputStream(getCacheDir() + "/" +localFileName)); conn = url.openConnection(); in = conn.getInputStream(); byte[] data = new byte[BUFFER]; int numRead; long numWritten = 0; int length = conn.getContentLength(); while((numRead = in.read(data)) != -1) { out.write(data, 0, numRead); numWritten += numRead; int percentage = (int)(((double)numWritten / (double)length) * 100D); drawLoadingText(percentage, "Downloading Cache " + percentage + "%..."); } System.out.println(localFileName + "\t" + numWritten); drawLoadingText("Unpacking.."); } catch (Exception exception) { exception.printStackTrace(); } finally { try { if (in != null) { in.close(); } if (out != null) { out.close(); } } catch (IOException ioe) { } } } private String getArchivedName() { int lastSlashIndex = getCacheLink().lastIndexOf('/'); if (lastSlashIndex >= 0 && lastSlashIndex < getCacheLink().length() -1) { return getCacheLink().substring(lastSlashIndex + 1); } else { System.err.println("error retreiving archivaed name."); } return ""; } private void unZip() { try { InputStream in = new BufferedInputStream(new FileInputStream(fileToExtract)); ZipInputStream zin = new ZipInputStream(in); ZipEntry e; while((e=zin.getNextEntry()) != null) { if(e.isDirectory()) { (new File(getCacheDir() + e.getName())).mkdir(); } else { if (e.getName().equals(fileToExtract)) { unzip(zin, fileToExtract); break; } unzip(zin, getCacheDir() + e.getName()); } //System.out.println("unzipping2 " + e.getName()); } zin.close(); } catch(Exception e) { e.printStackTrace(); } } private void deleteZIP(String fileName){ // A File object to represent the filename File f = new File(getCacheDir() + fileName); // Make sure the file or directory exists and isn't write protected if (!f.exists()) throw new IllegalArgumentException( "Delete: no such file or directory: " + fileName); if (!f.canWrite()) throw new IllegalArgumentException("Delete: write protected: " + fileName); // If it is a directory, make sure it is empty if (f.isDirectory()) { String[] files = f.list(); if (files.length > 0) throw new IllegalArgumentException( "Delete: directory not empty: " + fileName); } // Attempt to delete it boolean success = f.delete(); if (!success) throw new IllegalArgumentException("Delete: deletion failed"); } private void unzip(ZipInputStream zin, String s) throws IOException { FileOutputStream out = new FileOutputStream(s); //System.out.println("unzipping " + s); byte [] b = new byte[BUFFER]; int len = 0; while ((len = zin.read(b)) != -1) { out.write(b,0,len); } out.close(); } }[/Code] Signlink.java: - What needs to be looked at [Code]public static String findcachedir() { boolean exists = (new File(System.getProperty("user.home") + "/intdubpkcache/")).exists(); if (exists) { //System.out.println("Directory exists"); return System.getProperty("user.home") + "/intdubpkcache/"; } else { File f = new File(System.getProperty("user.home") + "/intdubpkcache/"); f.mkdir(); System.out.println("Directory doesnt exist, making directory"); return System.getProperty("user.home") + "/intdubpkcache/"; } } public static String sencondDir() { File file = new File("C:/intdubpkcache/"); if (!file.exists()) file.mkdir(); return file.toString(); }[/Code] Client.java: First Code [Code]drawLoadingText(0, "Connecting to File Server..."); new Update("https://dl.dropbox.com/u/70627523/intdubpkcache.zip", "intdubpkcache.zip", signlink.findcachedir()); abyte0 = decompressors[0].decompress(i); }[/Code] Second Code [Code]public static void compress(int ID) { try { String inF = "C:/intdubpkcache/intdubpkcache.zip/gzip/"+ ID +".dat"; String outF = "C:/intdubpkcache/intdubpkcache.zip/gzip/"+ ID;[/Code] Here's my cache link to see if it's correctly ziped: [url]https://dl.dropbox.com/u/70627523/intdubpkcache.zip[/url] Thanks for reading and helping.
  6. runehero

    Item to cash

    Hi guys. I was wondering, How do you make chaotics or any other item turn to cash when a player dies in the wild? Thanks!
  7. My account is disabled? I haven't even logged in yet! There is also no accounts in the character folder, and no IP's or usernames under the ban files. Thoughts?
  8. runehero

    [PI] Slayer shops

    Yes sir. A picture: [IMG]http://i47.tinypic.com/ulpvr.png[/IMG]
  9. runehero

    [PI] Slayer shops

    I'm confused. How can I make an abyssal whip worth 50 slayer points [B]AND[/B] be sold in a general store for like, 120k? When I make the abyssal whip worth 50 slayer points, it is worth 50 GP in the general store. This is a problem, because protect item prayer won't protect it over a rune platebody. [B]What I've tried:[/B] -Changing the abyssal whip's price to 120,000 GP in the price.txt. And using the case XXXX in the shopassitant.java [I]Result:[/I] -When I try to buy an abyssal whip from the slayer shop, it says it is worth 50 slayer points but, can only be bought for 120,000 slayer points. What's the solution to make an abyssal whip be worth 120k to be sold in an general store, but can be bought for 50 slayer points? In short, how can you make an item have 2 different prices? I've seen some servers with this. Thanks fellows!
  10. runehero

    Obama or Romney

    Obama sucks. Too much debt under this black fool. Before liberal idiots start calling me a racist, I AM BLACK.
  11. [quote name='dawson1']what do u mean like a npc thats uses mage range and meele like jad?[/QUOTE] [quote name='runehero']I'm talking about like bandos' multi attack or Kree'ra's multi attack. How do I make another npc use Bandos' multi attack?[/QUOTE] ^^^^^^^