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.


  • Posts

    • That's exactly how it’s designed — everything important is handled on the API server side, for example, processing requests to the game server. Each website has its own token/key for authentication; without it, there will be no interaction with the game server. Some data can be stored both on my side and on the server side to avoid making frequent requests to the server, which is logical.   Yes, there’s a lot of old, unused code that just needs to be cleaned up. It was used before, but after major rewrites it was left lying around. It doesn’t interfere with anything — it’s just there and doesn’t affect the system's operation.   Beaver meme kurwa is my favorite. Unfortunately, you don't know Russian — otherwise, you would’ve spotted even more Easter eggs. 😂
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/qtkJASMbKV https://campsite.bio/utchihaamkt  
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/qtkJASMbKV https://campsite.bio/utchihaamkt  
    • i saw somewhere that: $var = (int) $_POST['some_id'] ?? string::error_class('text'); it was when i gave up and deleted the sources let him, he does not even understand what cross site or mitm means   still waiting for any client of yours so i can play with them     DUDE IM GONNA CALL YOU BoberKurwa FROM NOW ON!! rename your account aswell! BoberKurwa!   Note: what happend to your chatgpt answers boberkurwa did your subscription of $12.5/$20 ended?   it is PSR12 standard
    • if i was you i would check first argentinian developer team to learn and contribute then start my own project privatly and then practice in free coding for my self, then you would be ready to learn standards and code out of nothing, and if you fail means you are in good path, if you win you are in for higher level, whatever you do be persistent and focused, thats what i did when i had time.
  • Topics

×
×
  • Create New...