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.



  • Posts

    • Hello, I add this code here https://maxcheaters.com/topic/248730-agathions-acis-401-does-not-interfere-with-summons-or-pets/.     but i have problem with agathion movement, agathion does not move when the player moves. The player must stop moving for Agathion to come close him.   i think the problem is here at < _followTask = ThreadPool.scheduleAtFixedRate(new Follow(this), 1000, 1000); >>       public void followToOwner()     {                  if (_followTask == null)             _followTask = ThreadPool.scheduleAtFixedRate(new Follow(this), 1000, 1000);                                  int rnd = Rnd.get(-30, +30);         SpawnLocation loc = _owner.getPosition();                          if (!checkIfInRange(1000, this, _owner))             teleport(_owner, 30);                  if (_owner.isMoving())             getAI().tryToFollow(_owner, false);         else         {             if (!checkIfInRange(75, this, _owner))                 getAI().tryToMoveTo(new Location(loc.getX()+rnd, loc.getY()+rnd, loc.getZ()), null);             else if (checkIfInRange(30, this, _owner))                 getAI().tryToIdle();                              if (Config.AGATHION_HEAL_OWNER && !getCast().isCastingNow())             {                 if (_owner.isInOlympiadMode() || _owner.isInDuel() || _owner.getPvpFlag() != 0 || _owner.isInsideZone(ZoneId.PVP) || _owner.getKarma() != 0)                     return;                                  if ((_owner.getStatus().getHpRatio() < Config.AGATHION_PERCENT_TO_HEAL))                     getAI().tryToCast(_owner, 1011, 18);             }             else if (!Config.AGATHION_ONLY_FOLLOW && Config.AGATHION_ALLOW_SOCIAL && !isMoving() && !getCast().isCastingNow())                 broadcastPacket(new SocialAction(this, 1));         }  
    • Price reduction for Google accounts from 6-12 months after registration - only 0.3157$ each. Top up with Gmail accounts with activated 2FA - 0.3507$ each!
    • We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX! Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
    • Hello everyone! L2 Imagination High Five - New Seasson is here!       OPEN BETA from 17.03.2025 LIVE START 21.03.2025 GMT+1      Rates: XP/SP 25x, Spoil 15x, Drop 10x, Adena 10x   Server Features: Free Auto-Farm, Castle Instance, Daily Reward Calendar, Adena Boxes VIP Gold Color Chat, Unique Olympiad Extra Points Engine, GvG Event Solo Instance, PvP Solo Rift, Automatic GvG Event, Improved Orfen and Core Areas Lair of Antharas and Dragon Valley alternating PvP and Normal  every hour 6:00PM-0:00AM      Website: https://www.l2imagination.com  Discord: https://discord.com/invite/frCaDM4Bhg
  • Topics

×
×
  • Create New...