Jump to content

Recommended Posts

Posted

Hi everybody !

 

This is a custom mod create only for fun.

Add this and flag players can be attack in peace zone.

 

This is a good system against bishop who heal from the peace zone.

 

Index: Trunk/7441/l2jfree-core/config/altsettings.properties
===================================================================
--- Trunk/7441/l2jfree-core/config/altsettings.properties
+++ Trunk/7441/l2jfree-core/config/altsettings.properties
@@ -113,6 +113,11 @@
AltKarmaPlayerCanTrade = True
AltKarmaPlayerCanUseWareHouse = False

+# -------------------------------------------------------------
+# Alternative settings against player with PVP_FLAG
+# -------------------------------------------------------------
+AltPvPFlagPlayerCanBeKilledInPeaceZone = True
+
# Protect Player till level of PVP ( he also cant attack other players) 0 = disabled 
AltPlayerProtectionLevel = 0


Index: Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/Config.java
===================================================================
--- Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/Config.java
+++ Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/Config.java
@@ -1576,6 +1576,7 @@
	public static boolean				ALT_GAME_KARMA_PLAYER_CAN_TELEPORT;
	public static boolean				ALT_GAME_KARMA_PLAYER_CAN_TRADE;
	public static boolean				ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE;
+	public static boolean				ALT_GAME_PVPFLAG_PLAYER_CAN_BE_KILLED_IN_PEACEZONE;							// PvP Punishment
	public static int					ALT_PLAYER_PROTECTION_LEVEL;												// Player Protection Level
	public static boolean				ALT_AUTO_LEARN_SKILLS;														// Config for Auto Learn Skills
	public static boolean				ALT_AUTO_LEARN_DIVINE_INSPIRATION;											// Alternative auto skill learning for divine inspiration (+4 max buff count)
@@ -1773,6 +1774,7 @@
			ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(altSettings.getProperty("AltKarmaPlayerCanTeleport", "true"));
			ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(altSettings.getProperty("AltKarmaPlayerCanTrade", "true"));
			ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(altSettings.getProperty("AltKarmaPlayerCanUseWareHouse", "true"));
+			ALT_GAME_PVPFLAG_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(altSettings.getProperty("AltPvPFlagPlayerCanBeKilledInPeaceZone", "false"));
			ALT_PLAYER_PROTECTION_LEVEL = Integer.parseInt(altSettings.getProperty("AltPlayerProtectionLevel", "0"));
			ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(altSettings.getProperty("AltFreeTeleporting", "False"));
			ALT_RECOMMEND = Boolean.parseBoolean(altSettings.getProperty("AltRecommend", "False"));
@@ -4180,6 +4182,8 @@
			ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseWareHouse"))
			ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(pValue);
+		else if (pName.equalsIgnoreCase("AltPvPFlagPlayerCanBeKilledInPeaceZone"))
+			ALT_GAME_PVPFLAG_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltCastleForDawn"))
			ALT_GAME_CASTLE_DAWN = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltCastleForDusk"))

Index: Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/gameserver/model/actor/L2Character.java
===================================================================
--- Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/gameserver/model/actor/L2Character.java
+++ Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/gameserver/model/actor/L2Character.java
@@ -5575,19 +5575,26 @@
		if (InstanceManager.getInstance().getInstance(attacker.getInstanceId()).isPvPInstance())
			return false;

+		/************************************************************
+		*
+		* @author Sig'
+		*
+		*************************************************************/
+		if (Config.ALT_GAME_PVPFLAG_PLAYER_CAN_BE_KILLED_IN_PEACEZONE)
+		{
+			if (targetPlayer.getPvpFlag() != 0)
+				return false;
+		}
+
		if (Config.ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE)
		{
			// allows red to be attacked and red to attack flagged players
			if (targetPlayer.getKarma() > 0)
				return false;

Index:/Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/gameserver/model/actor/instance/L2PcInstance.java
+++ /Trunk/7441/l2jfree-core/src/main/java/com/l2jfree/gameserver/model/actor/instance/L2PcInstance.java
@@ -4720,7 +4720,7 @@
		// Force Charges
		clearCharges(); // Empty charges

-		//updatePvPFlag(0); // Clear the pvp flag
+		updatePvPFlag(0); // Clear the pvp flag
		// Pet shouldn't get unsummoned after masters death.
		// Unsummon the Pet
		//if (getPet() != null) getPet().unSummon(this);

  • 4 weeks later...
Posted

Make it for the class bishop only

and it will be cool then!..

 

if you have only little little knowledge you can make it by your own :D

 

great share dude I thing is based on the altkarmaplayer.... :D

Posted

+		/************************************************************
+		*
+		* @author Sig'
+		*
+		*************************************************************/

for what you need 5 rows to write the author ?

is not more simple //@author Sig' ... :D

 

  • 2 years later...
Posted

this code has a bug..  if i make heal to flagged player then i flagged too! that's means i can make the bug with pvp pk in peace

zone near buffer..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...