Infinite leveling

Posts 115 of 23 · Page 1 of 2
Infinite leveling
@prabza1234 has made a request on how to get infinite leveling. It is in fact not hard :P

In player.leveling.cs (found in wServer --> Realm --> Entities --> Player)
Find the area that says
Code:
private bool CheckLevelUp()
        {
            if (Experience - GetLevelExp(Level) >= ExperienceGoal && Level < 20) 
            {
                Level++;
                ExperienceGoal = GetExpGoal(Level);
                foreach (var i in XmlDatas.TypeToElement[ObjectType].Elements("LevelIncrease"))
                {
                    var rand = new Random();
                    var min = int.Parse(i.Attribute("min").Value);
                    var max = int.Parse(i.Attribute("max").Value) + 1;
                    var limit = int.Parse(XmlDatas.TypeToElement[ObjectType].Element(i.Value).Attribute("max").Value);
                    var idx = StatsManager.StatsNameToIndex(i.Value);
                    Stats[idx] += rand.Next(min, max);
                    if (Stats[idx] > limit) Stats[idx] = limit;
                }
                HP = Stats[0] + Boost[0];
                MP = Stats[1] + Boost[1];

                UpdateCount++;

                if (Level == 20)
                    foreach (var i in Owner.Players.Values)
                        i.SendInfo(Name + " achieved level 20");
                questEntity = null;
                return true;
            }
            CalculateFame();
            return false;
        }
Change the number 20 in the line:
Code:
if (Experience - GetLevelExp(Level) >= ExperienceGoal && Level < 20)
to whatever you want it to be. My example will be 10000 which will look like:
Code:
if (Experience - GetLevelExp(Level) >= ExperienceGoal && Level < 10000)
Because of this you will have to change the quests that are also found in player.leveling.cs

For the reaching level 20 bit you can change it to what you want it to be like
Code:
 if (Level == 20)
                    foreach (var i in Owner.Players.Values)
                        i.SendInfo(Name + " achieved level 20");
                questEntity = null;
                return true;
to
Code:
 if (Level == 100)
                    foreach (var i in Owner.Players.Values)
                        i.SendInfo(Name + " achieved level 100");
                questEntity = null;
                return true;
Very simple and straight forwarding so if you didn't know this... well if you own your own private server and develop it, you should look around the source and find some things that might help you instead of just making your own custom items

Edit:

Crazyjani decided to post this so I will add this here:
Code:
if (Experience - GetLevelExp(Level) >= ExperienceGoal)
Problem with this is that you're not mentioning the client change, which is extremely important for making the fame bar show up correctly.
Quote Originally Posted by Travoos View Post
Problem with this is that you're not mentioning the client change, which is extremely important for making the fame bar show up correctly.
Well yes I would do that but with infinite leveling, I really think that you do not require that hence the name "infinite leveling"
Quote Originally Posted by Ahl View Post
Well yes I would do that but with infinite leveling, I really think that you do not require that hence the name "infinite leveling"
What you proposed is finite leveling, and also even if it was infinite leveling you wouldn't want the fame bar to just suddenly pop up at level 20.
Quote Originally Posted by Travoos View Post
What you proposed is finite leveling, and also even if it was infinite leveling you wouldn't want the fame bar to just suddenly pop up at level 20.
Yes I suppose you wouldn't want it to pop up at all
^^^^^^^^^^^
Quote Originally Posted by Ahl View Post
Infinite leveling
Quote Originally Posted by Ahl View Post
if (Experience - GetLevelExp(Level) >= ExperienceGoal && Level < 10000)
What kind of infinity is that? It clearly has an end
Quote Originally Posted by CrazyJani View Post
What kind of infinity is that? It clearly has an end
Well you could add more 0's to it. I wasn't bothered to add soo many 0's but if the person had any brains, then he would work it out don't you think?

Also I said "My example will be 10000 which will look like:"

so yeah.... clearly a invalid argument
Quote Originally Posted by Ahl View Post
Well you could add more 0's to it.
That wouldn't still be infinite! If you want infinite leveling you should do this:
Code:
if (Experience - GetLevelExp(Level) >= ExperienceGoal)
Just make the leveling infinite and make the fame bar appear at something like level 999999999.
Quote Originally Posted by Ahl View Post
Yes I suppose you wouldn't want it to pop up at all
If you want to call it infinite you should make it infinite. Otherwise it's like selling cannabis that actually contains 50% coriander
Anyone wanna make a tutorial for that? Too tired right now.
It's really not that hard to not make it finite. Besides the client changes that Club mentions, you just have to remove the comparative statement between Level and 20. Don't make the number huge. Just obliterate the statement completely.
True. Its not really "infinite". The term infinite should not be used :P.
it's still finite to the max integer the program uses
Posts 115 of 23 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?