Thread: Adding remaining xp to packed skill interface

Results 1 to 5 of 5
  1. #1 Adding remaining xp to packed skill interface 
    Registered Member

    Join Date
    Nov 2014
    Posts
    120
    Thanks given
    1
    Thanks received
    32
    Rep Power
    80
    g'day.
    what you are adding:


    Code:
    					int currLvlXP =  extractInterfaceValues(class9_1, 1);
    					int nextLvlXP =  extractInterfaceValues(class9_1, 0);
    					if (class9_1.parentID == 3917 && currLvlXP < nextLvlXP) {
    						String remainder = NumberFormat.getIntegerInstance().format(nextLvlXP - currLvlXP);
    						message = message.concat("\\n");
    						message = message.concat("Remaining XP: " +remainder);
    					}
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2015
    Posts
    64
    Thanks given
    17
    Thanks received
    11
    Rep Power
    3
    You can do this the same way it gets the experience, using extractInterfaceValues. Then you won't have to hardcode it.
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Nov 2014
    Posts
    120
    Thanks given
    1
    Thanks received
    32
    Rep Power
    80
    Quote Originally Posted by pkinghere View Post
    You can do this the same way it gets the experience, using extractInterfaceValues. Then you won't have to hardcode it.
    isn't that what I have done? lol
    Reply With Quote  
     

  4. #4  
    Registered Member
    Shoutbox's Avatar
    Join Date
    Sep 2013
    Posts
    1,748
    Thanks given
    580
    Thanks received
    363
    Rep Power
    834
    Quote Originally Posted by pkinghere View Post
    You can do this the same way it gets the experience, using extractInterfaceValues. Then you won't have to hardcode it.
    Its literally in the naming? Lol.

    Also well done Eternal you son of gun
    S A D B O Y S

    私は自分自身を殺すために待つことができない
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2015
    Posts
    64
    Thanks given
    17
    Thanks received
    11
    Rep Power
    3
    Quote Originally Posted by Shoutbox View Post
    Its literally in the naming? Lol.

    Also well done Eternal you son of gun
    Quote Originally Posted by Eternal View Post
    isn't that what I have done? lol
    No, you're hard coding it. You can do it like this.

    (once on startup)
    Code:
    skill.message += "\\nRemaining XP: %3";
    
    int[][] values = skill.valueIndexArray.clone();
    skill.valueIndexArray = new int[3][3];
    			
    for (int k = 0; k < values.length; k++)
    	for (int k2 = 0; k2 < skill.valueIndexArray.length; k2++)
    		skill.valueIndexArray[k][k2] = values[k][k2];
    
    skill.valueIndexArray[2][0] = 21;//id to tell that client what data to extract
    skill.valueIndexArray[2][1] = i[1];//the skill id
    skill.valueIndexArray[2][2] = 0;
    then in extractInterfaceValues, where the rest of the if statements are

    Code:
    if (j1 == 21) {
    	int skill = ai[l++];
    	int experience = currentExp[skill];
    	int expIndex = 0;
    	for(int it = 0; it < experienceForLevels.length; it++) {
    		if(experience < experienceForLevels[it]) {
    			expIndex = it;
    			break;
    		}
    	}
    					
    	int expUntil = maxStats[skill] == 99 ? 0 : experienceForLevels[expIndex] - experience;
    	k1 = expUntil;
    }
    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

Similar Threads

  1. [PI] Xp To A Skill $$$$
    By Impervious in forum Buying
    Replies: 3
    Last Post: 09-09-2011, 02:19 AM
  2. PI Adding XP to dungeoneering skill
    By gunnar in forum Help
    Replies: 0
    Last Post: 08-07-2011, 10:00 AM
  3. Replies: 5
    Last Post: 07-17-2011, 08:09 AM
  4. Replies: 5
    Last Post: 04-14-2011, 10:54 AM
  5. Replies: 1
    Last Post: 05-15-2010, 04:40 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
  •