Thread: OpenRS - How to get child file?

Results 1 to 3 of 3
  1. #1 OpenRS - How to get child file? 
    Banned

    Join Date
    May 2011
    Posts
    1,785
    Thanks given
    854
    Thanks received
    853
    Rep Power
    0
    So for example the skeletons index basically consist of,

    Animation Cache Index-> Skeleton File -> Skeleton file contains subskeleton files (correct me if im wrong)

    Now is my question how do i grab these "child files" in openrs, I tried this but it doesnt seem to be correct;

    Code:
    
    public static byte[] getChild(int store, int skeletonID, int childId) {
        try {
            CacheIndex index = store == SKIN_FILESTORE ? CacheIndex.SKINS : CacheIndex.SKELETONS;
    Container container = Container.decode(cache.getStore().read(CacheIndex.REFERENCE, index));
    ReferenceTable table = ReferenceTable.decode(container.getData());
    
    ReferenceTable.Entry entry = table.getEntry(skeletonID);
    Archive archive = Archive.decode(cache.read(index, skeletonID).getData(),
    entry.size());
    
    
    ReferenceTable.ChildEntry child = entry.getEntry(childId);
            if (child == null )
                return null;
    
    ByteBuffer buffer = archive.getEntry(child.index());
            return buffer.array();
    
    } catch (Exception e) {
            e.printStackTrace();
    }
        return null;
    }
    Reply With Quote  
     

  2. #2  
    Reverse Engineering

    freeezr's Avatar
    Join Date
    Dec 2011
    Posts
    1,067
    Thanks given
    280
    Thanks received
    443
    Rep Power
    401
    tbh looks correct. well at least if youre correct about a skeleton file, which contains subfiles.

    all the config types have the same structure.

    [Only registered and activated users can see links. ]

    i wont be home for 6hrs so i wont be able to verify how the skeleyons cache works.

    Reply With Quote  
     

  3. #3  
    Номер 1


    Leanbow's Avatar
    Join Date
    Feb 2008
    Posts
    5,910
    Thanks given
    1,558
    Thanks received
    2,617
    Rep Power
    5000
    First of all there are no Skins or Skeletons. Index 1 are frames which are used to animate your character, and index 0 are frame bases which tells client which vertex points to animate. Download this [Only registered and activated users can see links. ] it's less verbose than OpenRS and it's easier to access 400+ cache.

    Code:
    byte[] buffer = cache.getFilesSystem(0).findFolderByID(frame).findFileByID(0).getData().getBuffer();
    vs

    Code:
    public static byte[] getChild(int store, int skeletonID, int childId) {
        try {
            CacheIndex index = store == SKIN_FILESTORE ? CacheIndex.SKINS : CacheIndex.SKELETONS;
    Container container = Container.decode(cache.getStore().read(CacheIndex.REFERENCE, index));
    ReferenceTable table = ReferenceTable.decode(container.getData());
    
    ReferenceTable.Entry entry = table.getEntry(skeletonID);
    Archive archive = Archive.decode(cache.read(index, skeletonID).getData(),
    entry.size());
    
    
    ReferenceTable.ChildEntry child = entry.getEntry(childId);
            if (child == null )
                return null;
    
    ByteBuffer buffer = archive.getEntry(child.index());
            return buffer.array();
    
    } catch (Exception e) {
            e.printStackTrace();
    }
        return null;
    }
    Reply With Quote  
     

  4. Thankful users:



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. how to get the jared file address?
    By hontiris1 in forum Requests
    Replies: 16
    Last Post: 05-12-2010, 12:54 AM
  2. How to get No-Ip to work. (Easy) ANTI LEECH
    By Lone in forum Tutorials
    Replies: 3
    Last Post: 05-09-2007, 11:40 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
  •