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!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,871
    Thanks given
    1,854
    Thanks received
    4,745
    Rep Power
    5000
    Nice and simple.

    Attached image

    Reply With Quote  
     

  3. #3  
    sυввч

    Sub's Avatar
    Join Date
    Aug 2007
    Age
    24
    Posts
    4,352
    Thanks given
    1,205
    Thanks received
    359
    Rep Power
    2845
    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
    30
    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  
    Member Simpler version on Total Level's Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    good job Ian .

    Attached imageAttached image
    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
  •