1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, If you'd like to instant message with many other users, then join our
    Official Rune-Status Discord Server!
    Dismiss Notice
  3. Got your own Server? Looking for a Server to play right now??
    Make sure you check out the Public Server Directory!
    Dismiss Notice
  4. If you're new to the Rsps Scene and want to jump straight into learning how to Set-up and Customise your own RuneScape Private Sever then check out the Guides and Tutorials for RS2 here.
    Dismiss Notice
Dismiss Notice
Hey Guest,
Are you sure your posting in the Right Sections?
If your unsure which RuneTek version you are working with visit this page to find out.

How to set-up an Rsps Pt.2: Client

Discussion in 'Guides & Tutorials' started by Ian, Aug 27, 2017.

  1. Note: Following this it's assumed you have already completed How To Setup An Rsps Pt.1: Enviroment

    Now that you have successfully set up your Environment for Java Development we can now move onto setting up our Client and then continue to set-up our Server;

    A 'Client' is the peice of software used to connect to a 'Server', It's what you will need to connect and login to the Game. 'Clients' are distributed to your members to allow them to connect and play also, this will be done once you have made the changed you like to the Client, being in the RS2 era, alot is known about the Client - Especially revision 317.

    This makes them very customisable and easy to use and ofcause is the best place to begin when starting out in RSPS development. Alot of what has been learned from the 317 client has been ported over to other revisions to get an understanding of how the RuneTeks have evolved over time, a standard 317 is considered RT3 or RuneTek 3 this is the engine behind how it all works and in time you will come to understand the differences in not only revisions but also the Engines themselves. Though thats for another time.

    At this point you should have already installed and configured both Java Development Kit and Eclipse Java IDE to your machine. These are both needed, especially the JDK though there are other flavours of JDK such as OpenJDK and other flavours of IDE such as IntelliJ Idea we will stick to the default Java JDK and the Eclipse IDE as they are for the most part easier to get the hang of.

    For this guide we will be using a 'Custom' 317 Client - Custom meaning that it has been edited significantly to no longer resemble the default 317 Client, this could be in a number of different ways such as Custom Models (Items, NPCs, Objects, etc.) or as in this case, it has been 'Packed'.. Packing Data from another revisions is what i call a Hybrid-317. This client we will be using is a Hybrid of a 317 Client with OldSchool RS data from revision 149.

    This client was developed by Chad Alen aka Frayr <nshusa (nshusa) · GitHub> though since removed from Github it was conserved on our own Github page: <GitHub - Rune-Status/astraeus-client-v2: An almost fully refactored 317 client loading almost everything #149> Take a note of this Link as it will be used later in the guide. Also once done with time take the time to check out the rest of the repo's on our Github where you will be able to find a number of great resources for development purposes and reference.

    Here are some things to note about the Client;
    Each time RuneScape Updates a new Client is released, this may just be a 'Cache' update or it may be a 'Full' update, now the difference between having a Cache update and a Full update are that when simply the Cache updates (this could be something as simple as a new item has been added or a bit of text on an Interface has changed from RuenScape to RuneScape) then the 'Gamepack' can still be used from the previous update, this seems small in nature but infact these updates are the best to come by for those developers who had decided to update their Servers to the latest revision, basically it means they have an Extra week to continue developing and scraping data from the Live version of their game as RuneScape updates Weekly.​

    Though this only applies to OSRS and RS3 Developers. RSC/RS2 and RSHD will never be updated again. They are what we call 'Dead Revisions'.. Now a Full update will give a new Gamepack.jar, there are different ways to get this one being forcing a download from the RuneScape website or an alternative way is to use 3rd party clients to get them, though you will only need the original Gamepack if you intend to 'Deobfuscate' it, again this is something for another day.​

    When downloading a client you need to ensure that you will ALSO have access to the corresponding Cache for that revision, Each time the Gamepack updates there are subtle changes within the source of the Client which stop you from using say revision 317's Gamepack with revision 318's Cache. It's possible to do and there are guides on how to achieve such a feat elsewhere on the site though we wouldn't just jump up a revision for no good reason. Another Important thing to remember that is way back when, before the time of RuneScapeHD, the 317 Client was patched to load the 377 Cache.. This was needed at the time for Private Servers to be able to have access to newer items such as the Fire Cape (which trust me was new at the time).​

    Info
    There is a tonne of information available throughout the website and other places online about RuneScape Clients and if you wish to be successful in development then its best to gain as much knowledge of how the Client you wish to use works.


    Once you're ready to move forward please checkout the Video of cloning the files from the git repository using Eclipse or alternatively follow the steps below.
    • Open Eclipse and be sure to have set the Work space to the /git/ directory found in /user.home/ if one does not exist please create it as this is simply for ease of use in future, If you have already pushed ahead and set your Working directory as /workspace/ inside the /user.home/ directory please check with Google on how to 'Switch workspaces using Eclipse'.
    • On the menu bar select 'File' -> 'Import...' This should open a dialogue asking what type of importing you would like to continue with, select 'Git' -> 'Projects from Git' and click the Next button at the bottom of the dialogue. You will then be prompted for selection again, this time choose 'Clone URI' and continue to click Next at the bottom of the dialogue.
    • On the next dialogue you will note 3 groups of input, 'Location', 'Connection' and 'Authentication'. Firstly this is where you will need to go to the link for the Astreaus-v2 Github and copy the 'Clone' link provided. This you will need to paste into the 'URI' textbox, once done you will notice most of the form will auto-complete this is a benefit of using Eclipse as you're IDE, You will then need to input your Github Credentials into the 'Authentication' form for Username and Password. Once done click Next at the bottom of the dialogue to continue.
    • Eclipse will now fetch the 'Branch' of the repo which you have chosen which will be 'Master' as no other branches exist for the repo, so ensure 'Master' is checked and click Next to continue. The dialogue after this will offer you to change the directory of where the repo should be cloned too, if you followed the instructions from before then this shouldn't be an issue and it should clone straight into the users /git/ directory in /user.home/ - Click Next at the bottom of the dialogue to continue and Eclipse will download the repo for you.
    • On the next screen you will be asked to choose a Wizard for importing the new Project, by default 'Import using Project Wizard' will be selected, if not please continue to select this and then click Finish at the bottom of the Dialogue. This will now open up a new Dialogue which is the Project type Selection: proceed to choose Java Project and click Next.
    • Now this part is pretty simple but some people seem to get it wrong, So i'll attempt to explain whats actually happening. When the next dialogue comes up on your screen it will ask for a 'Project Name' > this is not the name of the project you are starting it is the name of the project you are cloning. Basically what this is doing if looking though your work space (which should be /user.home/git/ at this point) for a project folder by the same name, So as we have already cloned a project with a root folder named 'astraeus-client-v2' this is what we are expected to input. Though if you misspell this like I did in the video, Eclipse will notify you of the name it was expecting.
    • Once you have pasted 'astraeus-client-v2' into the Project Name textbox you will notice that Eclipse now lets you click Finish. Eclipse will then proceed to create a new project in your work space by the same name.
    Note: If you intend to make major changes to your Client it is best to 'Disconnect' from Git, this means you won't be able to pull or push changes you make to the Rune-Status repo but will be able to then Push your own version to your own Git repo - of which you can then invite people to develop with, best way to develop as a team. To Disconnect, Right-click on the Project folder Click 'Team' -> 'Disconnect'.
    That's it! You're Done for this part. If you have trouble, please take the time to watch this poorly made Video I made for you.

    Now then! You must be excited to run the Client and see what happens Right? So now in this guide i'll explain how to run your client from the IDE, though there are different ways to run your client I will explain the most basic.

    Now every program in java which is executable must have what is known as a 'main' method. If you know anything about programming of any sort this will not be news to you but if you are new and intrigued then It's something you will NEED to know. Now the most basic way I feel i can explain this is with a simple Java 'Hello World' application - Traditional ;) Check out the code below.

    public class HelloWorld {
        public static void main(String[] args) {
            // Prints "Hello World!".
            System.out.println("/"Hello World!/"");
        }
        public static void byeCruelWorld() {
            // Nothing happens.
            System.out.println("/"Bye Cruel World!/"");
        }
    }

    As you can see we have a Class which is called 'HelloWorld' which has a method called 'main' and to keep it sweet and simple, as the //Comment shows this will print out '"Hello World!"', Nothing special there of cause but this class also has a method called 'byeCruelWorld' - thing is this method is never run because its never called, though if you added this line:
    byeCruelWorld();
    to the 'main' method, then this would be executed and both lines would be printed. Make sence?

    Now the RuneScape Client is ALOT more intricate than a silly little welcome program but it still needs that 'main' method to be exected for it to run. So what we need to know is what Class file in all the Classes the Client has (87 in this case) the 'main' method, Luckily as I wrote before we know pretty much everything about the 317 Client and how it works so I could just tell you that infact the 'main' method is in the 'Client' class but even so, its always good to know that Eclipse can help you out if you struggle. By right Clicking on the project folder in the Sidebar and clicking 'Run As' -> 'Java Application', Eclipse will go through all the files and find which ones can be Executed.

    So for now: Expand the Astreaus Project folder and continue to expand the 'io.astreaus' package inside it, you should now see at the bottom a file named 'Client'. To run the client we Right Click on this, 'Run As' -> 'Java Application' and wait..

    If you have any trouble with this part - please check out the other poorly made video i made for this guide too.

    Thats it!

    Thanks for reading I hope this helps even if just one person. If you're following the 'How to set up an Rsps' Guides then please go onto How to set-up an Rsps Pt.3: Server
     
    #1 Ian, Aug 28, 2017
    Last edited: Aug 27, 2017
    • Informative Informative x 2
    • List
  2. This is a really good guide for beginners. Wish this was around when I first started.. Haha!
     
Tags:
Loading...