Thread: Simple cache downloader issue.

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 Simple cache downloader issue. 
    Registered Member
    Join Date
    Jul 2013
    Posts
    92
    Thanks given
    1
    Thanks received
    32
    Rep Power
    23
    Yo,

    I don't really know much about clients and especially since mine is quite old, it's probably even more of a headache to work with.
    My cache downloader doesn't seem to work entirely right and i'm pretty sure it's just because i'm doing something wrong. It'll download the cache, but not extract it properly.
    If i extract it manually (and edit the extraction location) it's fine.



    edit:

    an error is that settings.dat is within the extracted cache so if it's unable to find it, i'm clearly missing something here.



    If anyone has 5 or 6 minutes to lend me a hand, i would appreciate it.

    Cheers.
    Reply With Quote  
     

  2. #2  
    Administrator

    Kevy's Avatar
    Join Date
    Jul 2006
    Posts
    1,110
    Thanks given
    75
    Thanks received
    1,513
    Rep Power
    4471
    Start by checking your console, maybe there is some error.
    Thanks, Kevin.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2013
    Posts
    92
    Thanks given
    1
    Thanks received
    32
    Rep Power
    23
    Quote Originally Posted by Kevy View Post
    Start by checking your console, maybe there is some error.
    ok, i walked into that one.
    I should've said there is, but i don't understand it. settings.dat is within the extracted cache so if it's unable to find it (which is what im assuming), then i'm lost.

    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Jul 2018
    Posts
    152
    Thanks given
    37
    Thanks received
    15
    Rep Power
    0
    Quote Originally Posted by NeilG View Post
    ok, i walked into that one.
    I should've said there is, but i don't understand it. settings.dat is within the extracted cache so if it's unable to find it (which is what im assuming), then i'm lost.

    Hi, neil.

    I'd like to help you, maybe posting a bit of the code will help.
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Nov 2017
    Posts
    46
    Thanks given
    46
    Thanks received
    44
    Rep Power
    0
    Quote Originally Posted by NeilG View Post
    ok, i walked into that one.
    I should've said there is, but i don't understand it. settings.dat is within the extracted cache so if it's unable to find it (which is what im assuming), then i'm lost.

    Post the readSettings method, please.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2013
    Posts
    92
    Thanks given
    1
    Thanks received
    32
    Rep Power
    23
    Quote Originally Posted by DevMadara View Post
    Post the readSettings method, please.
    Code:
    public static void readSettings() throws IOException {
    		try {
    		DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(Signlink.findcachedir() + "settings.dat")));
    		rememberMe = in.readInt() == 1 ? true : false;
    		myUsername = in.readUTF();
    		myPassword = in.readUTF();
    		in.close();
    		} catch(Exception e) {	
    			e.printStackTrace();
    		}
    	}
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Nov 2017
    Posts
    46
    Thanks given
    46
    Thanks received
    44
    Rep Power
    0
    Quote Originally Posted by NeilG View Post
    Code:
    public static void readSettings() throws IOException {
    		try {
    		DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(Signlink.findcachedir() + "settings.dat")));
    		rememberMe = in.readInt() == 1 ? true : false;
    		myUsername = in.readUTF();
    		myPassword = in.readUTF();
    		in.close();
    		} catch(Exception e) {	
    			e.printStackTrace();
    		}
    	}
    Hmm, it looks fine. I think your calling that method right before the client finishes unzipping the cache? Please post your Client.java and CacheDownloader class, you can use Pastebin.

    EDIT: Fixed it for him.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jul 2013
    Posts
    92
    Thanks given
    1
    Thanks received
    32
    Rep Power
    23
    Quote Originally Posted by EEAZY View Post
    Hi, neil.

    I'd like to help you, maybe posting a bit of the code will help.
    Let me know what code you require and i shall post it.

    Quote Originally Posted by DevMadara View Post
    Fixed it for him.
    Thanks for the help.

    Although after that, this remains.

    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jun 2019
    Posts
    75
    Thanks given
    26
    Thanks received
    14
    Rep Power
    46
    Quote Originally Posted by NeilG View Post
    Let me know what code you require and i shall post it.



    Thanks for the help.

    Although after that, this remains.

    Post ur startup method from the Client.
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jul 2013
    Posts
    92
    Thanks given
    1
    Thanks received
    32
    Rep Power
    23
    Quote Originally Posted by Zerikoth View Post
    Post ur startup method from the Client.
    Quote Originally Posted by Zerikoth View Post
    Post ur startup method from the Client.
    Code:
    void startUp() {
        	new UpdateCache(this).run();
    		UserLoader.loaduser();
    		UserLoader.finalload();
            drawSmoothLoading(20, "Starting up - This can take a few minutes");
            if (Signlink.cache_dat != null) {
                for (int i = 0; i < 6; i++)
                    decompressors[i] = new Decompressor(Signlink.cache_dat, Signlink.cache_idx[i], i + 1);
            }
            try {
                titleStreamLoader = streamLoaderForName(1, "title screen", "title", expectedCRCs[1], 25);
                smallText = new TextDrawingArea(false, "p11_full", titleStreamLoader);
                XPFONT = new TextDrawingArea(true, "q8_full", titleStreamLoader);
                aTextDrawingArea_1271 = new TextDrawingArea(false, "p12_full", titleStreamLoader);
                chatTextDrawingArea = new TextDrawingArea(false, "b12_full", titleStreamLoader);
                aTextDrawingArea_1273 = new TextDrawingArea(true, "q8_full", titleStreamLoader);
                newSmallFont = new RSFont(false, "p11_full", titleStreamLoader);
                newRegularFont = new RSFont(false, "p12_full", titleStreamLoader);
                newBoldFont = new RSFont(false, "b12_full", titleStreamLoader);
                newFancyFont = new RSFont(true, "q8_full", titleStreamLoader);
                drawLogo();
                loadTitleScreen();
                StreamLoader streamLoader = streamLoaderForName(2, "config", "config", expectedCRCs[2], 30);
                StreamLoader streamLoader_1 = streamLoaderForName(3, "interface", "interface", expectedCRCs[3], 35);
                StreamLoader streamLoader_2 = streamLoaderForName(4, "2d graphics", "media", expectedCRCs[4], 40);
                this.mediaStreamLoader = streamLoader_2;
                StreamLoader streamLoader_3 = streamLoaderForName(6, "textures", "textures", expectedCRCs[6], 45);
                StreamLoader streamLoader_4 = streamLoaderForName(7, "chat system", "wordenc", expectedCRCs[7], 50);
                streamLoaderForName(8, "sound effects", "sounds", expectedCRCs[8], 55);
                byteGroundArray = new byte[4][104][104]; //was 4
                intGroundArray = new int[4][105][105];
                worldController = new WorldController(intGroundArray);
                for (int j = 0; j < 4; j++)
                    aClass11Array1230[j] = new Class11();
                minimapImage = new Sprite(512, 512);
                StreamLoader streamLoader_6 = streamLoaderForName(5, "update list", "versionlist", expectedCRCs[5], 60);
                //drawLoadingText(60, "Connecting to update server");
                drawSmoothLoading(60, "Connecting to update server");
                onDemandFetcher = new OnDemandFetcher();
                onDemandFetcher.start(streamLoader_6, this);
                Class36.animationlist = new Class36[2500][0];
                Model.method459(onDemandFetcher.getModelCount(), onDemandFetcher);
                //drawLoadingText(80, "Unpacking media");
                drawSmoothLoading(80, "Unpacking media");
                loadExtraSprites();
                Sprite[] clanIcons = new Sprite[9];
                for (int index = 0; index < clanIcons.length; index++) {
                    clanIcons[index] = new Sprite("Clan Chat/Icons/" + index);
                }
                for (int i = 0; i <= 20; i++) {
                    modIcons[i] = new Sprite("Player/MODICONS " + i + "");
                }
    			loginBox = new Sprite("login/loginbox");
    			//repackCacheIndex(1);
    			//repackCacheIndex(2);
    			//repackCacheIndex(4);
    			entityBox2 = new Sprite("Entity/BOX 1");
    			background = new Sprite("Login/background");
    			backgroundFix = new Sprite("loginscreen/background");
                for (int i = 0; i < inputSprites.length; i++)
                    inputSprites[i] = new Sprite("Interfaces/Inputfield/SPRITE " + (i + 1));
                File[] file = new File(Signlink.findcachedir() + "/sprites/sprites/").listFiles();
                int size = file.length;
                cacheSprite = new Sprite[size];
                System.out.println("Images Loaded: " + size);
                for (int i = 0; i < size; i++) {
                    cacheSprite[i] = new Sprite("Sprites/" + i);
                }
     
                multiOverlay = new Sprite(streamLoader_2, "overlay_multiway", 0);
                mapBack = new Background(streamLoader_2, "mapback", 0);
                for (int j3 = 0; j3 <= 14; j3++)
                    sideIcons[j3] = new Sprite(streamLoader_2, "sideicons", j3);
                compass = new Sprite(streamLoader_2, "compass", 0);
                try {
                    for (int k3 = 0; k3 < 100; k3++)
                        mapScenes[k3] = new Background(streamLoader_2, "mapscene", k3);
                } catch (Exception _ex) {
                }
                try {
                    for (int l3 = 0; l3 < 100; l3++)
                        mapFunctions[l3] = new Sprite(streamLoader_2, "mapfunction", l3);
                } catch (Exception _ex) {
                }
                try {
                    for (int i4 = 0; i4 < 20; i4++)
                        hitMarks[i4] = new Sprite(streamLoader_2, "hitmarks", i4);
                } catch (Exception _ex) {
                }
                try {
                    for (int h1 = 0; h1 < 6; h1++)
                        headIconsHint[h1] = new Sprite(streamLoader_2, "headicons_hint", h1);
                } catch (Exception _ex) {
                }
                try {
                    for (int j4 = 0; j4 < 8; j4++)
                        headIcons[j4] = new Sprite(streamLoader_2, "headicons_prayer", j4);
                    for (int j45 = 0; j45 < 3; j45++)
                        skullIcons[j45] = new Sprite(streamLoader_2, "headicons_pk", j45);
                    for(int skull = 3; skull < 8; skull++) 
    					bhSkull[skull] = new Sprite("bounty/"+skull+"");//Sprites\bounty
    				
                } catch (Exception _ex) {
                }
                mapFlag = new Sprite(streamLoader_2, "mapmarker", 0);
                mapMarker = new Sprite(streamLoader_2, "mapmarker", 1);
                for (int k4 = 0; k4 < 8; k4++)
                    crosses[k4] = new Sprite(streamLoader_2, "cross", k4);
                mapDotItem = new Sprite(streamLoader_2, "mapdots", 0);
                mapDotNPC = new Sprite(streamLoader_2, "mapdots", 1);
                mapDotPlayer = new Sprite(streamLoader_2, "mapdots", 2);
                mapDotFriend = new Sprite(streamLoader_2, "mapdots", 3);
                mapDotTeam = new Sprite(streamLoader_2, "mapdots", 4);
                mapDotClan = new Sprite(streamLoader_2, "mapdots", 5);
                scrollBar1 = new Sprite(streamLoader_2, "scrollbar", 0);
                scrollBar2 = new Sprite(streamLoader_2, "scrollbar", 1);
                RSFont.unpackImages(modIcons, clanIcons);
                Sprite sprite = new Sprite(streamLoader_2, "screenframe", 0);
                leftFrame = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
                sprite.method346(0, 0);
                sprite = new Sprite(streamLoader_2, "screenframe", 1);
                topFrame = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
                sprite.method346(0, 0);
                int i5 = (int) (Math.random() * 21D) - 10;
                int j5 = (int) (Math.random() * 21D) - 10;
                int k5 = (int) (Math.random() * 21D) - 10;
                int l5 = (int) (Math.random() * 41D) - 20;
                for (int i6 = 0; i6 < 100; i6++) {
                    if (mapFunctions[i6] != null)
                        mapFunctions[i6].method344(i5 + l5, j5 + l5, k5 + l5);
                    if (mapScenes[i6] != null)
                        mapScenes[i6].method360(i5 + l5, j5 + l5, k5 + l5);
                }
                //drawLoadingText(83, "Unpacking textures");
                drawSmoothLoading(83, "Unpacking textures");
                Rasterizer.method368(streamLoader_3);
                Rasterizer.method372(0.80000000000000004D);
                Rasterizer.method367();
                //drawLoadingText(86, "Unpacking config");
                drawSmoothLoading(86, "Unpacking config");
                Animation.unpackConfig(streamLoader);
                ObjectDef.unpackConfig(streamLoader);
                Floor.unpackConfig(streamLoader);
                OverLayFlo317.unpackConfig(streamLoader);
                ItemDef.unpackConfig(streamLoader);
                EntityDef.unpackConfig(streamLoader);
                IdentityKit.unpackConfig(streamLoader);
                SpotAnim.unpackConfig(streamLoader);
                Varp.unpackConfig(streamLoader);
                VarBit.unpackConfig(streamLoader);
                ItemDef.isMembers = isMembers;
                //drawLoadingText(95, "Unpacking interfaces");
                drawSmoothLoading(95, "Unpacking interfaces");
                TextDrawingArea aclass30_sub2_sub1_sub4s[] = { smallText, aTextDrawingArea_1271, chatTextDrawingArea,
                        aTextDrawingArea_1273 };
                RSInterface.unpack(streamLoader_1, aclass30_sub2_sub1_sub4s, streamLoader_2);
                //drawLoadingText(100, "Preparing game engine");
                drawSmoothLoading(100, "Preparing game engine");
                for (int j6 = 0; j6 < 33; j6++) {
                    int k6 = 999;
                    int i7 = 0;
                    for (int k7 = 0; k7 < 34; k7++) {
                        if (mapBack.aByteArray1450[k7 + j6 * mapBack.anInt1452] == 0) {
                            if (k6 == 999)
                                k6 = k7;
                            continue;
                        }
                        if (k6 == 999)
                            continue;
                        i7 = k7;
                        break;
                    }
                    anIntArray968[j6] = k6;
                    anIntArray1057[j6] = i7 - k6;
                }
                for (int l6 = 1; l6 < 153; l6++) {
                    int j7 = 999;
                    int l7 = 0;
                    for (int j8 = 24; j8 < 177; j8++) {
                        if (mapBack.aByteArray1450[j8 + l6 * mapBack.anInt1452] == 0 && (j8 > 34 || l6 > 34)) {
                            if (j7 == 999) {
                                j7 = j8;
                            }
                            continue;
                        }
                        if (j7 == 999) {
                            continue;
                        }
                        l7 = j8;
                        break;
                    }
                    anIntArray1052[l6 - 1] = j7 - 24;
                    anIntArray1229[l6 - 1] = l7 - j7;
                }
                updateGame();
                Censor.loadConfig(streamLoader_4);
                mouseDetection = new MouseDetection(this);
                startRunnable(mouseDetection, 10);
                SceneObject.clientInstance = this;
                ObjectDef.clientInstance = this;
                EntityDef.clientInstance = this;
                return;
            } catch (Exception exception) {
                exception.printStackTrace();
                Signlink.reporterror("loaderror " + aString1049 + " " + anInt1079);
            }
            loadingError = true;
        }
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto-cache downloader issue, help please!
    By EmgScape in forum Help
    Replies: 5
    Last Post: 08-02-2012, 11:37 PM
  2. [SHARD]Cache downloading issue
    By imurdernubs in forum Help
    Replies: 3
    Last Post: 04-20-2012, 12:58 AM
  3. Replies: 2
    Last Post: 03-04-2012, 07:30 AM
  4. [PI] Cache Downloading Issue
    By xxskylarscapexx in forum Help
    Replies: 4
    Last Post: 02-21-2012, 09:02 AM
  5. Simple Cache Downloader/Version checker
    By Richard1992 in forum Tutorials
    Replies: 4
    Last Post: 09-18-2008, 01:26 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •