Thread: 150 Skills gap "Help" Jumping between lvl 136-150 in 1 action.

Results 1 to 5 of 5
  1. #1 150 Skills gap "Help" Jumping between lvl 136-150 in 1 action. 
    Registered Member Grandpa's Avatar
    Join Date
    Dec 2015
    Posts
    94
    Thanks given
    12
    Thanks received
    2
    Rep Power
    13
    I can do ;;master and get 150 everything, but i wanted to test if it actually works. I started training and found out that, when my experience in a (Skill) goes over 508438379 XP It will set my skill automatically to 150. Does it not support that high numbers? i'm pretty sure java can do 2.147b.
    I started to search around for anything that returns 508438379; or if it was something that was declared or said "you cant get over that number etc.."
    I've tried many methodes and been testing around. There was one time when i came over 508438379 experience (level 137) it went back all to 0. I was leveling prayer.

    Any ideas why it dosnt allow me to go over 508438379 ? and why it jumps from 136/137 to 150? when i cross over that ledge.
    Really apprecaite any suggestions & will try em out.


    Tell me if you need more code / info.

    Workspace

    Code:
    public int getXPForLevel(int level) {
    		int points = 0;
    		int output = 0;
    
    		for (int lvl = 1; lvl <= level; lvl++) {
    			points += Math.floor((double)lvl + 300.0 * Math.pow(2.0, (double)lvl / 7.0));
    			if (lvl >= level)
    				return output;
    			output = (int)Math.floor(points / 4);
    		}
    		return 0;
    	}
    
    	public int getLevelForXP(int exp) {
    		int points = 0;
    		int output = 0;
    		if (exp > 2000000000)
    			return 150;
    		for (int lvl = 1; lvl <= 150; lvl++) {
    			points += Math.floor((double) lvl + 300.0
    					* Math.pow(2.0, (double) lvl / 7.0));
    			output = (int) Math.floor(points / 4);
    			if (output >= exp) {
    				return lvl;
    			}
    		}
    		return 150;
    	}
    	
    	public boolean addSkillXP(int amount, int skill){
    		if (amount+c.playerXP[skill] < 0 || c.playerXP[skill] > 2100000000) {
    			if(c.playerXP[skill] > 2100000000) {
    				c.playerXP[skill] = 2100000000;
    			}
    			return false;
    		}
    		amount *= Config.SERVER_EXP_BONUS;
    		int oldLevel = getLevelForXP(c.playerXP[skill]);
    		c.playerXP[skill] += amount;
    		if (oldLevel < getLevelForXP(c.playerXP[skill])) {
    			if (c.playerLevel[skill] < c.getLevelForXP(c.playerXP[skill]) && skill != 3 && skill != 5)
    				c.playerLevel[skill] = c.getLevelForXP(c.playerXP[skill]);
    			levelUp(skill);
    			c.gfx100(199);
    			requestUpdates();
    		}
    		setSkillLevel(skill, c.playerLevel[skill], c.playerXP[skill]);
    		refreshSkill(skill);
    		return true;
    	}
    Code:
    public int getLevelForXP(int exp) {
    		int points = 0;
    		int output = 0;
    
    		for (int lvl = 1; lvl <= 150; lvl++) {
    			points += Math.floor((double)lvl + 300.0 * Math.pow(2.0, (double)lvl / 7.0));
    			output = (int)Math.floor(points / 4);
    			if (output >= exp)
    				return lvl;
    		}
    		return 150;
    	}
    The reason i've set the max exp to 2b was to make sure i wasnt stuck there during getting 150. I even said in the code If exp = 2b it will return to 150, which makes me wonder why it keeps return to 0 or 150 after reaching 508438379 exp,

    I'm using project insanity & client [trace by galkon]

    Quote Originally Posted by Ugly View Post
    correct. meaning that to extend your maximum level further, either make the xp per level lower, or use a long for the xp instead of an integer.
    Found this suggestion https://www.rune-server.ee/runescape-development/rs2-server/help/604282-pi-317-max-skill-level-increase.html
    This guy had the same problem as me, but how exactly do i go to either make the xp per level lower, or use a long for the xp instead of an integer
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Feb 2017
    Posts
    19
    Thanks given
    2
    Thanks received
    6
    Rep Power
    12
    Lots of code, Have you tried changing those return values to all different numbers from each other? Change one to 149 another to 148 and e.t.c and get to that exp and if your skill turns into one of those numbers it will be easier to pinpoint the problem in your code.
    Reply With Quote  
     

  3. #3  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    1,508
    Thanks given
    80
    Thanks received
    105
    Rep Power
    86
    Make sure your client can handle those numbers.



    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  4. #4  
    Registered Member
    Kris's Avatar
    Join Date
    Jun 2016
    Age
    19
    Posts
    1,238
    Thanks given
    215
    Thanks received
    377
    Rep Power
    96
    There probably is a stop in the client for this which doesn't allow it to go any further. None of these numbers seem reasonable.
    Maximum byte value - 127
    Maximum short value - 32,767
    Maximum integer value - 2,147,483,647
    Basically, if you went over the maximum value of a given primitive, it would return in the very minimum value of the given primitive. For example, going over 127 on a byte would return value -128 and nothing more.

    Everything suggests that either your code has some flaws in it or the client is blocking levels further from a certain level.
    Reply With Quote  
     

  5. #5  
    Registered Member Grandpa's Avatar
    Join Date
    Dec 2015
    Posts
    94
    Thanks given
    12
    Thanks received
    2
    Rep Power
    13
    Fixed, thanks for all the suggestions
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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

Similar Threads

  1. Quote help
    By Pblord7 in forum Literature & Language Arts
    Replies: 1
    Last Post: 05-06-2013, 11:20 PM
  2. Need incredibly skilled coders to help
    By Sacrifice in forum Help
    Replies: 17
    Last Post: 01-27-2013, 02:53 AM
  3. simple skill bug, please help me!
    By Thonatos in forum Help
    Replies: 6
    Last Post: 08-13-2012, 09:50 PM
  4. Replies: 7
    Last Post: 07-30-2011, 10:45 PM
  5. Replies: 1
    Last Post: 03-21-2010, 02:58 AM
Tags for this Thread

View Tag Cloud

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