Noticias:

No tienes permiso para ver los enlaces. Para poder verlos Registrate o Conectate.

Menú Principal

Mostrar HP/MP al morir

Iniciado por Swarlog, Jul 27, 2025, 12:33 AM

Tema anterior - Siguiente tema

Swarlog


CitarFrozen

Index: L2jFrozen_GameServer/config/functions/pvp.properties
===================================================================
--- L2jFrozen_GameServer/config/functions/pvp.properties
+++ L2jFrozen_GameServer/config/functions/pvp.properties
@@ -207,4 +208,5 @@
# War Legend Configs
WarLegendAura = False
KillsToGetWarLegendAura = 30
+
+#=============================================================
+#             			Show Hp PvP
+#=============================================================
+# By João Vitor Barbosa
+ShowHpPvP = True

#====================================
# Anti Farm System
#====================================
# You must put True to active the AntiFarm mod.




Index: java/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java
===================================================================
--- java/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java
+++ java/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java
@@ -2623,2 +2624,3 @@
	public static boolean WAR_LEGEND_AURA;
	public static int KILLS_TO_GET_WAR_LEGEND_AURA;
	+	
	+// Show HP PvP
	+public static boolean SHOW_HP_PVP;
	
	public static boolean ANTI_FARM_ENABLED;

@@ -2744,6 +2745,7 @@	
			WAR_LEGEND_AURA = Boolean.parseBoolean(pvpSettings.getProperty("WarLegendAura", "False"));
			KILLS_TO_GET_WAR_LEGEND_AURA = Integer.parseInt(pvpSettings.getProperty("KillsToGetWarLegendAura", "30"));
			+			
			+// Show HP PvP
			+SHOW_HP_PVP = Boolean.parseBoolean(pvpSettings.getProperty("ShowHpPvP", "false"));
			
			ANTI_FARM_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmEnabled", "False"));
			
			


Index: java/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/L2Character.java
===================================================================
--- java/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/L2Character.java
+++ java/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/L2Character.java
@@ -10312,4 +10313,5 @@
	public final double getCurrentHp()
	{
		return getStatus().getCurrentHp();
	}
	+
	+/**
	+ * Gets the current enemy hp after death
	+ * @return the current hp
	+ */
	+public final int getCurrentShowHpPvp()
	+{
	+	return (int) getStatus().getCurrentHp();
	+}
	
	/**
	 * Sets the current hp.
	 * @param newHp the new current hp
	 */
	public final void setCurrentHp(final double newHp)
	{
		getStatus().setCurrentHp(newHp);
	}
	
	
Index: java/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
+++ java/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
@@ -7859,1 +7860,2 @@
		// If in Arena, do nothing
		if (isInsideZone(ZONE_PVP) || targetPlayer.isInsideZone(ZONE_PVP))
			return;
		+
		+// Show HP PvP
		+if (Config.SHOW_HP_PVP)
		+	targetPlayer.sendPacket(new ExShowScreenMessage( getName() + " - HP: " + getCurrentShowHpPvp() + "/" + getMaxHp() , 4000, 0x02, true));
		
		// check anti-farm
		if (!checkAntiFarm(targetPlayer))
			return;

CitaraCis

Index: gameserver/config/players.properties
===================================================================
--- gameserver/config/players.properties
+++ gameserver/config/players.properties
@@ -284,3 +284,4 @@
# Allow player subclass addition without checking for unique quest items.
AltSubClassWithoutQuests = False
+
+#=============================================================
+#             			Show Hp PvP
+#=============================================================
+# By João Vitor Barbosa
+ShowHpPvP = True

#=============================================================
#                        Buffs config
#=============================================================

# Maximum number of buffs.


Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java
+++ java/net/sf/l2j/Config.java
@@ -492,2 +492,3 @@
	public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
	+
	+/** Show HP PvP */
	+public static boolean SHOW_HP_PVP;
	+
	/** Buffs */
	public static boolean STORE_SKILL_COOLTIME;

@@ -1079,5 +1079,6 @@
			ALT_GAME_SUBCLASS_WITHOUT_QUESTS = players.getProperty("AltSubClassWithoutQuests", false);
			+
			+SHOW_HP_PVP = players.getProperty("ShowHpPvP", false);
			
			BUFFS_MAX_AMOUNT = players.getProperty("MaxBuffsAmount", 20);
			

Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Character.java
+++ java/net/sf/l2j/gameserver/model/actor/L2Character.java
@@ -5500,3 +5500,4 @@
	public final double getCurrentHp()
	{
		return getStatus().getCurrentHp();
	}
	+
	+public final int getCurrentShowHpPvp()
	+{
	+	return (int) getStatus().getCurrentHp();
	+}
	
	public final void setCurrentHp(double newHp)
	{
		getStatus().setCurrentHp(newHp);
	}
	
	
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
@@ -4222,6 +4222,7 @@
				// Add PvP point to attacker.
				setPvpKills(getPvpKills() + 1);
				+
				+// Show HP PvP
				+if (Config.SHOW_HP_PVP)
				+	targetPlayer.sendPacket(new ExShowScreenMessage( getName() + " - HP: " + getCurrentShowHpPvp() + "/" + getMaxHp() , 4000, 0x02, true));
				
				// Send UserInfo packet to attacker with its Karma and PK Counter
				sendPacket(new UserInfo(this));