Jump to content
  • 0

Question

Posted
Hi, I have created GF server and I want to make a dynamic exp rate ? For example 1-20 lvl 5x, 20-40lvl 7x and so on... I changed my experience.java but when I reach lvl I modified in that file I get like over 100% in exp bar. So my questions:

1) is it possible to make a dynamic exp rate at all ?

2) how to solve exp bar problem if it is only way to make dynamic exp rate ?

5 answers to this question

Recommended Posts

  • 0
Posted (edited)
Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Attackable.java	(revision 5)
+++ java/net/sf/l2j/gameserver/model/actor/L2Attackable.java	(working copy)
@@ -334,6 +334,20 @@
 					long exp = expSp[0];
 					int sp = expSp[1];
 					
+					int attackerLevel = attacker.getLevel();
+					
+					if (attackerLevel <= 20) {
+						exp *= 5;
+					}
+					else if (attackerLevel > 20 && attackerLevel <= 40) {
+						exp *= 7;
+					}
+					else if (attackerLevel > 40 && attackerLevel <= 60) {
+						exp *= 9;
+					} else {
+						exp *= 11;
+					}
+					
 					if (isChampion())
 					{
 						exp *= Config.CHAMPION_REWARDS;

Something like this, calculateRewards() seems to be a better place.

Edited by Tessa

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...