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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock