Jump to content
  • 0

Level limitation


Hijirikawa

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

So for instance the max level for my server is 120, is it possible to make players stop getting XP when they reach level 99?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   46
  • Joined:  07/15/13
  • Last Seen:  

Hello, you can do in src/map/pc.cpp (Don't forget recompile)

Search:

	if(sd->bl.prev == NULL || pc_isdead(sd))
		return;

and add below:

	if(sd->status.base_level >= 99)
		base_exp = 0;

Tested and works fine.

Original Topic.

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

I actually made one in hercules
http://herc.ws/board/topic/11587-maxlvexpgain/

the above post ... exactly the same as my version 1.0, that means will have 2 bugs I mentioned in version 1.1
1. cannot pay guild tax exp
2. you actually gain 1 base exp and 1 job exp because of the cap value in pc_calcexp function

you have to fix these 2 ...

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

4 hours ago, AnnieRuru said:

2. you actually gain 1 base exp and 1 job exp because of the cap value in pc_calcexp function

This is the only thing that would be needs to be fixed for me, the guild exp would be fine, any clues as to how?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  164
  • Reputation:   16
  • Joined:  03/15/12
  • Last Seen:  

5 hours ago, AnnieRuru said:

I actually made one in hercules
http://herc.ws/board/topic/11587-maxlvexpgain/

the above post ... exactly the same as my version 1.0, that means will have 2 bugs I mentioned in version 1.1
1. cannot pay guild tax exp
2. you actually gain 1 base exp and 1 job exp because of the cap value in pc_calcexp function

you have to fix these 2 ...

Ma'am is there a way can convert to rA?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

apparently, just have to apply that line AFTER the guild_payexp and pc_calcexp function ... fixed

 src/map/pc.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 5aace7ecb..4fb097b61 100755
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -6719,6 +6719,13 @@ void pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in
 	if (!(exp_flag&2))
 		pc_calcexp(sd, &base_exp, &job_exp, src);
 
+	if ( !(exp_flag & 1) ) {
+		if ( sd->status.base_level >= 5 )
+			base_exp = 0;
+		if ( sd->status.job_level >= 5 )
+			job_exp = 0;
+	}
+
 	nextb = pc_nextbaseexp(sd);
 	nextj = pc_nextjobexp(sd);
 

btw, there are 2 elysium ?

Edited by AnnieRuru
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

11 hours ago, AnnieRuru said:

apparently, just have to apply that line AFTER the guild_payexp and pc_calcexp function ... fixed


 src/map/pc.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 5aace7ecb..4fb097b61 100755
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -6719,6 +6719,13 @@ void pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in
 	if (!(exp_flag&2))
 		pc_calcexp(sd, &base_exp, &job_exp, src);
 
+	if ( !(exp_flag & 1) ) {
+		if ( sd->status.base_level >= 5 )
+			base_exp = 0;
+		if ( sd->status.job_level >= 5 )
+			job_exp = 0;
+	}
+
 	nextb = pc_nextbaseexp(sd);
 	nextj = pc_nextjobexp(sd);
 

btw, there are 2 elysium ?

Thanks Annie, I tried to message you here on the forums however it says you can't receive any messages, so I've added you on Discord instead. Rin#2605

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...