Thread: Simpler version on Total Level's

Results 1 to 7 of 7
  1. #1 Simpler version on Total Level's 
    Ian...
    Guest
    If you have a integer called "totalz" then replace it with these few lines instead of manualy adding them all together.

    This should be placed in process.

    Code:
    		for(int stat = 0; stat < 21; stat++){
    			totalLevel = (getLevelForXP(playerXP[stat]);
    		}
    		int oldTotalLevel = totalLevel;
    		if (oldTotalLevel != totalLevel) {
    			sendFrame126("Total Lvl: " + totalLevel, 3984);
    		}
    also add the folowing var in Player.java

    Code:
    	public int totalLevel = 0;
    - Ian...

    EDIT: tbh i dont even think it will work lmao... fix it someone
    Reply With Quote  
     

  2. #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,885
    Thanks given
    1,860
    Thanks received
    4,718
    Rep Power
    5000
    Nice and simple.



    Reply With Quote  
     

  3. #3  
    Sub
    Sub is offline
    sυввч
    Sub's Avatar
    Join Date
    Aug 2007
    Age
    19
    Posts
    4,313
    Thanks given
    1,061
    Thanks received
    336
    Rep Power
    2747
    ok explaining

    Code:
    for(int stat = 0; stat < 21; stat++){
    for the stats is lower than 21 the stat will do +1
    Reply With Quote  
     

  4. #4  
    Joshz
    Guest
    Thx for this, simple and easy
    Reply With Quote  
     

  5. #5  
    Registered Member
    Unborn's Avatar
    Join Date
    Dec 2007
    Age
    26
    Posts
    516
    Thanks given
    1
    Thanks received
    3
    Rep Power
    317
    Nice Job, never even thought of something like this.
    Quote Originally Posted by Ian... View Post
    EDIT: tbh i dont even think it will work lmao... fix it someone
    You did make 1 mistake, it sets oldTotalLevel after changing the new one - Heres the fix:
    Code:
    	int oldTotalLevel = totalLevel;
    	for(int stat = 0; stat < 21; stat++){
    		totalLevel = (getLevelForXP(playerXP[stat]);
    	}
    	if (oldTotalLevel != totalLevel) {
    		sendFrame126("Total Lvl: " + totalLevel, 3984);
    	}
    That makes the last part work.

    Anyways. Good Job. :woot:

    -Unborn


    Reply With Quote  
     

  6. #6  
    Ian...
    Guest
    thanks unborn...
    Reply With Quote  
     

  7. #7  
    Registered Member

    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    31
    Posts
    12,467
    Thanks given
    156
    Thanks received
    4,812
    Rep Power
    5000
    good job Ian .

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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

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