Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • DeathsChaos9::|
      Today at 01:27:54 AM
    • Saltyspade10: Okay I won't be back
      May 24, 2018, 07:12:40 AM
    • [email protected]: im buying an ad banner from graham the owner need to get in contact
      May 23, 2018, 08:57:06 PM
    • [email protected]: any mods on
      May 23, 2018, 08:56:49 PM
    • kepoly: 11 years ago, damn
      May 23, 2018, 01:38:39 PM
    • B50: Sever error what happen
      May 22, 2018, 08:23:40 PM
    • The Soul: 10 years later
      May 21, 2018, 05:23:10 PM
    • The Soul: wow people are still here?
      May 21, 2018, 05:19:27 PM
    • Wilkooo: and apologies to the OG forum guys on behalf of that fudgewit dr house that pretty much killed this entire domain
      May 21, 2018, 04:14:28 PM
    • Wilkooo: shoutout to all those that played back in the beginning, all new people that hang around now seem to be pretty braindead
      May 21, 2018, 04:13:54 PM
    • Wilkooo: born sep 2016 - died whenever pink eggs resigned
      May 21, 2018, 04:11:29 PM
    • Wilkooo: Rip moparscape rsps
      May 21, 2018, 04:11:10 PM
    • puta loca: or what section can i ask this
      May 21, 2018, 05:45:08 AM
    • puta loca: does someoen has platinum ps v2 files?
      May 21, 2018, 05:44:59 AM
    • w azza 3: server down??
      May 21, 2018, 05:07:47 AM
    • charmie: rippppppppppppppppppppppppppppppppppppppppppppppp
      May 20, 2018, 09:03:41 PM
    • Tesco Value: eco reset? :o
      May 20, 2018, 08:54:27 PM
    • Tesco Value: aw is server down? :P
      May 20, 2018, 08:54:03 PM
    • mandmgalaxy: is the game down?
      May 20, 2018, 08:05:07 PM
    • bliss death: i believe 95% of the community disliked this change heavily as it came out of nowhere. and the fact you clear ironmen banks as well. terrible change. disappointed.
      May 20, 2018, 06:08:36 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 184688 times)

    0 Members and 1 Guest are viewing this topic.

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #260 on: May 05, 2009, 09:08:28 PM »
    Because most people who want a webclient already have a site..
    RS2Ad banner

    OfflineAngel Ranqes

    • Member
    • **
    • Posts: 25
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #261 on: May 05, 2009, 09:16:31 PM »
    Ric, what i mean is it doesnt tell me much about what to do once i get to my site and put the code in my html editor, it always says error click here for details. Can you tell me how to fix that?
    RS2Ad banner

    Offlineyerfy55

    • Member
    • **
    • Posts: 28
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #262 on: May 06, 2009, 02:49:13 PM »
    for me it just says applet not found how do i fix it


    Posted on: May 08, 2009, 03:53:06 pm
    wat do we do with the file we jarred and signed
    RS2Ad banner

    Offlinemanmanner

    • Member
    • ****
    • Posts: 541
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #263 on: May 09, 2009, 07:53:13 AM »
    that has nothing to do with my webclient tut.
    but it HAS something to do with this

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #264 on: May 09, 2009, 03:42:00 PM »
    Obviously the client can't find the cache...

    Offlinemanmanner

    • Member
    • ****
    • Posts: 541
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #265 on: May 09, 2009, 09:17:04 PM »
    i added the EXACT cache link

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #266 on: May 10, 2009, 03:10:48 PM »
    i added the EXACT cache link
    Did it download and extract the cache?

    Offlinemanmanner

    • Member
    • ****
    • Posts: 541
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #267 on: May 11, 2009, 02:08:45 AM »
    i added the EXACT cache link
    Did it download and extract the cache?
    i think it extracted but i KNOW it downloaded

    Offlinetobias222

    • Member
    • ****
    • Posts: 816
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #268 on: May 11, 2009, 03:49:54 AM »
    I used this for project Tobex, thanks ric :D
    i added the EXACT cache link
    Did it download and extract the cache?
    i think it extracted but i KNOW it downloaded
    Sometimes the cache only downloads partially, this is not rics fault, its the connection between client and webserver, sometimes when you upload your zip file (especially through ftp), the zip file becomes damaged, and therefore downloads impartially, check your cache folder to see if this is the case, and if it is, I suggest re uploading your cache elsewhere.
    « Last Edit: May 11, 2009, 03:51:57 AM by tobias222 »
    Founder of RS - PS . org

    Offlinemacuser

    • Member
    • **
    • Posts: 30
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #269 on: May 14, 2009, 05:05:43 AM »
    im getting this error,after it downloads the cache.
    java.io.FileNotFoundException: C:\Elite_file_store_32\Elite_file_store_32\code.d
    at (The system cannot find the path specified)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at client.unZipFile(client.java:3362)
            at client.downloadcache(client.java:3326)
            at client.method67(client.java:3398)
            at client.method6(client.java:6856)
            at Applet_Sub1.run(Applet_Sub1.java:47)
            at client.run(client.java:4481)
            at java.lang.Thread.run(Unknown Source)my signlink.java code is
    Code: [Select]
    package sign;

    import java.applet.Applet;
    import java.io.*;
    import java.net.*;
    import javax.sound.midi.*;
    import javax.sound.sampled.*;

    public final class signlink
        implements Runnable
    {

        public static final 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) { }
        }


    enum Position {
    LEFT, RIGHT, NORMAL
    };

    private final int EXTERNAL_BUFFER_SIZE = 524288; // 128Kb
    private Position curPosition;
    public static boolean music = true;
     
        public void run()
        {
            active = true;
            String s = findcachedir();
            uid = getuid(s);
            try
            {
                File file = new File(s + "main_file_cache.dat");
                if(file.exists() && file.length() > 0x3200000L)
                    file.delete();
                cache_dat = new RandomAccessFile(s + "main_file_cache.dat", "rw");
                for(int j = 0; j < 5; j++)
                    cache_idx[j] = new RandomAccessFile(s + "main_file_cache.idx" + j, "rw");
    //cache_idx[4] = new RandomAccessFile("C:\\filll\\aam.dat","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(s + savereq);
                            fileoutputstream.write(savebuf, 0, savelen);
                            fileoutputstream.close();
                        }
                        catch(Exception _ex) { }
                    if(waveplay)
                    {

                        String wave = s + savereq;
                        waveplay = false;




    System.out.println("WAVE "+wave);
    AudioInputStream audioInputStream = null;
    try {
    audioInputStream = AudioSystem.getAudioInputStream(new File(wave/*soundFile*/));
    } catch (UnsupportedAudioFileException e1) {
    e1.printStackTrace();
    return;
    } catch (IOException e1) {
    e1.printStackTrace();
    return;
    }
     
    AudioFormat format = audioInputStream.getFormat();
    SourceDataLine auline = null;
    DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
     
    try {
    auline = (SourceDataLine) AudioSystem.getLine(info);
    auline.open(format);
    } catch (LineUnavailableException e) {
    e.printStackTrace();
    return;
    } catch (Exception e) {
    e.printStackTrace();
    return;
    }
     
    if (auline.isControlSupported(FloatControl.Type.PAN)) {
    FloatControl pan = (FloatControl) auline
    .getControl(FloatControl.Type.PAN);
    if (curPosition == Position.RIGHT)
    pan.setValue(1.0f);
    else if (curPosition == Position.LEFT)
    pan.setValue(-1.0f);
    }
     
    auline.start();
    int nBytesRead = 0;
    byte[] abData = new byte[EXTERNAL_BUFFER_SIZE];
     
    try {
    while (nBytesRead != -1) {
    nBytesRead = audioInputStream.read(abData, 0, abData.length);
    if (nBytesRead >= 0)
    auline.write(abData, 0, nBytesRead);
    }
    } catch (IOException e) {
    e.printStackTrace();
    return;
    } finally {
    auline.drain();
    auline.close();
    }
     

     


                    }
                    if(midiplay)
                    {

                        midi = s + savereq;
                                    try {
                                        //System.out.println("Play MIDI " + midi);
                                        if (musicSr != null)
                                        {
                                            musicSr.stop();
                                            musicSr.close();
                                        }
                                        musicSr = null;
                                        musicS = null;
                                       
                                        File music = new File(midi);
                                        if(music.exists())
                                        {
                                            musicS = MidiSystem.getSequence(music);
                                        }
                                    } catch (Exception ex) {
                                        ex.printStackTrace();
                                    }
                       
                       
                        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 Sequencer musicSr = null;
    Sequence musicS = null;

        private static String findcachedir2()
        {
            return "";
        }

        public static String findcachedirORIG()
        {
            String as[] = {
                "./"
            };
            //String as[] = {
            //    "c:/windows/", "c:/winnt/", "d:/windows/", "d:/winnt/", "e:/windows/", "e:/winnt/", "f:/windows/", "f:/winnt/", "c:/", "~/",
            //    "/tmp/", "", "c:/rscache", "/rscache"
            //};
            if(storeid < 32 || storeid > 34)
                storeid = 32;
            String s = ".file_store_" + storeid;
            for(int i = 0; i < as.length; i++)
                try
                {
                    String s1 = as[i];
                    if(s1.length() > 0)
                    {
                        File file = new File(s1);
                        if(!file.exists())
                            continue;
                    }
                    File file1 = new File(s1 + s);
                    if(file1.exists() || file1.mkdir())
                        return s1 + s + "/";
                }
                catch(Exception _ex) { }
         
            return null;
     
        }



     public static final String findcachedir()
    {
    String s;
    String s1;
    File file;
    s = "C:/Elite_file_store_32/";
    s1 = "";
    file = new File((new StringBuilder()).append(s1).append(s).toString());
    if(file.exists() || file.mkdir())
    {
    return (new StringBuilder()).append(s1).append(s).append("/").toString();
    }
    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[5];
        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 = "";

    }
    am gonna sounds stupid  :confused:here but here i go anyway,

    ok, i cant seem the find my client.java file i search for it (using vista) and all that comes up is server is this the file i need or is it something else any help whould be GREAT

    Offlinetobias222

    • Member
    • ****
    • Posts: 816
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #270 on: May 14, 2009, 01:51:35 PM »
    Try changing: (in client.java)
    C:/Elite_file_store_32/Elite_file_store_32
    to:
    C:/Elite_file_store_32


    Posted on: May 22, 2009, 02:58:44 am
    Very nice and very, very well explained.
    Founder of RS - PS . org

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/03/09
    « Reply #271 on: May 22, 2009, 05:13:29 AM »
    Okay guys, I have finally done the new video lol.
    I am really sorry I kept delaying it but I must say that I do not use my voice sorry.
    I did however add in text parts which your gonna have to pause.

    I am currently still editing it but the video should be on youtube within 1-2 hours.

    Posted on: May 22, 2009, 08:36:48 am
    Video has been released:


    Offlinefreka man

    • First Time Poster
    • *
    • Posts: 1
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/22/09
    « Reply #272 on: May 26, 2009, 02:09:59 AM »
    please help me
    [email protected] (help me pls)
     is comes with:
    client updated,please reload client
    then after some secs :
    unexpected error:retrying in 5sec
    then :
    sory ,an error has occured while Etc....
    T fix try the following(in order):
    try closing all open web etc..
    try using a different game world
    try rebooting ure computer
    try selecting a defferent version of java from the play game menu

    aliterules97

    • Guest
    Re: Ric's Webclient tutorial, Last updated: 5/22/09
    « Reply #273 on: May 26, 2009, 06:57:21 AM »
    Can You Make A 508 WebClient Tutorial Plawx ... THX PLEASE ADD EXTRA EXTRA DETAIL ( CAUSE IM DUMB )

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/22/09
    « Reply #274 on: May 26, 2009, 01:54:02 PM »
    Can You Make A 508 WebClient Tutorial Plawx ... THX PLEASE ADD EXTRA EXTRA DETAIL ( CAUSE IM DUMB )
    I don't work with private servers anymore so i can't upgrade this to work with a 508.
    Someone who works with 508 is gonna have to do it.

    Offlinejohnw1

    • Member
    • **
    • Posts: 75
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/22/09
    « Reply #275 on: May 29, 2009, 08:03:27 AM »
    ric ther seems to be a common error about connection error retrying in etc. Could it just be the source people are using? if so, you said you used ricscape client. i have searched both the forums and google bout 10 times and cant find a download. wud u be able to supply me a link?
    powerscape.servergame.com

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/22/09
    « Reply #276 on: May 29, 2009, 12:23:55 PM »
    This is the download link to my client:
    http://www.gamefront.com/downloads;9975984;/fileinfo.html
    and
    I'm sure it's not the client.

    Offlinelildude783

    • Member
    • ****
    • Posts: 412
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/22/09
    « Reply #277 on: May 30, 2009, 07:06:31 PM »
    umm... for the jar signer? ... umm i cant go on utube... the thing is blocked? and theres no way to bypass it :( (dads a nerd and hates prawns?) ... but ya... maybe... upload the video on tinypic or something? lol...

    -Lildude783   : RSPS Programmer/Animator/Java Expert

    Offlineric914

    • Member
    • ****
    • Posts: 338
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/22/09
    « Reply #278 on: May 30, 2009, 10:26:45 PM »
    I'll upload the video to filefront.
    I'll edit this post when it's done.

    Edit: http://www.gamefront.com/downloads;13830516;/fileinfo.html
    « Last Edit: May 30, 2009, 10:30:31 PM by ric914 »

    Offlinejohnw1

    • Member
    • **
    • Posts: 75
    • Thanks: +0/-0
      • View Profile
    Re: Ric's Webclient tutorial, Last updated: 5/22/09
    « Reply #279 on: May 31, 2009, 03:23:54 AM »
    do you kno wif this works on internet explorer? i tried on that and firefox and both said same, even with your source


    edit: The client works if i just run the .jar file. it extracts and runs, just as soon as i try to put on internet i get the connection error.
    « Last Edit: May 31, 2009, 03:30:23 AM by johnw1 »
    powerscape.servergame.com

     

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