Jump to content

Question

Posted

When i'm more than 80+ level when i get a pk and try to "burn" my karma im getting this error http://prntscr.com/ijs3b2 and the mobs stuck dead they dont spawn if i kill them when im with karma

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

It's because the code you implement it wasn't complete at all. Your error probably comes from method calculateKarmaLost , you need to edit the array karmaMods at Formulas.java and add new values for each higher level or you can add a check to get always the latest possible value from the retail one.

 

Possible fixes:

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/skills/Formulas.java
===================================================================
--- java/net/sf/l2j/gameserver/skills/Formulas.java	(revision 3)
+++ java/net/sf/l2j/gameserver/skills/Formulas.java	(working copy)
@@ -202,6 +202,12 @@
 		29.05534154,
 		29.41038662,
 		29.77769028
+		//your value
+		//your value
+		//your value
+		//your value
+		//your value
+		//....
 	};
 	
 	/**

or

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/skills/Formulas.java
===================================================================
--- java/net/sf/l2j/gameserver/skills/Formulas.java	(revision 3)
+++ java/net/sf/l2j/gameserver/skills/Formulas.java	(working copy)
@@ -1512,7 +1512,7 @@
 	 */
 	public static int calculateKarmaLost(int playerLevel, long exp)
 	{
-		return (int) (exp / karmaMods[playerLevel] / 15);
+		return (int) (exp / karmaMods[Math.min(karmaMods.length-1, playerLevel)] / 15);
 	}
 	
 	/**

 

Edited by melron
  • Like 1
  • Upvote 1
  • 0
Posted
15 minutes ago, ThelwHelpRePaidia said:

Thanks merlon only the second without editing the first it worked! :)

Nice one

Guest
This topic is now closed to further replies.


×
×
  • 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