Thread: Jolt Environment: RuneScape Emulator - RS2E

Page 2 of 11 FirstFirst 1234 ... LastLast
Results 11 to 20 of 103
  1. #11  
    I_-_I
    Guest
    Code:
    package com.rapidj.nicaea.server;
    
    import java.io.File;
    import java.io.FilenameFilter;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.DataOutputStream;
    import java.io.FileOutputStream;
    import java.util.HashMap;
    import java.util.Map;
    
    /**
     * Created by IntelliJ IDEA.
     * <code>com.rapidj.nicaea.server.MapPack</code>
     *
     * @author Light232 ([email protected])
     */
    public final class MapPack {
    
        private final HashMap<Short, int[]> mapXTEAKeys;
    
        public MapPack() {
            this.mapXTEAKeys = new HashMap<Short, int[]>(36, 2.0F);
        }
    
        public void load(String dir) throws IOException {
            File[] mapXTEAs = new File(dir).listFiles(new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    return name.endsWith(".txt");
                }
            });
            for(File mapXTEA : mapXTEAs) {
                BufferedReader read = new BufferedReader(new FileReader(mapXTEA));
                mapXTEAKeys.put(Short.valueOf(mapXTEA.getName().replace(".txt", ""))
                        , new int[] {Integer.valueOf(read.readLine()),Integer.valueOf(read.readLine())
                                ,Integer.valueOf(read.readLine()),Integer.valueOf(read.readLine())});
                read.close();
            }
        }
    
        public void save(String dir) throws IOException {
            DataOutputStream bin = new DataOutputStream(new FileOutputStream(dir));
            for(Map.Entry<Short, int[]> entry : mapXTEAKeys.entrySet()) {
                bin.writeShort(entry.getKey());
                for(int key : entry.getValue()) {
                    bin.writeInt(key);
                }
            }
            bin.writeShort(0);//regions should never == 0 so this marks our end
            bin.close();
        }
    
    }
    Code:
    	public virtual void LoadRegions()
            {
                try
                {
                    FileStream mFile = new FileStream(@".\Bin\Data\MapData\Regions.dat", FileMode.Open);
                    BufferedStream mBuf = new BufferedStream(mFile);
                    BinaryReader mBin = new BinaryReader(mBuf);
    		short regionID = mBin.ReadInt16();
    		while((regionID = mBin.ReadInt16()) != 0) {
    			mMapRegions.Add(regionID, new int[] {mBin.ReadInt32(), mBin.readInt32(), mBin.readInt32(), mBin.readInt32()});
    		}
                    JoltEnvironment.GetLogger().WriteClean("Successfully loaded " + mMapRegions.Count + " map regions.");
                }
                catch (Exception ex)
                {
                    JoltEnvironment.GetLogger().WriteError(ex.Message);
                    JoltEnvironment.ShutDown();
                }
            }
    sorry but the mappacker that are out atm are shit ugly, or are literly shit, the above i made in a few minutes, so excuse me for the ugliness but its better than wats out atm

    notice the packer is in java, and the code below it is for you to replace in ur server to comply with the packed xtea keys file
    Reply With Quote  
     

  2. #12  
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,264
    Thanks given
    405
    Thanks received
    432
    Discord
    View profile
    Rep Power
    1684
    smart kid ^
    Reply With Quote  
     

  3. #13  
    I_-_I
    Guest
    Quote Originally Posted by Jonathan View Post
    smart kid ^
    just cuz i share with the community doesnt mean i am stupid
    Reply With Quote  
     

  4. #14  
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,264
    Thanks given
    405
    Thanks received
    432
    Discord
    View profile
    Rep Power
    1684
    Quote Originally Posted by I_-_I View Post
    just cuz i share with the community doesnt mean i am stupid
    you rnt
    Reply With Quote  
     

  5. #15  
    Registered Member Market Banned Market Banned

    JPlusPlus's Avatar
    Join Date
    Jul 2008
    Age
    25
    Posts
    1,179
    Thanks given
    63
    Thanks received
    32
    Rep Power
    730
    Nice release (From your site) checking into it right now... Well after I finish updating my .NET framework from 2.0 to 4.0
    Reply With Quote  
     

  6. #16  
    Registered Member

    Join Date
    Aug 2008
    Age
    28
    Posts
    774
    Thanks given
    97
    Thanks received
    131
    Rep Power
    328
    Quote Originally Posted by J++ View Post
    Nice release (From your site) checking into it right now... Well after I finish updating my .NET framework from 2.0 to 4.0
    Nice to see somebody joining the parade towards C#

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #17  
    Registered Member

    Join Date
    Aug 2008
    Age
    28
    Posts
    774
    Thanks given
    97
    Thanks received
    131
    Rep Power
    328
    Havn't been doing much work lately, It's summer so why would i want to work on this when i could do so much more in the free time i have

    Anyways, did some upgrades to current features and using some better techoligies to hold data, check it out @ [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  8. #18  
    Registered Member

    Join Date
    Aug 2008
    Age
    28
    Posts
    774
    Thanks given
    97
    Thanks received
    131
    Rep Power
    328
    Updates:

    Added multi threading (with thread pooling)
    Improved database handling / storage
    Improved logging system
    Improved support for x32 and x64 systems

    Picture of new console:


    folders are also more organized:


    console now logs all errors to a log file (option to turn it on and off also included in /config/system_console.xml)

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #19  
    Registered Member

    Join Date
    Aug 2008
    Age
    28
    Posts
    774
    Thanks given
    97
    Thanks received
    131
    Rep Power
    328
    Update:

    Added console command, while the server is running - so no interuptions to the server (unless you use the shutdown command)

    example:


    sorry i couldn't crop, needed to restart for paint to work again (i closed service by accident)

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #20  
    Waltzing Mouse
    Guest
    That's hawt loading.
    Reply With Quote  
     

Page 2 of 11 FirstFirst 1234 ... LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •