Thread: TopList functionality

Page 1 of 13 12311 ... LastLast
Results 1 to 10 of 122
  1. #1 TopList functionality 
    Administrator

    Kevy's Avatar
    Join Date
    Jul 2006
    Posts
    974
    Thanks given
    47
    Thanks received
    1,448
    Rep Power
    4058
    Players online protocol has been added to TopList! This means every server can now show how much people are currently online on the details page. It is really easy to implent! Takes only about few lines of code.

    Quote Originally Posted by Vastastico View Post
    Hyperion simple modification of 1 file.

    Code:
    case OPCODE_PLAYERCOUNT:
                        session.write(new PacketBuilder().putShort(World.getWorld().getPlayers().size()).toPacket());
                        return true;
    beneath:
    Code:
    case OPCODE_UPDATE:
                        session.setAttribute("state", STATE_UPDATE);
                        session.write(new PacketBuilder().put(INITIAL_RESPONSE).toPacket());
                        return true;
    add:
    Code:
    public static final int OPCODE_PLAYERCOUNT = 20;
    beneath:
    Code:
    public static final int OPCODE_UPDATE = 15;
    Adding it to WL is also very easy. More detailed TUT coming soon!

    PI: [Only registered and activated users can see links. ]

    As you can see this feature is trusting the count server sends to it. Altough there may be some people who will increase this value, thatswhy faking the value will get your server disabled on the list for a week and account banned for a week too! There will be a report button soon and moderators who deal with them!

    Edit: I will release the PHP script soon, so you can display how many people are online in your signature or on site!

    Edit:

    Code:
     <?php  $fs = @fsockopen("localhost", 50000, $errno, $errstr, 2);
    
       if($fs)
       {
        stream_set_timeout($fs, 2);
        write_byte($fs, 20);
        $players = read_short($fs);
        @fclose($fs);
    
         echo "Server is online, players: ".$players;
       }
       else
         echo "Server is offline.";
    
      function write_byte($fs, $b)
      {
       @fwrite($fs, chr($b));
      }
    
      function read_byte($fs)
      {
       return ord(@fread($fs, 1));
      }
    
      function read_ubyte($fs)
      {
       return read_byte($fs) & 0xff;
      }
    
      function read_short($fs)
      {
       return (read_ubyte($fs) << 8) + read_ubyte($fs);
      }
    
     ?>
    Thanks, Kevin.
     

  2. Thankful users:


  3. #2  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!


    S Quare Quxx's Avatar
    Join Date
    Jun 2007
    Posts
    8,858
    Thanks given
    1,859
    Thanks received
    4,669
    Rep Power
    5000
    inb4howcaniaddthistomypi



     


  4. #3  
    Registered Member
    Teemuzz's Avatar
    Join Date
    Oct 2009
    Posts
    2,663
    Thanks given
    1,087
    Thanks received
    385
    Rep Power
    567
    nice 1st
    edit: fuck u square..
    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. ]
     

  5. #4  
    Registered Member

    Join Date
    Sep 2007
    Age
    27
    Posts
    2,396
    Thanks given
    5
    Thanks received
    434
    Rep Power
    902
    Nice feature I was wondering when toplist owners would start adding this

    In Project Insanity open RS2LoginDecoder

    and search for:

    Code:
    if(protocol == 14) {
    and replace that line with

    Code:
    if(protocol == 16){
    							session.write(new StaticPacketBuilder().addShort((PlayerHandler.playerCount*50)).toPacket());
    							session.close();
    							return false;
    						} else if(protocol == 14) {
    Hyperion V2 Martin's Updates.
    [Only registered and activated users can see links. ]

    Scar says:
    i hate it when it hits your face
     

  6. #5  
    Registered Member minimike150's Avatar
    Join Date
    Aug 2009
    Age
    25
    Posts
    56
    Thanks given
    0
    Thanks received
    1
    Rep Power
    13
    Nice addition, I always wondered why top lists didn't have this!
    Look forward to seeing the tutorials for WL.
     

  7. #6  
    Professional Java Developer

    Rainex's Avatar
    Join Date
    Jan 2010
    Age
    22
    Posts
    668
    Thanks given
    101
    Thanks received
    31
    Rep Power
    77
    nice i think it will add more activity to toplist
     

  8. #7  
    Sub
    Sub is offline
    sυввч
    Sub's Avatar
    Join Date
    Aug 2007
    Age
    19
    Posts
    4,300
    Thanks given
    1,053
    Thanks received
    328
    Rep Power
    2672
    Quote Originally Posted by Kevy View Post
    Players online protocol has been added to TopList! This means every server can now show how much people are currently online on the details page. It is really easy to implent! Takes only about few lines of code.



    Adding it to WL is also very easy. More detailed TUT coming soon!

    As you can see this feature is trusting the count server sends to it. Altough there may be some people who will increase this value, thatswhy faking the value will get your server disabled on the list for a week and account banned for a week too! There will be a report button soon and moderators who deal with them!

    how we ment to send to your server
     

  9. #8  
    :doge:

    Join Date
    Jan 2009
    Posts
    3,758
    Thanks given
    221
    Thanks received
    811
    Rep Power
    1938
    so all your doing is writing a byte to the server via the toplist? and when the byte is received the server can handle it(just like the js5 protocol)?
     

  10. #9  
    「 m e o w 」「 m e o w 」


    Thee Wolf's Avatar
    Join Date
    Sep 2008
    Posts
    3,615
    Thanks given
    638
    Thanks received
    1,551
    Rep Power
    5000
    Very interesting.
     

  11. #10  
    :doge:

    Join Date
    Jan 2009
    Posts
    3,758
    Thanks given
    221
    Thanks received
    811
    Rep Power
    1938
    why are you using opcode 16 though.. the runescape client uses that opcode. you should change it to something different.
     

  12. Thankful users:


Page 1 of 13 12311 ... LastLast

Thread Information
Users Browsing this Thread

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

Similar Threads

  1. Toplist!
    By Division in forum Projects
    Replies: 21
    Last Post: 07-09-2010, 11:55 PM
  2. Toplist
    By La Lampara in forum Forum Related Help
    Replies: 2
    Last Post: 03-14-2010, 02:11 PM
  3. Toplist
    By Tyler in forum Suggestions
    Replies: 19
    Last Post: 10-19-2008, 10:25 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
  •