Thread: Hyperion 459 encrypted charfiles

Results 1 to 4 of 4
  1. #1 Hyperion 459 encrypted charfiles 
    Registered Member
    Join Date
    Aug 2010
    Posts
    640
    Thanks given
    73
    Thanks received
    47
    Rep Power
    54
    I need help with making the char files readable.

    When trying to edit them it looks like this.

    Code:
    ‹       sILHbb83ƒgI)hq/
    a0”c2&5\ޣ`8†
    …Ȩ1A3
     =G?
    my GenericWorldLoader.java

    Spoiler for Code:
    Code:
    package org.hyperion.rs2;
    
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.zip.GZIPInputStream;
    import java.util.zip.GZIPOutputStream;
    
    import org.apache.mina.core.buffer.IoBuffer;
    import org.hyperion.rs2.model.Player;
    import org.hyperion.rs2.model.PlayerDetails;
    import org.hyperion.rs2.util.NameUtils;
    import org.hyperion.util.Streams;
    
    /**
     * An implementation of the <code>WorldLoader</code> class that saves players
     * in binary, gzip-compressed files in the <code>data/players/</code>
     * directory.
     * @author Graham Edgecombe
     *
     */
    public class GenericWorldLoader implements WorldLoader {
    
    	@Override
    	public LoginResult checkLogin(PlayerDetails pd) {
    		Player player = null;
    		int code = 2;
    		File f = new File("data/savedGames/" + NameUtils.formatNameForProtocol(pd.getName()) + ".dat");
    		if(f.exists()) {
    			try {
    				InputStream is = new GZIPInputStream(new FileInputStream(f));
    				String name = Streams.readRS2String(is);
    				String pass = Streams.readRS2String(is);
    				if(!name.equals(NameUtils.formatName(pd.getName()))) {
    					code = 3;
    				}
    				if(!pass.equals(pd.getPassword())) {
    					code = 3;
    				}
    			} catch(IOException ex) {
    				code = 11;
    			}
    		}
    		if(code == 2) {
    			player = new Player(pd);
    		}
    		return new LoginResult(code, player);
    	}
    
    	@Override
    	public boolean savePlayer(Player player) {
    		try {
    			OutputStream os = new GZIPOutputStream(new FileOutputStream("data/savedGames/" + NameUtils.formatNameForProtocol(player.getName()) + ".dat"));
    			IoBuffer buf = IoBuffer.allocate(1024);
    			buf.setAutoExpand(true);
    			player.serialize(buf);
    			buf.flip();
    			byte[] data = new byte[buf.limit()];
    			buf.get(data);
    			os.write(data);
    			os.flush();
    			os.close();
    			return true;
    		} catch(IOException ex) {
    			return false;
    		}
    	}
    
    	@Override
    	public boolean loadPlayer(Player player) {
    		try {
    			File f = new File("data/savedGames/" + NameUtils.formatNameForProtocol(player.getName()) + ".dat");
    			InputStream is = new GZIPInputStream(new FileInputStream(f));
    			IoBuffer buf = IoBuffer.allocate(1024);
    			buf.setAutoExpand(true);
    			while(true) {
    				byte[] temp = new byte[1024];
    				int read = is.read(temp, 0, temp.length);
    				if(read == -1) {
    					break;
    				} else {
    					buf.put(temp, 0, read);
    				}
    			}
    			buf.flip();
    			player.deserialize(buf);
    			return true;
    		} catch(IOException ex) {
    			return false;
    		}
    	}
    
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2010
    Posts
    640
    Thanks given
    73
    Thanks received
    47
    Rep Power
    54
    I'm willing to pay 10m rsgp for this.
    Reply With Quote  
     

  3. #3  
    Officially Retired

    Huey's Avatar
    Join Date
    Jan 2008
    Age
    22
    Posts
    16,478
    Thanks given
    3,385
    Thanks received
    7,727
    Rep Power
    5000
    Get a .dat reader
    Attached image
    Listen children don't become this guy.
    Quote Originally Posted by Owner Spikey View Post
    Why can I attack lower level npc's in a matter of a mouse hover but for a higher level npc the only choice to attack is by right clicking option attack?

    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Aug 2010
    Posts
    640
    Thanks given
    73
    Thanks received
    47
    Rep Power
    54
    Quote Originally Posted by Polar Bear View Post
    Get a .dat reader
    I did try a few but still alot of random symbols show up.
    Reply With Quote  
     


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. [PJA/Hyperion] Custom Object Loading [PJA/Hyperion]
    By helloevery1 in forum Snippets
    Replies: 20
    Last Post: 11-06-2012, 12:25 AM
  2. Replies: 4
    Last Post: 07-11-2011, 07:29 PM
  3. Replies: 6
    Last Post: 06-16-2010, 01:45 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
  •