Jump to content
  • 0

Removing EXP from monsters & npcs.


Question

Posted

Hello people,

 

I try to remove exp from monsters & npcs. I did it with success, but when I kill a mob I get an error at gameserver.

 

My edit:

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/L2Npc.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Npc.java	(revision 5)
+++ java/net/sf/l2j/gameserver/model/actor/L2Npc.java	(working copy)
@@ -1512,14 +1512,6 @@
	}

	/**
-	 * @return the Exp Reward of this L2Npc contained in the L2NpcTemplate (modified by RATE_XP).
-	 */
-	public int getExpReward()
-	{
-		return (int) (getTemplate().getRewardExp() * Config.RATE_XP);
-	}
-	
-	/**
	 * @return the SP Reward of this L2Npc contained in the L2NpcTemplate (modified by RATE_SP).
	 */
	public int getSpReward()
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)
@@ -1716,27 +1716,19 @@
		if (hpSkill != null)
			hpRatio *= hpSkill.getPower();

-		double xp = (double) getExpReward() * damage / getMaxHp() * hpRatio;
		double sp = (double) getSpReward() * damage / getMaxHp() * hpRatio;

		if (diff > 5) // formula revised May 07
		{
			double pow = Math.pow((double) 5 / 6, diff - 5);
-			xp = xp * pow;
			sp = sp * pow;
		}

-		if (xp <= 0)
-		{
-			xp = 0;
+		if (sp <= 0)
			sp = 0;
-		}
-		else if (sp <= 0)
-			sp = 0;

		int[] tmp =
		{
-			(int) xp,
			(int) sp
		};

 

The error at gameserver:

 

96Vw5QP.png

 

Thanks in advance!

4 answers to this question

Recommended Posts

  • 0
Posted

ehm...in all seriousness you just need to set the exp config to 0 or set the mobs exp with a query to 0 in the database :DDDDDD

  • 0
Posted

ehm...in all seriousness you just need to set the exp config to 0 or set the mobs exp with a query to 0 in the database :DDDDDD

Guest
This topic is now closed to further replies.


  • Posts

    • 🌍 https://l2origins.org/ 🛡️ LINEAGE II ORIGINS — SEASON 1 🛡️ 🌑 High Five Classic | True Old-School Experience 🌑 ⚠️ Opening on March 6th at 16:00 Welcome back to the origins of Lineage II. ⚔️ ABOUT THE SERVER Lineage2 Origins is built for players who miss the true retail feeling. Classic progression, real challenges, fair competition — enhanced only with carefully selected QoL features, never breaking the original gameplay. 🌿 PHASED GEAR PROGRESSION 🟢 Month 1: Vesper max 🟢 Month 2: Vorpal unlocked 🟢 Month 3+: Top-grade & Elegia released 🚫 NO AUTO-FARM ✔️ External auto-clicker allowed (1 per client, download page only) ❌ Bots & illegal automation forbidden 🛡️ Strong anti-bot + captcha system ⚠️ AFK players will be punished — stay active or logout 📊 RATES & CORE SETTINGS 🔹 Adena: x5 🔹 Drop / Spoil: x5 🔹 Skill EXP: x15 🔹 Max Windows: 2 per PC 🔹 Subclass: Lv 85 (no quest required) 🔹 Party Level Diff: 30 (55–85) 🔹 No custom items (armors / weapons / jewelry) 🔥 FEATURES ✨ Global & Raid Teleport ✨ NPC Buffer (34 buffs) ✨ Auto Events & PvP Zones ✨ Ranking & Clan Progression ✨ GM Shop & Premium System ✨ All-In-One Community Board ✨ Party & Solo Instances ✨ Siege & Territory War Rewards ✨ RaidBoss Kill Rewards ✨ Lucky Creature Event ✨ Daily Login Rewards ✨ Advanced DDoS Protection & Backups ⚔️ ENCHANTMENTS 🔸 Safe: +3 🔸 Max: +12 (Month 2: +14 | Month 3: +16) 🔸 Blessed: 50% (Premium 65%) 🔸 Normal: 45% (Premium 60%) 🏟️ OLYMPIAD 🔹 Max Enchant: +6 🔹 Start Players: 4 🔹 Period: 1st & 15th 🏰 SIEGE & TW 🔹 Siege Time: 16:00 & 20:00 🔹 Territory War: 20:00 🔹 Max Wards: 3 per Castle 🌌 Lineage2 Origins Fair. Competitive. Nostalgic. A true return to the origins of Lineage II.
    • Bastante confiable, ya trabaje en varios proyectos con el y la verdad te da confianza que hoy en dia poca gente hay asi lo  recomiendo 100%  Gracias por todo amigo ! seguiremos trabajando juntos segurisimamente! 
    • Arcana Mace Acumen +6 : 200 Euro    Leave a message here or better on Discord : grandmaster1991   Discord : GrandMaster#1689  
    • overbooked till 3 of march!! Not accepting more works for now, everything after 3 of match!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..