Thread: [PI]Explenation Needed

Results 1 to 10 of 10
  1. #1 [PI]Explenation Needed 
    Registered Member
    Division's Avatar
    Join Date
    Dec 2009
    Age
    29
    Posts
    2,208
    Thanks given
    41
    Thanks received
    78
    Rep Power
    97
    Code:
    	public void initialize() {
    		synchronized (this) {
    			outStream.createFrame(249);
    			outStream.writeByteA(1);		// 1 for members, zero for free
    			outStream.writeWordBigEndianA(playerId);
    			for (int j = 0; j < Server.playerHandler.players.length; j++) {
    				if (j == playerId)
    					continue;
    				if (Server.playerHandler.players[j] != null) {
    					if (Server.playerHandler.players[j].playerName.equalsIgnoreCase(playerName))
    						disconnected = true;
    				}
    			}
    What do the red colored parts do?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    First one sends byteA via stream class.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Division's Avatar
    Join Date
    Dec 2009
    Age
    29
    Posts
    2,208
    Thanks given
    41
    Thanks received
    78
    Rep Power
    97
    Quote Originally Posted by i r maggot View Post
    First one sends byteA via stream class.
    But what does it do?
    Reply With Quote  
     

  4. #4  
    Registered Member MadZ's Avatar
    Join Date
    Dec 2009
    Posts
    143
    Thanks given
    0
    Thanks received
    3
    Rep Power
    16
    Use Eclipse and highlight any statement, and it will tell you what it means.
    [SBD="- Renegade"] Failure to play iCraig.[/SBD]
    Reply With Quote  
     

  5. #5  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    The fuck? No it doesn't.

    It sends packet 249, then writes a byte, then it checks to see if the char is null(?).
    Reply With Quote  
     

  6. #6  
    Member [PI]Explenation Needed Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    packet 249 is the first packet sent after login, it sends the playerid and the member byte, 0 means f2p world and will show things as "member items", 1 means p2p world, and will show all item/member names, playerId is your id in the clientside player array, without it your player updating will mess up,

    The second bit checks whether you're already online, if you are it disconnects you..and a stupid way of doing it if i do say so myself.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    That's a horrible way to do it..
    Reply With Quote  
     

  8. #8  
    Registered Member
    Division's Avatar
    Join Date
    Dec 2009
    Age
    29
    Posts
    2,208
    Thanks given
    41
    Thanks received
    78
    Rep Power
    97
    Quote Originally Posted by Luke132 View Post
    packet 249 is the first packet sent after login, it sends the playerid and the member byte, 0 means f2p world and will show things as "member items", 1 means p2p world, and will show all item/member names, playerId is your id in the clientside player array, without it your player updating will mess up,

    The second bit checks whether you're already online, if you are it disconnects you..and a stupid way of doing it if i do say so myself.
    Thanks

    I still need to know why my server is freezing every hour
    Reply With Quote  
     

  9. #9  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    Because it's PI, follow the exceptions.
    Reply With Quote  
     

  10. #10  
    Registered Member
    Division's Avatar
    Join Date
    Dec 2009
    Age
    29
    Posts
    2,208
    Thanks given
    41
    Thanks received
    78
    Rep Power
    97
    Quote Originally Posted by i r maggot View Post
    Because it's PI, follow the exceptions.
    There are no errors at all in my CMD box.
    Its just it dc's everyone out of nowhere.
    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
  •