Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • 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
    • dan v jad: PkOwnage! 2 Worlds! Come join us!  [link]  Join us on Discord! [link]  Download Mirrors: [link]
      July 11, 2020, 10:50:02 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade [link]
      July 09, 2020, 12:09:03 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade [link]
      July 09, 2020, 12:08:59 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade [link]
      July 09, 2020, 12:08:51 AM
    • demon dylan: anyone know moparscape call back link?
      July 08, 2020, 07:02:51 PM
    • ragnoroker: Brand new server! Less than 1 week old! Nightmare/Raids 1/2/Hydra/Pk Modes/Exp modes/ Unique  Join today - [link]
      July 04, 2020, 06:42:38 PM

    Poll

    Based on your experience, How difficult was this tutorial?

    Easy
    295 (20.2%)
    Some parts are easy, Some are hard
    605 (41.5%)
    Hard
    558 (38.3%)

    Total Members Voted: 1458

    Author Topic: Ric's Webclient Tutorial  (Read 232980 times)

    0 Members and 2 Guests are viewing this topic.

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Ric's Webclient Tutorial
    « on: January 02, 2009, 10:17:33 PM »
    Please make sure to read everything and if you have a problem look at the FAQ.
    This is a basic webclient tutorial for 317 clients.

    Last Updated: *Check the Revision History*
    Difficulty: Medium (Based on the poll above)
    Purpose: To turn your 317 client into a webclient for your rsps.
    Browser's Tested on: Google Chrome, Internet Explorer, Mozilla Firefox, Opera.
    Client's Tested on: Should work on all 317 clients
    Classes Modified: Signlink.java, Client.java, Class30_Sub2_Sub1_Sub1.java
    Table of Contents:
    Quote
    Section 1 - Updates/Requirements
     1.1 - Revision History
     1.2 - Requirements
     1.3 - Files Needed
    Section 2 - Tutorial
     2.1 - Step 1 - Signlink.java
     2.2 - Step 2 - Client.java
     2.3 - Step 3 - Class30_Sub2_Sub1_Sub1.java(Sprites)
     2.4 - Jarring and Signing
     2.5 - Webclient Web Page
     2.6 - End of tutorial details
    Section 3 - Extra
     3.1 - Frequently Asked Questions
     3.2 - Credits
    --------------------------------------------------------------------------------------------------------------

    Section 1 - Updates/Requirements

    1.1 - Revision History:
    Code: [Select]
    1/2/09 - Downloading cache percentage will appear in the client(no more jframe)
    1/3/09 - Downloads cache faster.
    4/1/09 - Tutorial re-written.
    4/2/09 - Uploaded "Cache + Sprites Zipping" video to youtube.
    4/25/09 - Tutorial updated.
    4/28/09 - Step 2.6 was updated.
    5/3/09 - Step 2.3 was updated.
    8/22/09 - New FAQ question and updated browser's tested on list.
    10/16/09 - Tutorial updated.

    1.2 - Requirements
    1. Regular Web host or VPS(Virtual Private Server) or Dedi(Dedicated Server) - For the webclient page, client.jar(Should be around 600kb), cache.zip(usually is around 16mb)
    2. Jar maker - Download below
    3. A 317 client
    4. Patience and Time

    1.3 - Files to download:
    Jar Maker: http://www.goldenstudios.or.id/products/utilities/jarmaker/JARMaker.zip

    Section 2 - Tutorial:
    A video on what to do. I know it's not very well made but it might help in some way.
    Webclient tutorial video:
    You can subscribe if you want. Maybe someday I will decide to re-make a better explained webclient tutorial video.
    --------------------------------------------------------------------------------------------------------------

    2.1 - Step 1 - Signlink.java
    Open up Signlink.java and search for findcachedir(). In that method you will see something like this:
    Quote
           s = "";
            s1 = "./cache/";
    highlight those 2 lines and replace it with the following:
    Quote
           s = "C:/.yourclientname_file_store_32/";
            s1 = "";

    replace yourclientname with the name of your client - no spaces. For example: C:/.ricscape_file_store_32/
    Save signlink.java and close it.

    --------------------------------------------------------------------------------------------------------------

    2.2 - Step 2 - Client.java
    Open up client.java and search for Class44 method67 and replace it with this one:
     
    Code: [Select]
    private Class44 method67(int i, String s, String s1, int j, byte byte0, int k)
     {
       byte abyte0[] = null;
       int l = 5;
       try
       {
         if(aClass14Array970[0] != null)
         {
           abyte0 = aClass14Array970[0].method233(true, i);
         }
         if(abyte0 == null)
         {
    method13(15, (byte)4, "Downloading Cache");
    downloadcache("YOUR CACHE URL LINK HERE", "cache.zip", "", "cache");      
    }
    if(aClass14Array970[0] != null)
         {
           abyte0 = aClass14Array970[0].method233(true, i);
         }
       }
       catch(Exception exception) { }
       if(abyte0 != null);
       if(abyte0 != null)
       {
         Class44 class44 = new Class44(44820, abyte0);
         return class44;
       }
       int i1 = 0;
       do
       {
         if(abyte0 != null)
         {
           break;
         }
         String s2 = "Unknown error";
         method13(k, (byte)4, "Client updated - please reload client");
         //method13(k, (byte)4, (new StringBuilder()).append("Requesting ").append(s).toString());
         Object obj = null;
         try
         {
           int j1 = 0;
           DataInputStream datainputstream = method132((new StringBuilder()).append(s1).append(j).toString());
           byte abyte1[] = new byte[6];
           datainputstream.readFully(abyte1, 0, 6);
           Class30_Sub2_Sub2 class30_sub2_sub2 = new Class30_Sub2_Sub2(abyte1, 891);
           class30_sub2_sub2.anInt1406 = 3;
           int l1 = class30_sub2_sub2.method412() + 6;
           int i2 = 6;
           abyte0 = new byte[l1];
           for(int j2 = 0; j2 < 6; j2++)
           {
             abyte0[j2] = abyte1[j2];
           }

           while(i2 < l1)
           {
             int k2 = l1 - i2;
             if(k2 > 1000)
             {
               k2 = 1000;
             }
             int l2 = datainputstream.read(abyte0, i2, k2);
             if(l2 < 0)
             {
               s2 = (new StringBuilder()).append("Length error: ").append(i2).append("/").append(l1).toString();
               throw new IOException("EOF");
             }
             i2 += l2;
             int i3 = (i2 * 100) / l1;
             if(i3 != j1)
             {
               method13(k, (byte)4, (new StringBuilder()).append("Loading ").append(s).append(" - ").append(i3).append("%").toString());
             }
             j1 = i3;
           }
           datainputstream.close();
           try
           {
             if(aClass14Array970[0] != null)
             {
               aClass14Array970[0].method234(abyte0.length, abyte0, (byte)2, i);
             }
           }
           catch(Exception exception3)
           {
             aClass14Array970[0] = null;
           }
         }
         catch(IOException ioexception)
         {
           if(s2.equals("Unknown error"))
           {
             s2 = "Connection error";
           }
           abyte0 = null;
         }
         catch(NullPointerException nullpointerexception)
         {
           s2 = "Null error";
           abyte0 = null;
           if(!signlink.reporterror)
           {
             return null;
           }
         }
         catch(ArrayIndexOutOfBoundsException arrayindexoutofboundsexception)
         {
           s2 = "Bounds error";
           abyte0 = null;
           if(!signlink.reporterror)
           {
             return null;
           }
         }
         catch(Exception exception1)
         {
           s2 = "Unexpected error";
           abyte0 = null;
           if(!signlink.reporterror)
           {
             return null;
           }
         }
         if(abyte0 == null)
         {
           for(int k1 = l; k1 > 0; k1--)
           {
             if(i1 >= 3)
             {
               method13(k, (byte)4, "Game updated - please reload page");
               k1 = 10;
             } else
             {
               method13(k, (byte)4, (new StringBuilder()).append(s2).append(" - Retrying in ").append(k1).toString());
             }
             try
             {
               Thread.sleep(1000L);
             }
             catch(Exception exception2) { }
           }

           l *= 2;
           if(l > 60)
           {
             l = 60;
           }
           aBoolean872 = !aBoolean872;
         }
       } while(true);
       Class44 class44_1 = new Class44(44820, abyte0);
       if(byte0 != -41)
       {
         throw new NullPointerException();
       } else
       {
         return class44_1;
       }
      }
     

    Replace the following:
    YOUR CACHE URL LINK HERE
    cache.zip
    which is in this line:
    downloadcache("YOUR CACHE URL LINK HERE", "cache.zip", "", "cache");
    You only replace what's in the first 2 quotes.

    The first quote is your link.
    Your cache link must end with .zip
    For example:


    The second quote is the extraction, so it would like this:
    "cache.zip"
    Unless your zip file has a different name. If it does then you would put:
    "zipfilename.zip"

    This is the most important method and without it your webclient will not work.
    On top of Class44 method67 put this:
    Code: [Select]
       public String name;
        public String dir;

    public void downloadcache(String url, String name1, String dir1, String type)
        {
            dir = dir1;
            name = name1;
            try
            {
                URLConnection connection = (new URL(url)).openConnection();
                String f[] = url.split("/");
                File file = new File(f[f.length - 1]);
                int length = connection.getContentLength();
                InputStream instream = connection.getInputStream();
                try{new File(signlink.findcachedir()+dir).mkdir();}catch(Exception e){}
                FileOutputStream outstream = new FileOutputStream(signlink.findcachedir()+dir+file);
                int size = 0;
                int copy;
                byte[] buffer = new byte[4096];
                while((copy = instream.read(buffer)) != -1)
                {
                    outstream.write(buffer, 0, copy);
                    size+= copy;
                    int percentage = (int)(((double)size / (double)length) * 100D);
                    method13(percentage, (byte)4, "Downloading Cache - "+percentage+"%");
                }
                if(length != size)
                {
                    instream.close();
                    outstream.close();
                } else
                {
                    method13(5, (byte)4, "Unpacking files...");
                    instream.close();
                    outstream.close();
                    unZipFile();
                    deleteFile();
                    method13(10, (byte)4, "Unpacking was complete");
                }
            }
            catch(Exception e)
            {
                System.err.println("Error connecting to server.");
                e.printStackTrace();
            }
        }
        public void writeStream(InputStream In, OutputStream Out) throws IOException
        {
            byte Buffer[] = new byte[4096];
            int Len;
            while((Len = In.read(Buffer)) >= 0)
            {
                Out.write(Buffer, 0, Len);
            }
            In.close();
            Out.close();
        }

        public void unZipFile()
        {
            try
            {
                ZipFile ZipFile = new ZipFile(signlink.findcachedir()+dir+name);
                for(Enumeration Entries = ZipFile.entries(); Entries.hasMoreElements();)
                {
                    ZipEntry Entry = (ZipEntry)Entries.nextElement();
                    if(Entry.isDirectory())
                    {
                        (new File(signlink.findcachedir()+dir+Entry.getName())).mkdir();
                    } else
                    {
                        writeStream(ZipFile.getInputStream(Entry), new BufferedOutputStream(new FileOutputStream(signlink.findcachedir()+dir+Entry.getName())));
                    }
                }
                ZipFile.close();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
        }

        public void deleteFile()
        {
            try
            {
                File file = new File(signlink.findcachedir()+dir+name);
                file.delete();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
        }

    Once you have added those method's in your client.java, scroll all the way up still you see import's then add the following under the rest of them.
    Code: [Select]
    import java.awt.Dimension;
    import java.net.URL;
    import java.net.URLConnection;
    import javax.swing.*;
    import java.util.Enumeration;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;

    --------------------------------------------------------------------------------------------------------------

    2.3 - Step 3 - Class30_Sub2_Sub1_Sub1.java(Sprites)
    Now for the sprite part. Which most people don't do right. I don't know why. =\
    Open up Class30_Sub2_Sub1_Sub1.java and replace all:
    Quote
    ./Sprites/
    with this
    Quote
    C:/.yourclientname_file_store_32/Sprites/
    Like this:

    Do the same for the background

    Once you have changed the location your client reads the sprites from, save the file and close it.

    --------------------------------------------------------------------------------------------------------------

    2.4 - Jarring and Signing
    Before we start make sure you have downloaded the jar maker(located above).
    Note: When you jar your client the cache and sprites folder can not be in the client folder. Move or delete them.
    If you have already downloaded the jar maker then run the jar maker and watch the following video.

    Jarring and signing video:

    Once you have jarred and signed the client, Put the cache files(Everything inside the cache folder) and sprite "folder" in a zip file.

    To understand what I mean watch this video:


    --------------------------------------------------------------------------------------------------------------

    2.5 - Webclient Web Page
    Create a new html or php page with the following (This is an example of how it should be):
    Quote
    <HTML>
    <HEAD>
    <TITLE>Your Webclient</TITLE>
    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    </HEAD>

    <BODY>

    <applet name="yourclientname" width="765" height="503" archive="client.jar" code="client.class">
    <param name="java_arguments" value="-Xmx1024m">
    </applet>

    </BODY>
    </HTML>
    Replace yourclientname with the name of your client.

    --------------------------------------------------------------------------------------------------------------

    2.6 - End of tutorial details
    This is what your webclient should do if you did this tutorial right:


    --------------------------------------------------------------------------------------------------------------

    Section 3 - Extra
    3.1 - Frequently Asked Questions
    Question: What's a good free file host for my cache.zip?
    Answer: You can use any host that allows direct linking. I personally use this site:
    http://www.fileden.com/

    Question: Ric, it's too hard. Can you make it for me?
    Answer: No, I don't do this for people anymore. You gotta learn how to make a webclient for when you update your client.

    Question: I get a blank page with a red X on it. What do I do?
    Answer: Right click and press Java Console and read the error.

    Question: The java console says it cannot find client.class, What should I do?
    Answer: I recommend deleting all the class files and recompile your client.

    Question: I get the 1,2,3,4,5 error. What do I do?
    Answer: Something is missing, corrupted or done wrong.

    Question: I get a java heap space error, What do I do?
    Answer: Make sure you have <param name="java_arguments" value="-Xmx1024m"> in your applet code.
    --------------------------------------------------------------------------------------------------------------

    3.2 - Credit:
    Ric914 - Writing/Releasing this tutorial.
    Moparisthebest - I used some stuff from his downloader
    « Last Edit: January 11, 2010, 07:13:38 AM by ric914 »
    Runescape Gambling

    Offlinem.dog311

    • Member
    • ****
    • Posts: 4,300
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #1 on: January 02, 2009, 10:29:32 PM »
    Hey you stole my image :(

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #2 on: January 02, 2009, 10:30:13 PM »
    Hey you stole my image :(
    Didnt know that was yours but ill remove it.
    « Last Edit: January 02, 2009, 10:32:19 PM by ric914 »

    Offlinem.dog311

    • Member
    • ****
    • Posts: 4,300
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #3 on: January 02, 2009, 10:32:35 PM »
    Lol I don't care if you use it.  I'm surprised that came up in Google.

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #4 on: January 02, 2009, 10:33:11 PM »
    Lol I don't care if you use it.  I'm surprised that came up in Google.
    lol ill re-add and give you credit for it.

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #5 on: January 03, 2009, 02:06:33 AM »
    They can use whatever host they want, I'm just giving out a random one.

    but in order for webclient to work you need a direct link.
    « Last Edit: January 03, 2009, 03:29:18 AM by ric914 »

    OfflineZymus

    • Member
    • ****
    • *
    • Posts: 7,266
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #6 on: January 03, 2009, 03:14:20 AM »
    Thanks, i've been looking for a good webclient tutorial, but...

    Um, i've got one small problem, and a side note.

    With the Updater.class you provided, it doesn't have the get method you have in the class44 method67 code. Did you mean to replace it with "downloadcache"?

    And the problem i have is, the Percent done, when downloading the cache, i get a negative % done.

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #7 on: January 03, 2009, 03:19:47 AM »
    Thanks, i've been looking for a good webclient tutorial, but...

    Um, i've got one small problem, and a side note.

    With the Updater.class you provided, it doesn't have the get method you have in the class44 method67 code. Did you mean to replace it with "downloadcache"?

    And the problem i have is, the Percent done, when downloading the cache, i get a negative % done.
    oops forgot to change that thanks for telling me

    Edit: Fixed

    OfflineZymus

    • Member
    • ****
    • *
    • Posts: 7,266
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #8 on: January 03, 2009, 03:46:36 AM »
    Ok, any idea why im getting a negative percent done?

    Offlineadamp40

    • Member
    • ****
    • Posts: 707
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #9 on: January 03, 2009, 05:18:00 AM »
    File Den compared to MediaFire is like comparing Mankind to an ant. Mediafire is better. It has Unlimited bandwidth,(Free) 100 mb max size per file (free) Free VIRUS SCAN (Free) No wait time for downloads(MegaUpload/Rapidshare doesn't do this free) This is off topic, but i'm tired of people advertising/uploading horrible filehosting sites like Megaupload, Rapidshare , Megashare, Uppit, FileDen, and other horrible file hosting sites.

    God you dont have a brain!

    You have to have a "Direct Link" You cant host your cache.zip on mediafire because it just wont work;
    So you failed!

    Personally FileDen is the BEST free direct hoster but for a hosting cache might be unsuitable becuase it only has 5gb bandwidth becuase

    OfflineZymus

    • Member
    • ****
    • *
    • Posts: 7,266
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #10 on: January 03, 2009, 01:59:17 PM »
    Ok, i got it working. But is it supposed to be incredibly slow? I'm downloading my cache at about 2 kb/sec.

    Posted on: January 03, 2009, 02:26:34 pm
    I have an updated code that downloads it super fast:

    Code: [Select]
    public void downloadcache(String downloadURL, String name1, String dir1, String type)
        {
            dir = dir1;
            name = name1;
            Updater Updater = new Updater();
            try
            {
                OutputStream outstream = null;
                URLConnection conn = null;
                InputStream  instream = null;
                URL url = new URL(downloadURL);
                File CacheDir = new File(signlink.findcachedir());
               
                outstream = new BufferedOutputStream(new FileOutputStream(CacheDir+ ".zip"));
                Updater.name = (CacheDir+ ".zip");
                conn = url.openConnection();
                int length = conn.getContentLength();
                instream = conn.getInputStream();
                byte[] buffer = new byte[4096];
                int numRead;
                long numWritten = 0;
                while ((numRead = instream.read(buffer)) != -1) {
                        outstream.write(buffer, 0, numRead);
                        numWritten += numRead;
                }
               
                method13(5, (byte)4, "Unpacking files...");
                instream.close();
                outstream.close();
                Updater.unZipFile();
                Updater.deleteFile();
                method13(10, (byte)4, "Unpacking was complete");
            }
            catch(Exception e)
            {
                System.err.println("Error connecting to server.");
                e.printStackTrace();
            }
        }

    That did my entire cache in under 3 seconds

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #11 on: January 03, 2009, 07:10:16 PM »
    thanks but no. I can do it myself.

    Fixed the downloader. It will now download faster, Thanks Taharok for giving me some help on msn.
    but i have a problem with the extracting part but i will fix it and re post tut soon.

    Edit: Tut fixed.
    « Last Edit: January 05, 2009, 08:53:54 PM by ric914 »

    OfflineZymus

    • Member
    • ****
    • *
    • Posts: 7,266
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client
    « Reply #12 on: January 03, 2009, 08:04:24 PM »
    Ya, i had a problem with the extracting part. for some reason, it didn't like extracting subdirectories of the cache folder. Like in the somename_cache_32 ->runescape(directory), it would just spazz at that point. But, i managed to get it working ^_^. Thanks for the tut ric.

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client[Fixed]
    « Reply #13 on: January 03, 2009, 08:24:12 PM »
    Okay everyone i have fixed the problem

    Now it should be working fine. It downloads cache fast, extracts the cache and client starts.

    OfflineGoth Wolf

    • Member
    • ****
    • Posts: 385
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client[Fixed]
    « Reply #14 on: January 04, 2009, 09:07:31 AM »
    http://fileden.com - it's a free file host so you can upload your cache.zip there.
    File Den compared to MediaFire is like comparing Mankind to an ant. Mediafire is better. It has Unlimited bandwidth,(Free) 100 mb max size per file (free) Free VIRUS SCAN (Free) No wait time for downloads(MegaUpload/Rapidshare doesn't do this free) This is off topic, but i'm tired of people advertising/uploading horrible filehosting sites like Megaupload, Rapidshare , Megashare, Uppit, FileDen, and other horrible file hosting sites.
    Mediafire doesn't support direct downloading you still have to go to there site and do the click here to download FileDen does and has a reasonably good download/upload for me also MediaFire's Virus Scanner won't detect viruses in .rar files for some reason my friend has uploaded hacks, trojans, keylogs in a rar file and it completely missed it -.-
    Bored

    Offlineweeds

    • Member
    • **
    • Posts: 98
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client[Fixed]
    « Reply #15 on: January 05, 2009, 01:00:57 PM »
    im gona try this with opera web browser it seems to be good i hope it works just quick question making a webcleint does it make the server 24/7 or have you got to keep comp on all time lol cos im trying to get a way without paying cas to get 24/7 server i already got the server just need the hours =)

    Posted on: January 05, 2009, 03:25:55 pm
    aww i just get one error im upto the part just before jaring it where u donload the updater i did that and it says
    cleint.java3379: cannot find symbol
    symbol   : method downloadingcache(java.lang.string,java.lang.string.java.lang.string.java.lang.string)
    location:class cleint
    downloadingcache(";, ":
    cache.zip", "", "cache");
    please help me soz bout not having the box is cos i was on quick reply im also a newb

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client[Fixed]
    « Reply #16 on: January 05, 2009, 04:43:36 PM »
    you need to add that method look in the tut for it.

    OfflineZymus

    • Member
    • ****
    • *
    • Posts: 7,266
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client[Fixed]
    « Reply #17 on: January 05, 2009, 08:51:50 PM »
    Ok, i get this webclient error when i try to load it in FireFox:

    Quote
    network: Connecting _cache_32.zip with proxy=DIRECT
    network: Connecting _cache_32.zip with cookie "phpbb3_mc3zx_k=; phpbb3_mc3zx_sid=fc4a411a517c8679404c689f8d09ee4f; phpbb3_mc3zx_u=2; style_cookie=null"
    network: Connecting socket://localhost:43595 with proxy=DIRECT
    network: Connecting socket://localhost:43595 with proxy=DIRECT
    network: Connecting socket://localhost:43595 with proxy=DIRECT

    What's causing it?

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client[Fixed]
    « Reply #18 on: January 05, 2009, 08:55:10 PM »
    that has nothing to do with my webclient tut.

    OfflineZymus

    • Member
    • ****
    • *
    • Posts: 7,266
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial - Shows % in client[Fixed]
    « Reply #19 on: January 05, 2009, 09:01:07 PM »
    No, i followed the tut, and i get that error in FireFox, The browser you tested it in. I pulled the basic 317 deob, added the 377 cache, and it works perfectly in jar form. It's only when i try to make it start from the web, that it causes problems.

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal