Thread: [592] ScapeEmulator barebone

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 [592] ScapeEmulator barebone 
    Registered Member
    Teemuzz's Avatar
    Join Date
    Oct 2009
    Posts
    2,710
    Thanks given
    1,132
    Thanks received
    400
    Rep Power
    701
    [Only registered and activated users can see links. ]

    Index_gl is NOT working as for now, don't know yet why. (probably .dat4 related.) Libs come only in windows x32. I'll be looking for x64/linux/mac in mitb/oldrs.
    Currently missing player updating and packet decoders, will update after i manage to learn the base a bit better.

    This is the ORIGINAL ScapeEmulator, with NO bugfixes, no new features, no new nothing. Original ScapeEmulator. Auto-login protocol (protocol id in 592: 24) is NOT converted. Rest are.

    Login Region packet bit-block encoding is basic, and so incomplete that it only sends raw data. Player updating has NOT been started.



    EDIT:
    Spoiler for Auto World converted:

    Code:
    package net.scapeemulator.game.net.auto;
    
    import io.netty.buffer.ByteBuf;
    import io.netty.buffer.MessageBuf;
    import io.netty.channel.ChannelHandlerContext;
    import io.netty.handler.codec.ByteToMessageDecoder;
    import net.scapeemulator.util.Base37Utils;
    import net.scapeemulator.util.ByteBufUtils;
    import net.scapeemulator.util.crypto.RsaKeySet;
    
    import java.io.IOException;
    
    public final class AutoLoginDecoder extends ByteToMessageDecoder {
    
    	public enum State {
    		READ_SIZE, READ_PAYLOAD;
    	}
    
    	private State state = State.READ_SIZE;
    	private int size;
    	private int version;
    
    	@Override
    	public void decode(ChannelHandlerContext ctx, ByteBuf buf, MessageBuf<Object> out) throws IOException {
    		if (state == State.READ_SIZE) {
    			if (!buf.isReadable() && buf.readableBytes() < 3)
    				return;
    
    			state = State.READ_PAYLOAD;
    			size = buf.readUnsignedByte() - 2;
    			version = buf.readUnsignedShort();
    		}
    		if (state == State.READ_PAYLOAD) {
    			if (buf.readableBytes() < size)
    				return;
    
    			int encryptedSize = buf.readUnsignedByte();
    			if (encryptedSize != size - 1)
    				throw new IOException("Encrypted size mismatch.");
    
    			ByteBuf secureBuffer = ByteBufUtils.rsa(buf.readBytes(encryptedSize), RsaKeySet.MODULUS,
    					RsaKeySet.PRIVATE_KEY);
    			int encryptedType = secureBuffer.readUnsignedByte();
    			if (encryptedType != 10)
    				throw new IOException("Invalid encrypted block type.");
    
    			secureBuffer.readUnsignedInt();
    			String username = Base37Utils.decodeBase37(secureBuffer.readLong());
    			secureBuffer.readInt();
    			String password = ByteBufUtils.readString(secureBuffer);
    			secureBuffer.readInt();
    			out.add(new AutoLoginRequest(version, username, password));
    		}
    	}
    
    }
    Also go to HandshakeMessage, and change SERVICE_AUTO_LOGIN to 24.


    [Only registered and activated users can see links. ]

    Spoiler for Set-up guide and original features by graham and Jonneh:

    Quote Originally Posted by Jonneh View Post
    Intro
    ScapeEmulator is a RuneScape server emulator, created by myself and Graham, which targets build 530 of the game. It is written in Java 7, and can be built with Apache Maven.

    It is released under the ISC license: [Only registered and activated users can see links. ]

    The following third-party libraries are used:

    • JUnit
    • SLF4J
    • APIviz
    • ObjectWeb ASM
    • Netty 4
    • MySQL Connector/J



    Download
    Everything: [Only registered and activated users can see links. ]
    Server code only (no cache/client etc.): [Only registered and activated users can see links. ]


    Setup
    A rough guide of how to get it working (on a UNIX-like system such as Linux)

    1. Generate a keystore:

      Code:
      cd util/data
      ./mkkeystore

    2. Compile, run unit tests and generate Javadoc:

      Code:
      mvn compile test javadoc:aggregate

    3. Generate RSA key:

      Code:
      cd util
      java -cp ... net.scapeemulator.util.crypto.RsaKeyGenerator
      # then manually place the RSA key in src/main/java/net/scapeemulator/util/
      #   crypto/RsaKeySet.java

    4. Recompile with the RSA key now in place:
      Code:
      mvn compile

    5. Generate and sign client jar/pack200 files:

      Code:
      cd asm
      java -cp ... net.scapeemulator.asm.ClientBundler

    6. Copy example serializer configuration into place:

      Code:
      cd game/data
      cp serializer.conf.example serializer.conf

    7. Launch game server:

      Code:
      cd game
      java -cp ... net.scapeemulator.game.GameServer

    8. Point your Internet browser to [Only registered and activated users can see links. ] and login with a username and password of your choosing. If the OpenGL client does not work, you can also use index.html or index_unsigned.html.




    The example serializer configuration as used above makes the server use a 'dummy' serializer. Any username/password works, and players are not saved. To provide proper persistence, the MySQL serializer must be used.

    Setting up MySQL is beyond the scope of this README, but once it has been done, to set up persistence you should:

    1. Import the database schema:

      Code:
      cd unpackaged
      mysql -hHOST -uUSERNAME -pPASSWORD DATABASE < schema.sql

    2. Update serializer.conf:

      Code:
      cd game/data
      cat >serializer.conf <<EOF
      type=jdbc
      url=jdbc:mysql://HOST/DATABASE
      username=USERNAME
      password=PASSWORD
      EOF

    3. Manually create a user in the MySQL database. You'll also need to hash the password manually with bcrypt. There's no automated tool for doing this, sorry, and registration in the game is not functional.


    4. Launch game server and web browser, as above. Login with the username and password you created in the previous step.




    Quote Originally Posted by Graham View Post
    An explanation of some of the cool stuff it's got:

    Support for obscure parts of the protocol

    As well as world list, ondemand, jaggrab and in-game support, it also has support for the auto login protocol (this is used in the signed clients where it has 'World: Auto', and the server sends back a world number for the client to connect to) and the registration protocol (although unfinished - the codecs are complete, but not the logic for dealing with them.)

    Tools for creating a client using the original loader/client jars

    The tool uses ASM to replace the parts of the bytecode (e.g. the hostname checking, the CRC checksums, the RSA key, the cache path) so that the original client/loader can be used to connect to the server. There's an in-built HTTP server to demonstrate this, just visit [Only registered and activated users can see links. ] when the game server is running.

    Also I managed to find the native libraries corresponding to the version of JOGL jagex used at the time, so the client should work across Windows, Mac and Linux - 32 and 64 bit. Unfortunately I have no Mac to test it on though - but it has been tested on Windows and Linux. The unsigned client ofc works across all of them as it does not load the native libraries.

    Benchmark

    Tom asked for some benchmarks. There is a flooder module for you to test it on your own PC, but connecting 2k players on my PC (i5-2500k, 24g of RAM), the mean cycle time is ~92ms, with a standard deviation of ~14ms.

    Some things ScapeEmulator lacks!

    As it states in the README, you shouldn't just flock to this instead of using Apollo. Apollo is still your best choice for old engine servers, but it was never designed with the new engine in mind. So if you are making a new engine server, this may well be your best choice, but otherwise, I'd still recommend use of Apollo and carrying on with the development going on there (buroa, chris fletcher, etc. have released some really good stuff for Apollo.)

    Some things Apollo has that this doesn't are: plugin system, multi-threaded updating, multi-protocol support, walkback support in the walking queue (although this would probably be reasonably easy to rip out of Apollo and add.) There are probably more.
    I'm back.
    ScapeEmulator #592 Convert [Only registered and activated users can see links. ]/[Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Extreme Donator


    Join Date
    Jul 2009
    Age
    24
    Posts
    4,350
    Thanks given
    824
    Thanks received
    1,237
    Rep Power
    1789
    Does 592 have the updated player updating?

    You can find my [Only registered and activated users can see links. ], for what I'm currently working on.
    Reply With Quote  
     

  4. #3  
    Registered Member
    Stanaveli's Avatar
    Join Date
    Aug 2014
    Posts
    1,489
    Thanks given
    179
    Thanks received
    651
    Rep Power
    1311
    Goodjob man.
    ~No honour among thieves.



    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  5. Thankful user:


  6. #4  
    Registered Member
    Teemuzz's Avatar
    Join Date
    Oct 2009
    Posts
    2,710
    Thanks given
    1,132
    Thanks received
    400
    Rep Power
    701
    Quote Originally Posted by Sir Tom View Post
    Does 592 have the updated player updating?
    yes, every 570+ has.

    - - - Updated - - -

    For those who don't know: 592 is the last version before lobby and new hits.
    I'm back.
    ScapeEmulator #592 Convert [Only registered and activated users can see links. ]/[Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #5  
    Banned
    Join Date
    Jul 2012
    Age
    24
    Posts
    1,000
    Thanks given
    646
    Thanks received
    265
    Rep Power
    0
    Nice release bud
    Reply With Quote  
     

  8. Thankful user:


  9. #6  
    Mysteria Developer

    DatguyJay's Avatar
    Join Date
    Mar 2011
    Age
    25
    Posts
    2,134
    Thanks given
    295
    Thanks received
    161
    Rep Power
    212
    This would be a start for those wanting something in a decent age. Nice release.
    Reply With Quote  
     

  10. Thankful user:


  11. #7  
    enthusiast Codiction's Avatar
    Join Date
    Aug 2014
    Age
    24
    Posts
    1,051
    Thanks given
    363
    Thanks received
    215
    Rep Power
    16
    Thank you for contributing. Not using
    Reply With Quote  
     

  12. #8  
    Community Veteran

    mige5's Avatar
    Join Date
    Aug 2008
    Posts
    5,322
    Thanks given
    546
    Thanks received
    1,129
    Discord
    View profile
    Rep Power
    1806
    Updates from 592-614:
    Code:
    New revision: 591 Released on 16 February 2010
    Game Update On Date: 16 February 2010 Title: Familiarisation
    New revision: 592 Released on 22 February 2010
    Game Update On Date: 22 February 2010 Title: Impetuous Impulses Improvements
    New revision: 593 Released on 3 March 2010
    Game Update On Date: 3 March 2010 Title: RuneScape Lobby/Login Changes
    New revision: 594 Released on 4 March 2010
    Game Update On Date: 12 March 2010 Title: Bonus XP Weekend!
    New revision: 595 Released on 15 March 2010
    Game Update On Date: 15 March 2010 Title: The Blood Pact and Lumbridge Catacombs
    New revision: 596 Released on 23 March 2010
    Game Update On Date: 23 March 2010 Title: Fish Flingers
    Revision Updated: 596 Released on 28 March 2010
    New revision: 597 Released on 29 March 2010
    Game Update On Date: 29 March 2010 Title: Egg-streme Management (Easter 2010)
    New revision: 598 Released on 12 April 2010
    Game Update On Date: 12 April 2010 Title: Dungeoneering Skill!
    New revision: 599 Released on 13 April 2010
    New revision: 600 Released on 14 April 2010
    New revision: 601 Released on 16 April 2010
    New revision: 602 Released on 21 April 2010
    Game Update On Date: 21 April 2010 Title: Slayer Challenges
    New revision: 603 Released on 28 April 2010
    Game Update On Date: 28 April 2010 Title: Buyers and Cellars (and Thieves' Guild)
    New revision: 604 Released on 3 May 2010
    New revision: 606 Released on 13 May 2010
    Game Update On Date: 13 May 2010 Title: DirectX Support and Graphics Options
    New revision: 607 Released on 14 May 2010
    New revision: 609 Released on 18 May 2010
    New revision: 610 Released on 25 May 2010
    Game Update On Date: 25 May 2010 Title: Free Player Friends List Expanded
    Game Update On Date: 27 May 2010 Title: Castle Wars Improvements
    Game Update On Date: 1 June 2010 Title: RuneScape Classic Temporarily Re-opened
    New revision: 611 Released on 9 June 2010
    Game Update On Date: 9 June 2010 Title: Court Cases
    Revision Updated: 611 Released on 10 June 2010
    Game Update On Date: 15 June 2010 Title: Ancient Effigies
    New revision: 612 Released on 24 June 2010
    Game Update On Date: 24 June 2010 Title: Free-to-play Quest Changes
    Game Update On Date: 25 June 2010 Title: Miner Disturbance for iPhone, iPod and iPad
    New revision: 613 Released on 5 July 2010
    Game Update On Date: 5 July 2010 Title: Love Story
    New revision: 614 Released on 14 July 2010
    Game Update On Date: 19 July 2010 Title: Dungeoneering Update
    Game Update On Date: 4 August 2010 Title: Extra Bank Space for F2P and Members
    Game Update On Date: 10 August 2010 Title: A Void Dance
    Game Update On Date: 19 August 2010 Title: Dungeoneering - The Occult Floors
    Game Update On Date: 20 August 2010 Title: Cryptic Clue Fest II
    Game Update On Date: 23 August 2010 Title: Bonus XP Weekend - 3rd to 6th 9
    New revision: 616 Released on 25 August 2010
    ...
    Reply With Quote  
     

  13. Thankful user:


  14. #9  
    Registered Member ozlaya's Avatar
    Join Date
    May 2014
    Posts
    161
    Thanks given
    2
    Thanks received
    11
    Discord
    View profile
    Rep Power
    11
    Very nice are you going to be working on it anymore?
    Reply With Quote  
     

  15. #10  
    Registered Member
    Teemuzz's Avatar
    Join Date
    Oct 2009
    Posts
    2,710
    Thanks given
    1,132
    Thanks received
    400
    Rep Power
    701
    Quote Originally Posted by ozlaya View Post
    Very nice are you going to be working on it anymore?
    Yes, earlier today I finished converting the original updating to the new format. I'll release an updated version later this weekend.
    I'm back.
    ScapeEmulator #592 Convert [Only registered and activated users can see links. ]/[Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    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)


User Tag List

Similar Threads

  1. 592 client
    By _slam in forum Help
    Replies: 8
    Last Post: 11-07-2009, 06:25 PM
  2. 592
    By _slam in forum Help
    Replies: 5
    Last Post: 11-06-2009, 02:06 PM
  3. BareBones - Power+ V.1 Base source
    By Luke in forum Downloads
    Replies: 38
    Last Post: 02-07-2009, 12:03 AM
  4. Lukes Barebones Server
    By Mrthunder23 in forum Help
    Replies: 8
    Last Post: 02-05-2009, 08:48 PM
  5. BareBones
    By LAMT in forum Requests
    Replies: 1
    Last Post: 01-17-2009, 05:42 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
  •