Thread: [Cache Packing] All 508 maps! NO BUGS!

Page 1 of 61 1231151 ... LastLast
Results 1 to 10 of 605
  1. #1 [Cache Packing] All 508 maps! NO BUGS! 
    Registered Member

    Join Date
    Dec 2007
    Age
    31
    Posts
    1,953
    Thanks given
    114
    Thanks received
    608
    Rep Power
    1094
    This snippet will eliminate preloading of maps, fix the object map bug on login, and allow more than 1390 map files to be loaded from the cache.

    If your cache is over 65mb use this. http://www.rune-server.org/runescape...-modified.html

    PART 1:

    Step 1: Download UppIT - Free File Sharing - map_index.Dat

    Step 2: Open up Tom's Cache Suite and replace the map_index file with the one you just downloaded.

    PATH: View/Edit Jagex Archives > versionlist.jag > replace map_index


    PART 2:

    Step 1: Open up OnDemandFetcher and replace your method start( with this:

    Code:
    public int mapAmount = 0;
    
        public void start(StreamLoader streamLoader, client client1)
        {
            byte[] abyte2 = streamLoader.getDataForName("map_index");
            Stream stream2 = new Stream(abyte2);
            int j1 = abyte2.length / 6;
            mapIndices1 = new int[j1];
            mapIndices2 = new int[j1];
            mapIndices3 = new int[j1];
            for(int i2 = 0; i2 < j1; i2++)
            {
                mapIndices1[i2] = stream2.readUnsignedWord();
                mapIndices2[i2] = stream2.readUnsignedWord();
                mapIndices3[i2] = stream2.readUnsignedWord();
    mapAmount++;
            }
    	System.out.println("Map Amount: "+mapAmount+"");
            abyte2 = streamLoader.getDataForName("midi_index");
            stream2 = new Stream(abyte2);
            j1 = abyte2.length;
            anIntArray1348 = new int[j1];
            for(int k2 = 0; k2 < j1; k2++)
                anIntArray1348[k2] = stream2.readUnsignedByte();
    
            clientInstance = client1;
            running = true;
            clientInstance.startRunnable(this, 2);
        }
    and close.

    Step 2: Download UppIT - Free File Sharing - Maps.rar

    Step 3: Go into client.jerba and add these methods.
    Code:
    	public void maps() {
    		for(int MapIndex = 0; MapIndex < 3536; MapIndex++) {
    			byte[] abyte0 = GetMap(MapIndex);
    			if(abyte0 != null && abyte0.length > 0) {
    				decompressors[4].method234(abyte0.length, abyte0, MapIndex);
    			}
    		}
    	}
    	
    		public byte[] GetMap(int Index) {
    		try {
    			File Map = new File("./Maps/"+Index+".gz");
    			byte[] aByte = new byte[(int)Map.length()];
    			FileInputStream Fis = new FileInputStream(Map);
    				Fis.read(aByte);
    				System.out.println(""+Index+" aByte = ["+aByte+"]!");
    				Fis.close();
    			return aByte;
    		} catch(Exception e) {
    			return null;
    		}
    	}
    
    
    
    	public static final byte[] ReadFile(String s, boolean antiLeech) {
    		try {
    			byte abyte0[];
    			File file = new File(s);
    			int i = (int)file.length();
    			abyte0 = new byte[i];
    			DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new FileInputStream(s)));
    			datainputstream.readFully(abyte0, 0, i);
    			datainputstream.close();
    			return abyte0;
    		} catch(Exception e) {
    			System.out.println((new StringBuilder()).append("Read Error: ").append(s).toString());
    			return null;
    		}
    	}
    Step 4: Add

    Code:
    maps();
    into your start up method. Save, and compile, then run the client(make sure the maps are in the correct spot. Once packed, removed the "maps();" from the startup method. You are now done, you have all the maps cache packed and no bugs what so ever with objects not loading on login . Enjoy and rep++

    Freezing Fix
    - This fixing the freezing for certain area's such as Armadyl Chamber.

    Go to your OnDemandFetcher.java and replace this method562 with this:
    Code:
        public int method562(int i, int k, int l)
        {
            int i1 = (l << 8) + k;
    	int mapNigga2;
    	int mapNigga3;
            for(int j1 = 0; j1 < mapIndices1.length; j1++)
    	{
                if(mapIndices1[j1] == i1)
    	    {
                    if(i == 0) {
    		 	mapNigga2 = mapIndices2[j1] > 3535 ? -1 : mapIndices2[j1];
    				return mapNigga2;
                     } else {
    		 	mapNigga3 = mapIndices3[j1] > 3535 ? -1 : mapIndices3[j1];
    				return mapNigga3;
    		}	
    	    }
    	}
            return -1;
        }
    You're done and it's fixed. Like i said this is sort of a cheap hax and the real fix is packing the rest of the 525 maps since I did dump from a 525(sorta)
    Reply With Quote  
     


  2. #2  
    なぜこのテキストは日本語で書かれている ?

    Kenneh's Avatar
    Join Date
    Dec 2009
    Age
    30
    Posts
    2,753
    Thanks given
    63
    Thanks received
    296
    Rep Power
    478
    first nice btw


    Reply With Quote  
     

  3. #3  
    Registered Member
    Trock's Avatar
    Join Date
    Jul 2009
    Age
    28
    Posts
    1,915
    Thanks given
    14
    Thanks received
    66
    Rep Power
    532
    Sexy repped
    Quote Originally Posted by Psyduck View Post
    Vouch

    Quote Originally Posted by VelSion View Post
    Huge Vouch, made so many deals with him, went smoothly!
    Reply With Quote  
     

  4. #4  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    Pretty nice.
    Reply With Quote  
     

  5. #5  
    Client God

    Join Date
    Aug 2009
    Posts
    3,127
    Thanks given
    3
    Thanks received
    617
    Rep Power
    907
    Naice works 100%
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Dec 2007
    Age
    31
    Posts
    1,953
    Thanks given
    114
    Thanks received
    608
    Rep Power
    1094
    Glad it works Tested before I made the snippet
    Reply With Quote  
     

  7. #7  
    Donator


    Join Date
    Feb 2009
    Age
    30
    Posts
    2,128
    Thanks given
    261
    Thanks received
    280
    Rep Power
    563
    nvm found testing soon
    Reply With Quote  
     

  8. #8  
    #extreme

    +Deus Ex's Avatar
    Join Date
    Nov 2009
    Posts
    2,964
    Thanks given
    236
    Thanks received
    214
    Rep Power
    411
    Oh nicee! this fix water and all?
    Best regards,
    +Deus Ex
    Reply With Quote  
     

  9. #9  
    Registered Member
    Underoath's Avatar
    Join Date
    Sep 2008
    Posts
    2,943
    Thanks given
    826
    Thanks received
    582
    Rep Power
    853
    Will test this later.


    Special thanks to Payton :trollface:
    Spoiler for People I respect:

    Definitely not you, faggot.

    Reply With Quote  
     

  10. #10  
    Super Donator


    Join Date
    Jun 2007
    Age
    31
    Posts
    2,157
    Thanks given
    316
    Thanks received
    282
    Rep Power
    779
    Code:
    System.out.println("Map Amount: "+mapAmount+"");
    No need to declare mapAmount when you can just use j1
    Reply With Quote  
     

Page 1 of 61 1231151 ... LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Cache packing music [REP++]
    By mige5 in forum Help
    Replies: 3
    Last Post: 07-16-2010, 08:44 AM
  2. Packing music into the cache
    By Ayton in forum Help
    Replies: 13
    Last Post: 07-06-2010, 06:55 PM
  3. Packing models into cache?
    By jordan641 in forum Help
    Replies: 6
    Last Post: 06-06-2010, 03:54 AM
  4. cache packing
    By Gary in forum Help
    Replies: 4
    Last Post: 01-19-2010, 01:49 AM
  5. Packing Sprites Into Cache
    By Palidino in forum Help
    Replies: 28
    Last Post: 11-07-2009, 03:01 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •