Thread: Ingame Highscores V2 With ranks (easy as pie)

Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 66
  1. #11  
    Officially Retired


    Join Date
    Oct 2007
    Age
    27
    Posts
    5,456
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    when i search this
    Code:
    public boolean process() {
    it show my this on my client.java
    Code:
    			case 121:
    				// we could use this to make the char appear for other players only until
    				// this guys loading is done. Also wait with regular player updates
    				// until we receive this command.
    				//public boolean process() {// is being called regularily every 500ms                           
                                    writePlayers();
    				NewObjects();
    				Deleteobjects();
    				Deletewalls();
                            	OBJECTS();
    				println_debug("Loading finished.");
    				break;
    then where to put this
    Code:
    playerLevel[24] = totalz;
    playerLevel[22] = playerRank;
    
    
    if(totalz > server.Rank1)
    {
    playerRank = 1;
    server.Rank1 = totalz;
    }
    
    if(totalz > server.Rank2 && totalz < server.Rank1)
    {
    playerRank = 2;
    server.Rank2 = totalz;
    }
    
    if(totalz > server.Rank3 && totalz < server.Rank2)
    {
    playerRank = 3;
    server.Rank3 = totalz;
    }
    
    if(totalz > server.Rank4 && totalz < server.Rank3)
    {
    playerRank = 4;
    server.Rank4 = totalz;
    }
    
    if(totalz > server.Rank5 && totalz < server.Rank4)
    {
    playerRank = 5;
    server.Rank5 = totalz;
    }
    
    if(totalz > server.Rank6 && totalz < server.Rank5)
    {
    playerRank = 6;
    server.Rank6 = totalz;
    }
    
    if(totalz > server.Rank7 && totalz < server.Rank6)
    {
    playerRank = 7;
    server.Rank7 = totalz;
    }
    if(totalz > server.Rank8 && totalz < server.Rank7)
    {
    playerRank = 8;
    server.Rank8 = totalz;
    }
    
    if(totalz > server.Rank9 && totalz < server.Rank8)
    {
    playerRank = 9;
    server.Rank9 = totalz;
    }
    
    if(totalz > server.Rank10 && totalz < server.Rank9)
    {
    playerRank = 10;
    server.Rank10 = totalz;
    }
    
    if(totalz > server.Rank11 && totalz < server.Rank10)
    {
    playerRank = 11;
    server.Rank11 = totalz;
    }
    
    if(totalz > server.Rank12 && totalz < server.Rank11)
    {
    playerRank = 12;
    server.Rank12 = totalz;
    }
    
    if(totalz > server.Rank13 && totalz < server.Rank12)
    {
    playerRank = 13;
    server.Rank13 = totalz;
    }
    
    if(totalz > server.Rank14 && totalz < server.Rank13)
    {
    playerRank = 14;
    server.Rank14 = totalz;
    }
    
    if(totalz > server.Rank15 && totalz < server.Rank14)
    {
    playerRank = 15;
    server.Rank15 = totalz;
    }
    
    if(totalz > server.Rank16 && totalz < server.Rank15)
    {
    playerRank = 16;
    server.Rank16 = totalz;
    }
    
    if(totalz > server.Rank17 && totalz < server.Rank16)
    {
    playerRank = 17;
    server.Rank17 = totalz;
    }
    
    if(totalz > server.Rank18 && totalz < server.Rank17)
    {
    playerRank = 18;
    server.Rank18 = totalz;
    }
    
    if(totalz > server.Rank19 && totalz < server.Rank18)
    {
    playerRank = 19;
    server.Rank19 = totalz;
    }
    
    if(totalz > server.Rank20 && totalz < server.Rank19)
    {
    playerRank = 20;
    server.Rank20 = totalz;
    }
    
    if(totalz < server.Rank20)
    {
    playerRank = 0;
    }
     

  2. #12  
    Registered Member
    laetye's Avatar
    Join Date
    Dec 2007
    Age
    26
    Posts
    350
    Thanks given
    0
    Thanks received
    0
    Rep Power
    245
    nice work, especially with ranks. rep++

    oh and btw, dark, this is how it should look like.

    Code:
    			case 121:
    				// we could use this to make the char appear for other players only until
    				// this guys loading is done. Also wait with regular player updates
    				// until we receive this command.
    				//public boolean process() {// is being called regularily every 500ms                           
    playerLevel[24] = totalz;
    playerLevel[22] = playerRank;
    
    
    if(totalz > server.Rank1)
    {
    playerRank = 1;
    server.Rank1 = totalz;
    }
    
    if(totalz > server.Rank2 && totalz < server.Rank1)
    {
    playerRank = 2;
    server.Rank2 = totalz;
    }
    
    if(totalz > server.Rank3 && totalz < server.Rank2)
    {
    playerRank = 3;
    server.Rank3 = totalz;
    }
    
    if(totalz > server.Rank4 && totalz < server.Rank3)
    {
    playerRank = 4;
    server.Rank4 = totalz;
    }
    
    if(totalz > server.Rank5 && totalz < server.Rank4)
    {
    playerRank = 5;
    server.Rank5 = totalz;
    }
    
    if(totalz > server.Rank6 && totalz < server.Rank5)
    {
    playerRank = 6;
    server.Rank6 = totalz;
    }
    
    if(totalz > server.Rank7 && totalz < server.Rank6)
    {
    playerRank = 7;
    server.Rank7 = totalz;
    }
    if(totalz > server.Rank8 && totalz < server.Rank7)
    {
    playerRank = 8;
    server.Rank8 = totalz;
    }
    
    if(totalz > server.Rank9 && totalz < server.Rank8)
    {
    playerRank = 9;
    server.Rank9 = totalz;
    }
    
    if(totalz > server.Rank10 && totalz < server.Rank9)
    {
    playerRank = 10;
    server.Rank10 = totalz;
    }
    
    if(totalz > server.Rank11 && totalz < server.Rank10)
    {
    playerRank = 11;
    server.Rank11 = totalz;
    }
    
    if(totalz > server.Rank12 && totalz < server.Rank11)
    {
    playerRank = 12;
    server.Rank12 = totalz;
    }
    
    if(totalz > server.Rank13 && totalz < server.Rank12)
    {
    playerRank = 13;
    server.Rank13 = totalz;
    }
    
    if(totalz > server.Rank14 && totalz < server.Rank13)
    {
    playerRank = 14;
    server.Rank14 = totalz;
    }
    
    if(totalz > server.Rank15 && totalz < server.Rank14)
    {
    playerRank = 15;
    server.Rank15 = totalz;
    }
    
    if(totalz > server.Rank16 && totalz < server.Rank15)
    {
    playerRank = 16;
    server.Rank16 = totalz;
    }
    
    if(totalz > server.Rank17 && totalz < server.Rank16)
    {
    playerRank = 17;
    server.Rank17 = totalz;
    }
    
    if(totalz > server.Rank18 && totalz < server.Rank17)
    {
    playerRank = 18;
    server.Rank18 = totalz;
    }
    
    if(totalz > server.Rank19 && totalz < server.Rank18)
    {
    playerRank = 19;
    server.Rank19 = totalz;
    }
    
    if(totalz > server.Rank20 && totalz < server.Rank19)
    {
    playerRank = 20;
    server.Rank20 = totalz;
    }
    
    if(totalz < server.Rank20)
    {
    playerRank = 0;
    }
                                    writePlayers();
    				NewObjects();
    				Deleteobjects();
    				Deletewalls();
                            	OBJECTS();
    				println_debug("Loading finished.");
    				break;


     

  3. #13  
    Registered Member

    Join Date
    Jul 2006
    Age
    27
    Posts
    1,247
    Thanks given
    0
    Thanks received
    5
    Rep Power
    190
    nice work your getting better

    playerLevel[24] = totalz;
    playerLevel[22] = playerRank;


    if(totalz > server.Rank1)
    {
    playerRank = 1;
    server.Rank1 = totalz;
    }

    if(totalz > server.Rank2 && totalz < server.Rank1)
    {
    playerRank = 2;
    server.Rank2 = totalz;
    }

    if(totalz > server.Rank3 && totalz < server.Rank2)
    {
    playerRank = 3;
    server.Rank3 = totalz;
    }

    if(totalz > server.Rank4 && totalz < server.Rank3)
    {
    playerRank = 4;
    server.Rank4 = totalz;
    }

    if(totalz > server.Rank5 && totalz < server.Rank4)
    {
    playerRank = 5;
    server.Rank5 = totalz;
    }

    if(totalz > server.Rank6 && totalz < server.Rank5)
    {
    playerRank = 6;
    server.Rank6 = totalz;
    }

    if(totalz > server.Rank7 && totalz < server.Rank6)
    {
    playerRank = 7;
    server.Rank7 = totalz;
    }
    if(totalz > server.Rank8 && totalz < server.Rank7)
    {
    playerRank = 8;
    server.Rank8 = totalz;
    }

    if(totalz > server.Rank9 && totalz < server.Rank8)
    {
    playerRank = 9;
    server.Rank9 = totalz;
    }

    if(totalz > server.Rank10 && totalz < server.Rank9)
    {
    playerRank = 10;
    server.Rank10 = totalz;
    }

    if(totalz > server.Rank11 && totalz < server.Rank10)
    {
    playerRank = 11;
    server.Rank11 = totalz;
    }

    if(totalz > server.Rank12 && totalz < server.Rank11)
    {
    playerRank = 12;
    server.Rank12 = totalz;
    }

    if(totalz > server.Rank13 && totalz < server.Rank12)
    {
    playerRank = 13;
    server.Rank13 = totalz;
    }

    if(totalz > server.Rank14 && totalz < server.Rank13)
    {
    playerRank = 14;
    server.Rank14 = totalz;
    }

    if(totalz > server.Rank15 && totalz < server.Rank14)
    {
    playerRank = 15;
    server.Rank15 = totalz;
    }

    if(totalz > server.Rank16 && totalz < server.Rank15)
    {
    playerRank = 16;
    server.Rank16 = totalz;
    }

    if(totalz > server.Rank17 && totalz < server.Rank16)
    {
    playerRank = 17;
    server.Rank17 = totalz;
    }

    if(totalz > server.Rank18 && totalz < server.Rank17)
    {
    playerRank = 18;
    server.Rank18 = totalz;
    }

    if(totalz > server.Rank19 && totalz < server.Rank18)
    {
    playerRank = 19;
    server.Rank19 = totalz;
    }

    if(totalz > server.Rank20 && totalz < server.Rank19)
    {
    playerRank = 20;
    server.Rank20 = totalz;
    }

    if(totalz < server.Rank20)
    {
    playerRank = 0;
    }

    add a timer on it every 500ms will gonna lag like a hell(on most servers)
    Last edited by Yorick; 01-21-2008 at 03:34 PM. Reason: Double posting is not allowed!
    just yoricka...
     

  4. #14  
    PkscapePk
    Guest
    how i fix the cannot find symbol error?

    cant find rank1
    rank2....rank20
     

  5. #15  
    Registered Member
    Bulby Strife's Avatar
    Join Date
    Jan 2008
    Age
    29
    Posts
    833
    Thanks given
    1
    Thanks received
    1
    Rep Power
    267
    Quote Originally Posted by LittleTodds View Post
    I am having the same problem as Durent.

    Am I putting the stuff in server.java in the right spot?

    Code:
    	// TODO: yet to figure out proper value for timing, but 500 seems good
    	public static final int cycleTime = 500;
    
    
    	public static int Rank1 = 0;
    	public static int Rank2 = 0;
    	public static int Rank3 = 0;
    	public static int Rank4 = 0;
    	public static int Rank5 = 0;
    	public static int Rank6 = 0;
    	public static int Rank7 = 0;
    	public static int Rank8 = 0;
    	public static int Rank9 = 0;
    
    	public static int Rank10 = 0;
    	public static int Rank11 = 0;
    	public static int Rank12 = 0;
    	public static int Rank13 = 0;
    	public static int Rank14 = 0;
    	public static int Rank15 = 0;
    	public static int Rank16 = 0;
    	public static int Rank17 = 0;
    	public static int Rank18 = 0;
    	public static int Rank19 = 0;
    	public static int Rank20 = 0;
    
    	public static int playerRank = 0;
    
    	public static boolean updateServer = false;
    	public static int updateSeconds = 180; //180 because it doesnt make the time jump at the start :P
    
    	public static long startTime;

    Oh yeah i forgot i moved int playerRank to client.java!


    Add this under your voids...

    Code:
    public int playerRank = 0;
    add a timer on it every 500ms will gonna lag like a hell(on most servers)
    Actually it only adds a little bit of lag.
    Last edited by Bulby Strife; 01-21-2008 at 05:47 PM. Reason: Double posting is not allowed!
    [Only registered and activated users can see links. ]
    ||||||||||||||||||||||||||||||

     

  6. #16  
    kilermage
    Guest
    my errors are that it can't find method totalz. Put the totalz need so I wont be getting any errors.
     

  7. #17  
    Registered Member
    Bulby Strife's Avatar
    Join Date
    Jan 2008
    Age
    29
    Posts
    833
    Thanks given
    1
    Thanks received
    1
    Rep Power
    267
    Quote Originally Posted by kilermage View Post
    my errors are that it can't find method totalz. Put the totalz need so I wont be getting any errors.

    most server has totalz..... if you dont change

    Code:
    playerLevel[24] = totalz;
    to this

    Code:
    playerLevel[24] = (getLevelForXP(playerXP[0]) + getLevelForXP(playerXP[1]) + getLevelForXP(playerXP[2]) + getLevelForXP(playerXP[3]) + getLevelForXP(playerXP[4]) + getLevelForXP(playerXP[5]) + getLevelForXP(playerXP[6]) + getLevelForXP(playerXP[7]) + getLevelForXP(playerXP[8]) + getLevelForXP(playerXP[9]) + getLevelForXP(playerXP[10]) + getLevelForXP(playerXP[0]) + getLevelForXP(playerXP[11]) + getLevelForXP(playerXP[12]) + getLevelForXP(playerXP[13]) + getLevelForXP(playerXP[14]) + getLevelForXP(playerXP[15]) + getLevelForXP(playerXP[6]) + getLevelForXP(playerXP[17]) + getLevelForXP(playerXP[18]) + getLevelForXP(playerXP[19]) + getLevelForXP(playerXP[20]));
    [Only registered and activated users can see links. ]
    ||||||||||||||||||||||||||||||

     

  8. #18  
    Banned

    Join Date
    Jan 2007
    Age
    27
    Posts
    4,417
    Thanks given
    3
    Thanks received
    105
    Rep Power
    0
    i dont have that line in server.java

     

  9. #19  
    Registered Member bloodychef's Avatar
    Join Date
    Dec 2007
    Posts
    207
    Thanks given
    0
    Thanks received
    0
    Rep Power
    27
    Please help!

    client.java:19822: cannot find symbol
    symbol : variable objectID
    location: class client
    if (objectID == 3192) {
    ^
    Note: stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlinteprecation for details.
    1 error
    Press any key to continue . . .
     

  10. #20  
    Registered Member
    Bulby Strife's Avatar
    Join Date
    Jan 2008
    Age
    29
    Posts
    833
    Thanks given
    1
    Thanks received
    1
    Rep Power
    267
    Quote Originally Posted by bloodychef View Post
    Please help!

    client.java:19822: cannot find symbol
    symbol : variable objectID
    location: class client
    if (objectID == 3192) {
    ^
    Note: stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlinteprecation for details.
    1 error
    Press any key to continue . . .
    hmm wrong place i think...did you add under case 132:?

    Mabey you should just go with the command instead.
    [Only registered and activated users can see links. ]
    ||||||||||||||||||||||||||||||

     

Page 2 of 7 FirstFirst 1234 ... LastLast

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
  •