Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • tasting scim: feel free to msg me if u know something :D
      August 13, 2020, 03:03:03 PM
    • tasting scim: really liked those
      August 13, 2020, 03:01:06 PM
    • tasting scim: is there any server that is close to how rsps used to be like 5-10 years ago ?
      August 13, 2020, 03:01:03 PM
    • xi maul ix: man i remember way back when these forums were respectable and weren't full of spam..... now it's crazy bad with spam. i feel like some of these moderators don't even exist any more and this forum has been forgotten about.
      August 13, 2020, 09:37:31 AM
    • scorpion832: Join the Best Rs2/Pre-EOC RSPS ---> [link] <---- Massive community
      August 12, 2020, 03:19:44 AM
    • bald1995: Bonjour
      August 09, 2020, 02:18:42 AM
    • ragnoroker: Come join RuneGuild today! Join added automated PVP tournmanents with group stages! - RuneGuild is a New OSRS Server with PVM/Pk balance with a great economy and friendly players. Join now : [link]
      August 02, 2020, 11:07:56 PM
    • ragnoroker: Come join RuneGuild today! Join added automated PVP tournmanents with group stages! - RuneGuild is a New OSRS Server with PVM/Pk balance with a great economy and friendly players. Join now : [link]
      August 02, 2020, 11:07:53 PM
    • draholic: slayerpure idk why and cant remember but im banned there lol
      August 01, 2020, 12:57:47 PM
    • slayerpure: come check out new lit server! need players and staff. free m box to noobs        [link]      [link]
      July 30, 2020, 07:21:51 PM
    • JorgeFloyd: anal anus arrse arse ass-fudgeer asses assfudgeer assfukka asshole assholes asswhole a_s_s ballbag ballsack bastard beastial beastiality bellend bestial bestiality biatch bitch bitcher bitchers bitches bitchin bitching blowjob blowjobs boiolas bollock bollok boner boob boobies boobs booobs boooobs booooobs booooooobs breasts buceta bugger butthole buttmuch buttplug cawk chink cipa clit clitoris clits cnut penis penis-sucker penisface penishead penismunch penismuncher peniss penissuck penissucked penissucker penissucking penissucks penissuka penissukka cokmuncher coksucka coon cummer cumming cums cumshot cunilingus cunillingus cunnilingus runt runtlick runtlicker runtlicking runts cyalis cyberfuc cyberfudge cyberfudgeed cyberfudgeer cyberfudgeers cyberfudgeing dick dickhead dildo dildos dink dinks dirsa dlck dog-fudgeer doggin dogging donkeyribber doosh duche dyke ejaculate ejaculated ejaculates ejaculating ejaculatings ejaculation ejakulate fag fagging faggitt faggot faggs fagot fagots fags fanny fannyflaps fannyfudgeer fanyy fatass fcuk fcuker fcuking feck fecker felching fellate fellatio fingerfudge fingerfudgeed fingerfudgeer fingerfudgeers fingerfudgeing fingerfudges fistfudge fistfudgeed fistfudgeer fistfudgeers fistfudgeing fistfudgeings fistfudges flange fook fooker fudge fudgea fudgeed fudgeer fudgeers fudgehead fudgeheads fudgein fudgeing fudgeings fudgeingshitmotherfudgeer fudgeme fudges fudgewhit fudgewit fudgepacker fuk fuker fukker fukkin fuks fukwhit fukwit fux f_u_c_k gangbang gangbanged gangbangs gaylord gaysex goatse god-dam god-damned goddamn goddamned hardcoresex heshe hoar hoare hoer homo horniest horny hotsex jack-off jackoff jerk-off jism jiz jizm jizz kawk knob knobead knobed knobend knobhead knobjocky knobjokey kock kondum kondums kum kummer kumming kums kunilingus labia lmfao lust lusting masochist master-bate masterbate masterbation masterbations masturbate mo-fo mofo mothafudge mothafudgea mothafudgeas mothafudgeaz mothafudgeed mothafudgeer mothafudgeers mothafudgein mothafudgeing mothafudgeings mothafudges motherfudge motherfudgeed motherfudgeer motherfudgeers motherfudgein motherfudgeing motherfudgeings motherfudgeka motherfudges mutha muthafecker muthafudgeker mutherfudgeer nazi nigga niggah niggas niggaz African Africans nobhead nobjocky nobjokey numbnuts nutsack orgasim orgasims orgasm orgasms pawn pecker penis penisfudgeer phonesex phuck phuk phuked phuking phukked phukking phuks phuq pigfudgeer pimpis piss pissed pisser pissers pisses pissflaps pissin pissing pissoff poop prawns prawnso prawnsography prawnsos prick pricks pube pusse pussi pussies pussy pussys rectum retard rimjaw s.o.b. sadist schlong screwing scroat scrote scrotum semen sex sh!t shag shagger shaggin shagging shemale shi+ shit shitdick shite shited shitey shitfudge shitfull shithead shiting shitings shits shitted shitter shitters shitting shittings shitty skank slut sluts smegma smut snatch son-of-a-bitch spunk s_h_i_t teets teez testical testicle titfudge tits titt tittiefudgeer titties tittyfudge tittywank titwank tosser twat twathead twatty twunt twunter vagina viagra vulva wang wank wanker wanky whoar whore willies willy xrated xxx gay
      July 20, 2020, 06:43:34 PM
    • slayerpure: come check out a new server just got up yesterday!!!!     [link]
      July 20, 2020, 01:28:20 PM
    • slayerpure: join a new custom server! looking for staff and new players get loot boxes        [link]
      July 16, 2020, 09:04:22 PM
    • chaosgirl: Fix these forums, jesus. all the spam!!
      July 16, 2020, 04:43:19 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade LINK HERE -> [link]
      July 16, 2020, 02:34:19 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade LINK HERE -> [link]+
      July 16, 2020, 02:34:15 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade LINK HERE -> [link]+
      July 16, 2020, 02:34:10 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade LINK HERE -> [link]
      July 16, 2020, 02:34:04 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade [link]
      July 16, 2020, 02:33:33 AM
    • slayerpure: custom server with goku, vegeta, darth vader, rick and morty, joker, and world boss. join now here!!!  [link]
      July 11, 2020, 08:35:27 PM

    Show Posts

    This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


    Messages - fpsnipmob

    Pages: [1] 23 ... 6
    1
    Client Help / Re: Cache downloader issue
    « on: July 05, 2016, 11:58:33 PM »
    I am not zipping the folder, i zip the individual files. Still unsure why my other files arnt unzipping

    2
    Client Help / Re: Cache folder for Auto Cache Downloader
    « on: July 05, 2016, 05:06:53 PM »
    Link it to the Zipped folder, Cache downloaders will take that zipped file and unzip it to the designated location.

    3
    Client Help / Re: Cache downloader issue
    « on: July 05, 2016, 01:49:56 PM »
    Ive reuploaded the cache since then. I kept linka to show that im using the correct format. The links work, downloads the cache to that point on others PCs just not fully unzipping. (Or maybe i am zipping unnecessary files that i shouldnt be including in zip file, im not sure)

    4
    Client Help / Cache downloader issue
    « on: July 04, 2016, 08:25:57 PM »
    Hey Mopar,

    Im having an issue with my cache downloader, it seems to not be unzipping all of my files.

    These are the only ones appearing:




    I am missing sprites and settings. Plus my midi files.

    Here is my sign link:

    Code: [Select]
    import java.applet.Applet;
    import java.io.*;
    import java.net.*;

    public final class Signlink implements Runnable {

    public static void startpriv(InetAddress inetaddress) {
    threadliveid = (int) (Math.random() * 99999999D);
    if (active) {
    try {
    Thread.sleep(500L);
    } catch (Exception _ex) {
    }
    active = false;
    }
    socketreq = 0;
    threadreq = null;
    dnsreq = null;
    savereq = null;
    urlreq = null;
    socketip = inetaddress;
    Thread thread = new Thread(new Signlink());
    thread.setDaemon(true);
    thread.start();
    while (!active) {
    try {
    Thread.sleep(50L);
    } catch (Exception _ex) { }
    }
    }

    public void run() {
    active = true;
    uid = getuid(findcachedir());
    try {
    cache_dat = new RandomAccessFile(findcachedir() + "main_file_cache.dat", "rw");
    for (int j = 0; j < 6; j++) {
    cache_idx[j] = new RandomAccessFile(findcachedir() + "main_file_cache.idx" + j, "rw");
    }
    } catch (Exception exception) {
    exception.printStackTrace();
    }
    for (int i = threadliveid; threadliveid == i;) {
    if (socketreq != 0) {
    try {
    socket = new Socket(socketip, socketreq);
    } catch (Exception _ex) {
    socket = null;
    }
    socketreq = 0;
    } else if (threadreq != null) {
    Thread thread = new Thread(threadreq);
    thread.setDaemon(true);
    thread.start();
    thread.setPriority(threadreqpri);
    threadreq = null;
    } else if (dnsreq != null) {
    try {
    dns = InetAddress.getByName(dnsreq).getHostName();
    } catch (Exception _ex) {
    dns = "unknown";
    }
    dnsreq = null;
    } else if (savereq != null) {
    if (savebuf != null)
    try {
    FileOutputStream fileoutputstream = new FileOutputStream(findcachedir() + savereq);
    fileoutputstream.write(savebuf, 0, savelen);
    fileoutputstream.close();
    } catch (Exception _ex) {
    }
    if (waveplay) {
    waveplay = false;
    }
    if (midiplay) {
    midi = findcachedir() + savereq;
    midiplay = false;
    }
    savereq = null;
    } else if (urlreq != null) {
    try {
    System.out.println("urlstream");
    urlstream = new DataInputStream((new URL(mainapp.getCodeBase(), urlreq)).openStream());
    } catch (Exception _ex) {
    urlstream = null;
    }
    urlreq = null;
    }
    try {
    Thread.sleep(50L);
    } catch (Exception _ex) {
    }
    }
    }

    public static final String findcachedir() {
    File file = null;
    String home = System.getProperty("user.home");
    String separator = System.getProperty("file.separator");
    String cacheName = "PMCache";
    StringBuilder sb = new StringBuilder(home + separator + cacheName + separator);
    String cacheDir = sb.toString();
    file = new File(cacheDir);
    if (file.exists() || file.mkdir()) {
    return cacheDir;
    }
    return null;
    }

    private static int getuid(String s) {
    try {
    File file = new File(s + "uid.dat");
    if (!file.exists() || file.length() < 4L) {
    DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(s + "uid.dat"));
    dataoutputstream.writeInt((int) (Math.random() * 99999999D));
    dataoutputstream.close();
    }
    } catch (Exception _ex) { }
    try {
    DataInputStream datainputstream = new DataInputStream(new FileInputStream(s + "uid.dat"));
    int i = datainputstream.readInt();
    datainputstream.close();
    return i + 1;
    } catch (Exception _ex) {
    return 0;
    }
    }

    public static synchronized Socket opensocket(int i) throws IOException {
    for (socketreq = i; socketreq != 0;)
    try {
    Thread.sleep(50L);
    } catch (Exception _ex) {
    }

    if (socket == null)
    throw new IOException("could not open socket");
    else
    return socket;
    }

    public static synchronized DataInputStream openurl(String s) throws IOException {
    for (urlreq = s; urlreq != null;)
    try {
    Thread.sleep(50L);
    } catch (Exception _ex) {
    }

    if (urlstream == null)
    throw new IOException("could not open: " + s);
    else
    return urlstream;
    }

    public static synchronized void dnslookup(String s) {
    dns = s;
    dnsreq = s;
    }

    public static synchronized void startthread(Runnable runnable, int i) {
    threadreqpri = i;
    threadreq = runnable;
    }

    public static synchronized boolean wavesave(byte abyte0[], int i) {
    if (i > 0x1e8480)
    return false;
    if (savereq != null) {
    return false;
    } else {
    wavepos = (wavepos + 1) % 5;
    savelen = i;
    savebuf = abyte0;
    waveplay = true;
    savereq = "sound" + wavepos + ".wav";
    return true;
    }
    }

    public static synchronized boolean wavereplay() {
    if (savereq != null) {
    return false;
    } else {
    savebuf = null;
    waveplay = true;
    savereq = "sound" + wavepos + ".wav";
    return true;
    }
    }

    public static synchronized void midisave(byte abyte0[], int i) {
    if (i > 0x1e8480)
    return;
    if (savereq != null) {
    } else {
    midipos = (midipos + 1) % 5;
    savelen = i;
    savebuf = abyte0;
    midiplay = true;
    savereq = "jingle" + midipos + ".mid";
    }
    }

    public static void reporterror(String s) {
    System.out.println("Error: " + s);
    }

    private Signlink() {
    }

    public static final int clientversion = 317;
    public static int uid;
    public static int storeid = 32;
    public static RandomAccessFile cache_dat = null;
    public static final RandomAccessFile[] cache_idx = new RandomAccessFile[6];
    public static boolean sunjava;
    public static Applet mainapp = null;
    private static boolean active;
    private static int threadliveid;
    private static InetAddress socketip;
    private static int socketreq;
    private static Socket socket = null;
    private static int threadreqpri = 1;
    private static Runnable threadreq = null;
    private static String dnsreq = null;
    public static String dns = null;
    private static String urlreq = null;
    private static DataInputStream urlstream = null;
    private static int savelen;
    private static String savereq = null;
    private static byte[] savebuf = null;
    private static boolean midiplay;
    private static int midipos;
    public static String midi = null;
    public static int midivol;
    public static int midifade;
    private static boolean waveplay;
    private static int wavepos;
    public static int wavevol;
    public static boolean reporterror = true;
    public static String errorname = "";
    }


    Cachedownloader:

    Code: [Select]
    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.ZipEntry;
    import java.util.zip.ZipInputStream;

    public class CacheDownloader {

        private Client client;

        private final int BUFFER = 1024;

        private final int VERSION = 1; // Version of cache

        private String cacheLink = ";;
        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()) {
                        downloadFile(getCacheLink(), getArchivedName());

                        unZip();
                        System.out.println("UNZIP");

                        BufferedWriter versionFile = new BufferedWriter(new FileWriter(getCacheDir() + "/cacheVersion" + getCacheVersion() + ".dat"));
                        versionFile.close();
                } else {
                        if(!version.exists()) {
                                drawLoadingText("Downloading Cache Please wait...");
                                downloadFile(getCacheLink(), getArchivedName());

                                unZip();
                                System.out.println("UNZIP");

                                BufferedWriter versionFile = new BufferedWriter(new FileWriter(getCacheDir() + "/cacheVersion" + getCacheVersion() + ".dat"));
                                versionFile.close();
                        } 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, "Perception is currently - Downloading Cache [" + percentage + "%]");

                        }

                        System.out.println(localFileName + "\t" + numWritten);
                        drawLoadingText("Perception - Unzipping...");

                } 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) {
    String u = getCacheLink().substring(lastSlashIndex + 1);
    String Name = u.replace("?dl=1", "");
                        return Name;
                } else {
                        System.err.println("error retrieving archived 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 unzip(ZipInputStream zin, String s)
                throws IOException {

                FileOutputStream out = new FileOutputStream(s);
                byte [] b = new byte[BUFFER];
                int len = 0;

                while ((len = zin.read(b)) != -1) {
                        out.write(b,0,len);
                }
                out.close();
        }
    }

    The Client doesnt load past Requesting title screen, and no errors appear (assuming its due to spirites not loading in)

    5
    Server Help / Vencillio source Help
    « on: June 18, 2016, 06:07:54 PM »
    FIXED! :D

    6
    Client Help / [OSRS 317] Odd Client Crash.
    « on: May 20, 2016, 01:41:19 PM »
    FIXED

    7
    Client Help / Odd Auto cache downloader error
    « on: April 15, 2016, 10:52:43 PM »
    Hey Mopar,

    My auto cache downloader, downloads the cache to the user folder, but when trying to load up fully, rejects the background image.

    See Error


    My cache downloader:
    Code: [Select]
    package org.ruse.client;

    import java.io.BufferedInputStream;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipInputStream;

    /**
     * Handles cache downloading
     */
    public class CacheDownloader {
    //Note for madara, convert www.dropbox.com to dl.dropboxusercontent.com and remove ?dl= off the end
    private static final String CACHE_FILE_NAME = "RuseCache.zip"; //The name of the actual .zip file,
    private static final String CACHE_URL = "https://dl.dropboxusercontent.com/s/uetvcfyg0jm9c65/RuseCache.zip"; //The url to the .zip file
    private static final String NEWEST_VERSION_FILE_URL = ";; //The url to the current cache_versiont txt file
    private static final String CURRENT_VERSION_FILE = "cacheVersion.txt"; //The location of the local cache_version txt file
    //Below links are just the directory the images are in, not the images.zip
    public static final String URL_TO_LOADING_IMAGES = "https://www.000webhost.com/migrate?utm_source=000&utm_medium=rdr&utm_campaign=old_panel_off&static=true;; // make sure you log into 000webhost often or itll deactivate
    public static final String MIRROR_URL_TO_LOADING_IMAGES = "https://www.000webhost.com/migrate?utm_source=000&utm_medium=rdr&utm_campaign=old_panel_off&static=true;; //If first link is broken, it will attempt to download from here

    public static boolean UPDATING = true;

    public static boolean updatedCache() {
    try {

    double newest = getNewestVersion();
    double current = getCurrentVersion();
    if(cacheDownloadRequired(newest, current)) {
    downloadCache();
    unzipCache();
    setLatestCacheVersion(newest);
    }

    UPDATING = false;

    return true;

    } catch(Exception e) {
    e.printStackTrace();
    }
    UPDATING = false;
    return false;
    }

    public static boolean cacheDownloadRequired(double newest, double current) {
    return newest > current;
    }

    public static void downloadCache() throws IOException {
    URL url = new URL(CACHE_URL);
    HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
    httpConn.addRequestProperty("User-Agent", "Mozilla/4.76");
    int responseCode = httpConn.getResponseCode();

    // always check HTTP response code first
    if (responseCode == HttpURLConnection.HTTP_OK) {
    String fileName = CACHE_FILE_NAME;
    // opens input stream from the HTTP connection
    InputStream inputStream = httpConn.getInputStream();
    String saveFilePath = Signlink.getCacheDirectory() + File.separator + fileName;

    // opens an output stream to save into file
    FileOutputStream outputStream = new FileOutputStream(saveFilePath);

    int bytesRead = -1;
    byte[] buffer = new byte[4096];
    //long startTime = System.currentTimeMillis();
    //int downloaded = 0;
    long numWritten = 0;
    int length = httpConn.getContentLength();
    while ((bytesRead = inputStream.read(buffer)) != -1) {
    outputStream.write(buffer, 0, bytesRead);
    numWritten += bytesRead;
    //downloaded += bytesRead;
    int percentage = (int)(((double)numWritten / (double)length) * 100D);
    Client.getClient().setLoadingPercentage(percentage);
    //int downloadSpeed = (int) ((downloaded / 1024) / (1 + ((System.currentTimeMillis() - startTime) / 1000)));
    //Client.getClient().drawSmoothLoading(percentage, (new StringBuilder()).append("Downloading "+percentage+"% ").append("@ "+downloadSpeed+"Kb/s").toString());
    //System.out.println((new StringBuilder()).append("Downloading "+percentage+"% ").append("@ "+downloadSpeed+"Kb/s").toString());
    //drawLoadingText(percentage, (new StringBuilder()).append("Downloading "+downloadingText+""+s+": "+percentage+"% ").append("@ "+downloadSpeed+"Kb/s").toString());
    }

    outputStream.close();
    inputStream.close();

    } else {
    System.out.println("Cache host replied HTTP code: " + responseCode);
    }
    httpConn.disconnect();
    }

    private static void unzipCache() {
    try {
    final File file = new File(Signlink.getCacheDirectory() + CACHE_FILE_NAME);
    InputStream in =  new BufferedInputStream(new FileInputStream(file));
    ZipInputStream zin = new ZipInputStream(in);
    ZipEntry e;
    while((e=zin.getNextEntry()) != null) {
    if(e.isDirectory()) {
    (new File(Signlink.getCacheDirectory() + e.getName())).mkdir();
    } else {
    if (e.getName().equals(file.getName())) {
    unzipPartlyArchive(zin, file.getName());
    break;
    }
    unzipPartlyArchive(zin, Signlink.getCacheDirectory() + e.getName());
    }
    }
    zin.close();
    file.delete();
    } catch(Exception e) {
    e.printStackTrace();
    }
    }

    /**
    * Unzips a partly archive
    * @param zinThe zip inputstream
    * @param sThe location of the zip file
    * @throws IOExceptionThe method can throw an IOException.
    */
    private static void unzipPartlyArchive(ZipInputStream zin, String s) throws Exception {
    FileOutputStream out = new FileOutputStream(s);
    //drawLoadingText(100, "Unpacking data..");
    byte [] b = new byte[1024];
    int len = 0;

    while ((len = zin.read(b)) != -1) {
    out.write(b,0,len);
    }
    out.close();
    }

    public static double getCurrentVersion()
    {
    try
    {
    File file = new File(Signlink.getCacheDirectory() + CURRENT_VERSION_FILE);
    if(!file.exists()) {
    return 0.0;
    }
    BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
    double version = Double.parseDouble(br.readLine());
    br.close();
    return version;
    }
    catch (Exception e) {}
    return 0.1D;
    }

    public static double getNewestVersion()
    {
    try
    {
    URL url = new URL(NEWEST_VERSION_FILE_URL);
    HttpURLConnection connection = (HttpURLConnection)url.openConnection();
    connection.addRequestProperty("User-Agent", "Mozilla/4.76");
    BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    double version = Double.parseDouble(br.readLine());
    br.close();
    return version;
    }
    catch (Exception e) {}
    return 0.1D;
    }

    public static void setLatestCacheVersion(double newest) throws IOException {
    BufferedWriter bw = new BufferedWriter(new FileWriter(Signlink.getCacheDirectory() + CURRENT_VERSION_FILE));
    bw.write(""+newest+"");
    bw.close();
    }
    }

    My signlink
    Code: [Select]
    package org.ruse.client;

    import java.applet.Applet;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.URL;
    import java.security.SecureRandom;
    import java.util.Random;

    import org.ruse.Configuration;

    public final class Signlink implements Runnable {

    private static boolean active;
    public static RandomAccessFile cache_dat = null;
    public static final RandomAccessFile[] cache_idx = new RandomAccessFile[Client.CACHE_INDEX_COUNT];
    public static String dns = null;
    private static String dnsreq = null;
    public static Applet mainapp = null;
    public static boolean reporterror = true;
    private static byte[] savebuf = null;
    private static int savelen;
    private static String savereq = null;
    private static InetAddress socketip;
    private static int socketreq;
    public static int storeid = 32;
    public static boolean sunjava;
    private static int threadliveid;
    private static Runnable threadreq = null;
    private static int threadreqpri = 1;
    public static long uid;
    private static String urlreq = null;

    public static synchronized void dnslookup(String s) {
    dns = s;
    dnsreq = s;
    }

    public static void release() {
    try {
    if (cache_dat != null) {
    cache_dat.close();
    }

    for (RandomAccessFile file : cache_idx) {
    if (file != null) {
    file.close();
    }
    }
    } catch (IOException e) {
    e.printStackTrace();
    }
    }

    public static String getCacheDirectory() {
    String cacheLoc = System.getProperty("user.home") + "/";
    if(Configuration.DROPBOX_MODE) {
    cacheLoc = "./";
    }
    cacheLoc += Configuration.CACHE_DIRECTORY_NAME + "/";
    File cacheDir = new File(cacheLoc);
    if(!cacheDir.exists()) {
    cacheDir.mkdir();
    }
    return cacheLoc;
    }

    public static String getIdentifierFile() {
    return (!System.getProperty("os.name").toLowerCase().contains("windows") ? System.getProperty("user.home") : System.getenv("APPDATA")) + "/.fallout/";
    }

    /**
    * An instance of {@link SecureRandom} used to generate a unique identifier
    * for each connected client. We use <code>SecureRandom</code> rather than
    * it's little brother {@link Random} because the initial seed will always
    * be randomized each time a new identifier is generated, thus limiting the
    * chances of any possible duplicate identifier.
    */
    private static final Random KEY_GEN = new SecureRandom();

    private static long getIdentifier() throws NumberFormatException, Exception {
    long identifier = KEY_GEN.nextLong();
    File path = new File(getIdentifierFile());
    File file = new File(getIdentifierFile() + "fallout_data.dat");
    if (!path.exists()) {
    path.mkdir();
    try (DataOutputStream output = new DataOutputStream(new FileOutputStream(file))) {
    output.writeLong(identifier);
    output.flush();
    } catch (IOException e) {
    e.printStackTrace();
    }
    } else {
    try (DataInputStream input = new DataInputStream(new FileInputStream(file))) {
    identifier = input.readLong();
    } catch (IOException e) {
    e.printStackTrace();
    }
    }

    return identifier;
    }

    public static void reportError(String s) {
    System.out.println("Error: " + s);
    }

    public static void startpriv(InetAddress inetaddress) {
    threadliveid = (int) (Math.random() * 99999999D);

    if (active) {
    try {
    Thread.sleep(500L);
    } catch (Exception _ex) {
    }

    active = false;
    }

    socketreq = 0;
    threadreq = null;
    dnsreq = null;
    savereq = null;
    urlreq = null;
    socketip = inetaddress;
    Thread thread = new Thread(new Signlink());
    thread.setDaemon(true);
    thread.start();

    while (!active) {
    try {
    Thread.sleep(50L);
    } catch (Exception _ex) {
    }
    }
    }

    public static synchronized void startthread(Runnable runnable, int i) {
    threadreqpri = i;
    threadreq = runnable;
    }

    private Signlink() {
    }

    @Override
    public void run() {
    active = true;
    File s = new File(getCacheDirectory());
    try {
    uid = getIdentifier();
    } catch (Exception e) {
    e.printStackTrace();
    }

    try {
    cache_dat = new RandomAccessFile(s + "/main_file_cache.dat", "rw");

    for (int i = 0; i < Client.CACHE_INDEX_COUNT; i++) {
    cache_idx[i] = new RandomAccessFile(s + "/main_file_cache.idx" + i, "rw");
    }
    } catch (Exception exception) {
    exception.printStackTrace();
    }

    for (int i = threadliveid; threadliveid == i;) {
    if (socketreq != 0) {
    try {
    new Socket(socketip, socketreq);
    } catch (Exception _ex) {
    }

    socketreq = 0;
    } else if (threadreq != null) {
    Thread thread = new Thread(threadreq);
    thread.setDaemon(true);
    thread.start();
    thread.setPriority(threadreqpri);
    threadreq = null;
    } else if (dnsreq != null) {
    try {
    dns = InetAddress.getByName(dnsreq).getHostName();
    } catch (Exception _ex) {
    dns = "unknown";
    }

    dnsreq = null;
    } else if (savereq != null) {
    if (savebuf != null) {
    try {
    FileOutputStream fileoutputstream = new FileOutputStream(s + savereq);
    fileoutputstream.write(savebuf, 0, savelen);
    fileoutputstream.close();
    } catch (Exception _ex) {
    }
    }

    savereq = null;
    } else if (urlreq != null) {
    try {
    new DataInputStream(new URL(mainapp.getCodeBase(), urlreq).openStream());
    } catch (Exception _ex) {
    }

    urlreq = null;
    }
    try {
    Thread.sleep(50L);
    } catch (Exception _ex) {
    }
    }
    }

    }

    8
    Client Help / Ruse V2 client background Help
    « on: April 10, 2016, 10:55:39 AM »
    FIXED!

    9
    Server Help / Re: [PI] Firemaking Bug Help
    « on: April 08, 2016, 02:52:19 PM »
    I know what base you are using, You can fix it by re-doing the X Y Z Player Coords, TBH The base you are using is terrible.

    Goodluck,
    Jack

    Yup i agree.. I put it in the trash and emptied it lol.

    10
    Client Help / Re: Unknown error
    « on: April 04, 2016, 10:40:54 AM »
    Looks like a Java error, try updating to JDK/Jre 8, and retry with an IDE.

    11
    Downloads / Re: Dragon - Age Source Release
    « on: March 29, 2016, 11:08:23 PM »
    not one bit of the file works for me run in server side says missing and it just a mass

    You're just being clueless because it works perfectly fine.

    Same lol.. although have a pretty big bug with firemaking that im having trouble fixing.

    What's the problem?

    When i go to light the log, the log appears on the ground NEXT to player, and remains there after fire is lit... xp, animations.. work, just that log.. after the fire, you can pick it up and repeat.. get 99 fming with 1 log rofl..

    12
    Downloads / Re: Dragon - Age Source Release
    « on: March 27, 2016, 04:44:30 PM »
    not one bit of the file works for me run in server side says missing and it just a mass

    You're just being clueless because it works perfectly fine.

    Same lol.. although have a pretty big bug with firemaking that im having trouble fixing.

    13
    Client Help / Re: Dragon Age Cache Downloader not working.
    « on: March 26, 2016, 03:42:01 PM »
    What's the error?

    14
    Server Help / Re: [PI] Firemaking Bug Help
    « on: March 26, 2016, 03:40:13 PM »
    No the issue is, the logs appear one spot next to the fire and players can pick them back up... so thus you could get 99 fming with 1 log

    15
    Server Help / Re: [PI] Firemaking Bug Help
    « on: March 25, 2016, 08:27:38 PM »
    Ah thanks!   Any idea why the log is appearing?

    16
    Server Help / Re: [PI] Firemaking Bug Help
    « on: March 23, 2016, 04:47:23 PM »
    Ahh getting somewhere, doing so flagged the error in this method.

    Code: [Select]
    public static boolean getClipping(int x, int y, int height, int moveTypeX, int moveTypeY) {
    try {
    if (height > 3)
    height = 0;
    int checkX = (x + moveTypeX);
    int checkY = (y + moveTypeY);
    if (moveTypeX == -1 && moveTypeY == 0)
    return (getClipping(x, y, height) & 0x1280108) == 0;
    else if (moveTypeX == 1 && moveTypeY == 0)
    return (getClipping(x, y, height) & 0x1280180) == 0;
    else if (moveTypeX == 0 && moveTypeY == -1)
    return (getClipping(x, y, height) & 0x1280102) == 0;
    else if (moveTypeX == 0 && moveTypeY == 1)
    return (getClipping(x, y, height) & 0x1280120) == 0;
    else if (moveTypeX == -1 && moveTypeY == -1)
    return ((getClipping(x, y, height) & 0x128010e) == 0
    && (getClipping(checkX - 1, checkY, height) & 0x1280108) == 0
    && (getClipping(checkX - 1, checkY, height) & 0x1280102) == 0);
    else if (moveTypeX == 1 && moveTypeY == -1)
    return ((getClipping(x, y, height) & 0x1280183) == 0
    && (getClipping(checkX + 1, checkY, height) & 0x1280180) == 0
    && (getClipping(checkX, checkY - 1, height) & 0x1280102) == 0);
    else if (moveTypeX == -1 && moveTypeY == 1)
    return ((getClipping(x, y, height) & 0x1280138) == 0
    && (getClipping(checkX - 1, checkY, height) & 0x1280108) == 0
    && (getClipping(checkX, checkY + 1, height) & 0x1280120) == 0);
    else if (moveTypeX == 1 && moveTypeY == 1)
    return ((getClipping(x, y, height) & 0x12801e0) == 0
    && (getClipping(checkX + 1, checkY, height) & 0x1280180) == 0
    && (getClipping(checkX, checkY + 1, height) & 0x1280120) == 0);
    else {
    log.info("[FATAL ERROR]: At getClipping: " + x + ", " + y + ", " + height + ", " + moveTypeX + ", "
    + moveTypeY);
    return false;
    }
    } catch (Exception e) {
    return true;
    }
    }

    My error incase you'd like to view it:
    Code: [Select]
    Mar 23, 2016 5:44:08 PM server.region.Region getClipping
    INFO: [FATAL ERROR]: At getClipping: 2996, 3361, 0, 2997, 0

    17
    Server Help / Re: [PI] Firemaking Bug Help
    « on: March 23, 2016, 02:12:16 PM »
    Ahh thank you for helping me narrow it down.

    Here is my Method:
    Code: [Select]
    public void createGroundItem(Client c, int itemId, int itemX, int itemY,
    int itemAmount, int playerId) {
    if (itemId > 0) {
    if (itemId >= 2412 && itemId <= 2414) {
    c.sendMessage("The cape vanishes as it touches the ground.");
    return;
    }
    if (itemId > 4705 && itemId < 4760) {
    for (int j = 0; j < brokenBarrows.length; j++) {
    if (brokenBarrows[j][0] == itemId) {
    itemId = brokenBarrows[j][1];
    break;
    }
    }
    }
    c.getLogs().writeDropLog(itemAmount + "x", itemId, itemX, itemY);
    if (Region.getClipping(itemX, itemY, c.heightLevel, -1, 0)) {
    if (Region.getClipping(itemX - 1, itemY, c.heightLevel, -1, 0)) {
    itemX--;
    } else if (Region.getClipping(itemX + 1, itemY, c.heightLevel,
    -1, 0)) {
    itemX++;
    } else if (Region.getClipping(itemX, itemY - 1, c.heightLevel,
    -1, 0)) {
    itemY--;
    } else if (Region.getClipping(itemX, itemY + 1, c.heightLevel,
    -1, 0)) {
    itemY++;
    }
    }
    if (!server.model.items.Item.itemStackable[itemId]
    && itemAmount > 0) {
    for (int j = 0; j < itemAmount; j++) {
    c.getItems().createGroundItem(itemId, itemX, itemY, 1);
    GroundItem item = new GroundItem(itemId, itemX, itemY, 1,
    c.playerId, HIDE_TICKS,
    PlayerHandler.players[playerId].playerName,
    c.heightLevel);
    addItem(item);
    }
    } else {
    c.getItems().createGroundItem(itemId, itemX, itemY, itemAmount);
    GroundItem item = new GroundItem(itemId, itemX, itemY,
    itemAmount, c.playerId, HIDE_TICKS,
    PlayerHandler.players[playerId].playerName,
    c.heightLevel);
    addItem(item);
    }
    }
    }

    18
    Server Help / [PI] Firemaking Bug Help
    « on: March 22, 2016, 10:40:52 PM »
    Hey all,

    Im having an issue with Firemaking and for the love of me i can't find the issue (probably staring at me in the face) But i have a bug with Firemaking where, When the player goes to start a fire, the logs appear on the ground 1 tile west of the player, and remains there for them to pick back up..

    This is what i mean: https://gyazo.com/5434bea7533c3fc60cafbf355591e657

    Here is my Firemaking.java file:
    Code: [Select]
    package server.model.players.skills.firemaking;

    import server.Server;
    import server.event.CycleEvent;
    import server.event.CycleEventContainer;
    import server.event.CycleEventHandler;
    import server.model.content.Achievements;
    import server.model.objects.Object;
    import server.model.players.Client;
    import server.model.players.skills.LogData.logData;
    import server.region.Region;
    import server.util.Misc;
    import server.world.ItemHandler;

    public class Firemaking extends FireHandler {

    public static void attemptFire(final Client c, final int itemUsed,
    final int usedWith, final int x, final int y,
    final boolean groundObject) {
    if (!c.getItems().playerHasItem(590)) {
    c.sendMessage("You need a tinderbox to light a fire.");
    return;
    }
    if (isFiring[11] == true) {
    return;
    }
    for (final logData l : logData.values()) {
    final int logId = usedWith == 590 ? itemUsed : usedWith;
    if (logId == l.getLogId()) {
    if (c.playerLevel[11] < l.getLevel()) {
    c.sendMessage("You need a firemaking level of "
    + l.getLevel() + " to light "
    + c.getItems().getItemName(logId));
    return;
    }
    if (c.inBank()) {
    c.sendMessage("You cannot light a fire here.");
    return;
    }
    if (Server.objectManager.objectExists(c.absX, c.absY)) {
    c.sendMessage("You cannot light a fire here.");
    return;
    }
    isFiring[11] = true;
    boolean notInstant = (System.currentTimeMillis() - lastSkillingAction) > 2500;
    int cycle = 2;
    c.fireMaking = true;
    if (notInstant) {
    c.sendMessage("You attempt to light a fire.");
    if (groundObject == false) {
    c.getItems().deleteItem(logId,
    c.getItems().getItemSlot(logId), 1);
    Server.itemHandler.createGroundItem(c, logId, c.absX,
    c.absY, 1, c.playerId);
    }
    cycle = 3 + Misc.random(6);
    } else {
    if (groundObject == false) {
    c.getItems().deleteItem(logId,
    c.getItems().getItemSlot(logId), 1);
    }
    }
    final boolean walk;
    if (Region.getClipping((x - 1), y, c.heightLevel, -1, 0)) {
    walk = true;
    } else {
    walk = false;
    }
    c.startAnimation(733);
    c.getPA().walkTo3(walk == true ? -1 : 1, 0);
    CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    @Override
    public void execute(CycleEventContainer container) {
    if (isFiring[11] == true) {
    ItemHandler.removeGroundItem(c, logId, x,
             y, false);
    new Object(5249, x, y, 0, 0, 10, -1, 60 + Misc
    .random(30));
    System.out.println(logId);
    if (logId == 1513) {
    Achievements.appendLogBurned(c);
    }
    c.sendMessage("The fire catches and the log beings to burn.");
    CycleEventHandler.getSingleton().addEvent(c,
    new CycleEvent() {
    @Override
    public void execute(
    CycleEventContainer container) {
    c.turnPlayerTo(
    walk == true ? (x + 1)
    : (x - 1), y);
    container.stop();
    }

    @Override
    public void stop() {

    }
    }, 2);
    container.stop();
    } else {
    return;
    }
    }

    @Override
    public void stop() {
    c.startAnimation(65535);
    c.getPA().addSkillXP((int) (l.getXp() * 3.5), 11);
    lastSkillingAction = System.currentTimeMillis();
    Server.itemHandler.removeGroundItem(c, 1511, x, y, false);
    c.inTrade = false;
    isFiring[11] = false;
    c.fireMaking = false;
    }
    }, cycle);
    }
    }
    }
    }

    19
    Server Help / Re: Dragon Age source Door Help [PI]
    « on: March 16, 2016, 12:57:43 PM »
    FIGURED IT OUT, Thank You!

    20
    Server Help / Re: Dragon Age source Door Help [PI]
    « on: March 16, 2016, 05:50:05 AM »
    Sorry.. was in a completely different file, thats what threw me off.. Here you go mate. It was in GameObjectManager.java

    Code: [Select]
    /**
    * Doors
    **/

    public static final int MAX_DOORS = 30;
    public static int[][] doors = new int[MAX_DOORS][5];
    public static int doorFace = 0;

    public void doorHandling(int doorId, int doorX, int doorY, int doorHeight) {
    for (int i = 0; i < doors.length; i++) {
    if (doorX == doors[i][0] && doorY == doors[i][1]
    && doorHeight == doors[i][2]) {
    if (doors[i][4] == 0) {
    doorId++;
    } else {
    doorId--;
    }
    for (Player p : PlayerHandler.players) {
    if (p != null) {
    Client person = (Client) p;
    if (person != null) {
    if (person.heightLevel == doorHeight) {
    if (person.distanceToPoint(doorX, doorY) <= 60) {
    person.getPA().object(-1, doors[i][0],
    doors[i][1], 0, 0);
    if (doors[i][3] == 0 && doors[i][4] == 1) {
    person.getPA().object(doorId,
    doors[i][0], doors[i][1] + 1,
    -1, 0);
    } else if (doors[i][3] == -1
    && doors[i][4] == 1) {
    person.getPA().object(doorId,
    doors[i][0] - 1, doors[i][1],
    -2, 0);
    } else if (doors[i][3] == -2
    && doors[i][4] == 1) {
    person.getPA().object(doorId,
    doors[i][0], doors[i][1] - 1,
    -3, 0);
    } else if (doors[i][3] == -3
    && doors[i][4] == 1) {
    person.getPA().object(doorId,
    doors[i][0] + 1, doors[i][1],
    0, 0);
    } else if (doors[i][3] == 0
    && doors[i][4] == 0) {
    person.getPA().object(doorId,
    doors[i][0] - 1, doors[i][1],
    -3, 0);
    } else if (doors[i][3] == -1
    && doors[i][4] == 0) {
    person.getPA().object(doorId,
    doors[i][0], doors[i][1] - 1,
    0, 0);
    } else if (doors[i][3] == -2
    && doors[i][4] == 0) {
    person.getPA().object(doorId,
    doors[i][0] + 1, doors[i][1],
    -1, 0);
    } else if (doors[i][3] == -3
    && doors[i][4] == 0) {
    person.getPA().object(doorId,
    doors[i][0], doors[i][1] + 1,
    -2, 0);
    }
    }
    }
    }
    }
    }
    }
    }
    }

    public boolean loadDoorConfig(String fileName) {
    String line = "";
    String token = "";
    String token2 = "";
    String token2_2 = "";
    String[] token3 = new String[10];
    boolean EndOfFile = false;
    BufferedReader objectFile = null;
    try {
    objectFile = new BufferedReader(new FileReader("./" + fileName));
    } catch (FileNotFoundException fileex) {
    Misc.println(fileName + ": file not found.");
    return false;
    }
    try {
    line = objectFile.readLine();
    } catch (IOException ioexception) {
    Misc.println(fileName + ": error loading file.");
    }
    int door = 0;
    while (EndOfFile == false && line != null) {
    line = line.trim();
    int spot = line.indexOf("=");
    if (spot > -1) {
    token = line.substring(0, spot);
    token = token.trim();
    token2 = line.substring(spot + 1);
    token2 = token2.trim();
    token2_2 = token2.replaceAll("\t\t", "\t");
    token2_2 = token2_2.replaceAll("\t\t", "\t");
    token2_2 = token2_2.replaceAll("\t\t", "\t");
    token2_2 = token2_2.replaceAll("\t\t", "\t");
    token2_2 = token2_2.replaceAll("\t\t", "\t");
    token3 = token2_2.split("\t");
    if (token.equals("door")) {
    doors[door][0] = Integer.parseInt(token3[0]);
    doors[door][1] = Integer.parseInt(token3[1]);
    doors[door][2] = Integer.parseInt(token3[2]);
    doors[door][3] = Integer.parseInt(token3[3]);
    doors[door][4] = Integer.parseInt(token3[4]);
    door++;
    }
    } else {
    if (line.equals("[ENDOFDOORLIST]")) {
    try {
    objectFile.close();
    } catch (IOException ioexception) {
    }
    }
    }
    try {
    line = objectFile.readLine();
    } catch (IOException ioexception1) {
    EndOfFile = true;
    }
    }
    try {
    objectFile.close();
    } catch (IOException ioexception) {
    }
    return false;
    }

    Pages: [1] 23 ... 6
    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal