Thread: [Hyperion][Simple] Adding server-client details of player

Results 1 to 3 of 3
  1. #1 [Hyperion][Simple] Adding server-client details of player 
    Donator


    Join Date
    Sep 2007
    Age
    24
    Posts
    2,430
    Thanks given
    127
    Thanks received
    508
    Rep Power
    386
    This guide is for Hyperion, And hyperion ONLY.
    In this example, I will be showing you how to integrate my [Only registered and activated users can see links. ] tutorial with the server (Hyperion based)

    First off, Open up org.hyperion.rs2.model.Player
    Declare in there:
    Code:
    private String guild = "None";
    public String getGuild() {
        return guild;
    }
    public void setGuild(String value) {
        guild = value;
    }
    Save and close that file.
    Open up org.hyperion.rs2.task.impl.PlayerUpdateTask
    Find
    Code:
    playerProps.putLong(otherPlayer.getNameAsLong());
    Below it, Add
    Code:
    playerProps.putRS2String(otherPlayer.getGuild()); // Guild
    Ok, Thats the server end done. Now then in Player.java in the client, Mine located in rs.animable.Player
    Find this
    Code:
    name = TextClass.fixName(
    Below that line, Add this
    Code:
    guild = stream.readString();
    There! That's a basic server-client transport!
    Last edited by .fabian; 08-29-2010 at 10:49 PM. Reason: Added a few indentations for Scu11.
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Donator


    Join Date
    Sep 2007
    Age
    24
    Posts
    2,430
    Thanks given
    127
    Thanks received
    508
    Rep Power
    386
    I've added 2 and they are the 2 functions I tell people to add, The rest will vary on their server =/
    Reply With Quote  
     

  4. #3  
    TzTok

    Join Date
    Apr 2008
    Age
    30
    Posts
    1,870
    Thanks given
    20
    Thanks received
    21
    Rep Power
    432
    Useful thread, thank you very much. This can be used for MUCH more than just guild string.
    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

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