Jump to content

Recommended Posts

Posted

We Present clan War Zone

I made Adapt of Clan War Zone ct2.5(freya) chronicle and i add new functions ,which was share by `Romeo.

http://maxcheaters.com/forum/index.php?topic=257633.0

 

Index: dist/game/config/l2jmods.properties
===================================================================
--- dist/game/config/l2jmods.properties	(revision 5761)
+++ dist/game/config/l2jmods.properties	(working copy)
@@ -426,3 +426,20 @@
# will be 1+2=3. Use 0 or negative value for unlimited number of connections.
# Default: 127.0.0.1,0 (no limits from localhost)
DualboxCheckWhitelist = 127.0.0.1,0
+
+# --------------------------------------------------------------
+# Clan War Zone System                                         -
+# --------------------------------------------------------------
+# Custom Item Reward
+AllowClanwarSystem = False
+# Item id
+ClanRewardItem = 57
+# Item A-beep-t
+ClanRewardA-beep-t = 1
+# Custom Clan Rep. Add
+AllowClanwarRepSystem = False
+# Rep. A-beep-t
+ClanAddRepAm-beep-t = 50
+# --------------------------------------------------------------
+# Clan War Zone System End                                     -
+# --------------------------------------------------------------
\ No newline at end of file
Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java	(revision 5761)
+++ java/com/l2jserver/Config.java	(working copy)
@@ -725,6 +725,11 @@
	public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
	public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
	public static TIntIntHashMap L2JMOD_DUALBOX_CHECK_WHITELIST;
+	public static boolean ALLOW_CLANWAR_REWARD;
+	public static int CLANWAR_REWARD_ITEM;
+	public static int CLANWAR_REWARD_COUNT;
+	public static boolean ALLOW_CLANWAR_REP;
+	public static int CLANWAR_ADD_REP;

	//--------------------------------------------------
	// NPC Settings
@@ -2502,6 +2507,11 @@
							}
						}
					}
+					ALLOW_CLANWAR_REWARD = Boolean.parseBoolean(L2JModSettings.getProperty("AllowClanwarSystem", "False"));
+					CLANWAR_REWARD_ITEM = Integer.parseInt(L2JModSettings.getProperty("ClanRewardItem", "57"));
+					CLANWAR_REWARD_COUNT = Integer.parseInt(L2JModSettings.getProperty("ClanRewardA-beep-t", "1"));
+					ALLOW_CLANWAR_REP = Boolean.parseBoolean(L2JModSettings.getProperty("AllowClanwarRepSystem", "False"));
+					CLANWAR_ADD_REP = Integer.parseInt(L2JModSettings.getProperty("ClanAddRepAm-beep-t", "1"));
				}
				catch (Exception e)
				{
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(revision 5761)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -170,6 +170,7 @@
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
import com.l2jserver.gameserver.model.zone.type.L2BossZone;
+import com.l2jserver.gameserver.model.zone.type.L2ClanWarZone;
import com.l2jserver.gameserver.network.L2GameClient;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.communityserver.CommunityServerThread;
@@ -5683,7 +5684,25 @@
		{
			// Add karma to attacker and increase its PK counter
			setPvpKills(getPvpKills() + 1);
-			
+			L2PcInstance targetPlayer = target.getActingPlayer();
+			if(isInsideZone(ZONE_CLANWAR) & targetPlayer.isInsideZone(ZONE_CLANWAR)
+			&& (getClanId() != targetPlayer.getClanId())
+			&& getClan() != null
+			&& targetPlayer.getClan() != null)
+			{
+				if(Config.ALLOW_CLANWAR_REP)
+				{
+				getClan().addReputationScore(Config.CLANWAR_ADD_REP, true);
+				}	
+				sendMessage("You killed someone from an enemy clan. Your clan gets rewarded with 50 rep points!");
+            if(Config.ALLOW_CLANWAR_REWARD)
+	            		{
+            				// Item Reward system
+            				addItem("Loot", Config.CLANWAR_REWARD_ITEM, Config.CLANWAR_REWARD_COUNT, this, true);
+            				sendMessage("You will be rewarded for someone from en enemy clan member kill!");
+		            	}
+			}
+
			// Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
			sendPacket(new UserInfo(this));
			sendPacket(new ExBrExtraUserInfo(this));
Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Character.java	(revision 5761)
+++ java/com/l2jserver/gameserver/model/actor/L2Character.java	(working copy)
@@ -205,8 +205,9 @@
	public static final byte ZONE_ALTERED = 19;
	public static final byte ZONE_NOBOOKMARK = 20;
	public static final byte ZONE_NOITEMDROP = 21;
+	public static final byte ZONE_CLANWAR = 22;

-	private final byte[] _zones = new byte[22];
+	private final byte[] _zones = new byte[23];
	protected byte _zoneValidateCounter = 4;

	private L2Character _debugger = null;
Index: java/com/l2jserver/gameserver/model/zone/type/L2ClanWarZone.java
===================================================================
--- java/com/l2jserver/gameserver/model/zone/type/L2ClanWarZone.java	(revision 0)
+++ java/com/l2jserver/gameserver/model/zone/type/L2ClanWarZone.java	(working copy)
@@ -0,0 +1,96 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.zone.type;
+
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.zone.L2ZoneType;
+import com.l2jserver.gameserver.model.L2Skill;
+import com.l2jserver.gameserver.datatables.SkillTable;
+import com.l2jserver.gameserver.datatables.MapRegionTable;
+
+/**
+ *
+ * A Clan War Zone
+ *
+ */
+public class L2ClanWarZone extends L2ZoneType
+{
+	public L2ClanWarZone(int id)
+	{
+		super(id);
+	}
+	
+	L2Skill noblesse = SkillTable.getInstance().getInfo(1323, 1);
+	
+	@Override
+	protected void onEnter(L2Character character)
+	{
+       if (character instanceof L2PcInstance)
+       {
+		   L2PcInstance activeChar = ((L2PcInstance) character);
+    	   if(((L2PcInstance)character).getClan() != null)
+    	   {		   
+		   		character.setInsideZone(L2Character.ZONE_CLANWAR, true);
+	    	   ((L2PcInstance)character).sendMessage("You have entered a Clan War Zone. Prepare for fight.");
+				noblesse.getEffects(activeChar, activeChar);
+				if(activeChar.getPvpFlag() == 0)
+				activeChar.updatePvPFlag(1);
+    	   }
+		
+    	   else
+    	   {
+    		   ((L2PcInstance) character).sendMessage("This is strict area for clan members ONLY. You will be teleported at the nearest town.");
+				((L2PcInstance) character).teleToLocation(MapRegionTable.TeleportWhereType.Town);
+    	   }
+		}
+	}
+	
+	@Override
+	protected void onExit(L2Character character)
+	{
+		character.setInsideZone(L2Character.ZONE_CLANWAR, false);
+		if (character instanceof L2PcInstance)
+		{
+			L2PcInstance activeChar = ((L2PcInstance) character);
+			activeChar.stopPvPFlag();
+		}
+	}
+	
+	@Override
+	public void onDieInside(L2Character character)
+	{
+	}
+	
+	@Override
+	public void onReviveInside(L2Character character)
+	{
+		onEnter(character);
+		if (character instanceof L2PcInstance)
+		{
+		L2PcInstance activeChar = ((L2PcInstance) character);
+		noblesse.getEffects(activeChar, activeChar);
+		heal(activeChar);
+		}
+	}
+
+	static void heal(L2PcInstance activeChar)
+	{
+		activeChar.setCurrentHp(activeChar.getMaxHp());
+		activeChar.setCurrentCp(activeChar.getMaxCp());
+		activeChar.setCurrentMp(activeChar.getMaxMp());
+	}
+	
+}
\ No newline at end of file

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

    • never met a programmer that doesnt know english xD and as he said his knowledge and skills are beyond our imagination xD
    • nice work, welcome back to world of lineage development @melron 😄
    • He's likely baiting you to download his source full of backdoors indeed
    • Yeah inside router i had to enable udnp services 
    • Hello cheaters, As a team of avid developers and enthusiasts of Lineage 2, we are excited to present the L2 Control Hub, a groundbreaking plugin designed by myself and my collaborator, StinkyMadness. This innovative tool equips server administrators with powerful automation capabilities directly within the game's community board. L2 Control Hub simplifies the creation and management of automations, enabling you to customize your server operations without the need to modify the source code.   Key Features of L2 Control Hub: Robust Automation Triggers: Select from a plethora of triggers currently available, with continuous additions in the works to enhance your control options. Dynamic Conditions and Actions: Tailor your server operations with an extensive range of conditions and actions, ensuring flexible and precise control over game events and player interactions. Customizable Variables: Easily integrate server-specific variables from your database to further personalize and streamline your automations. Utilize these variables across various automation scenarios to cater to your specific server requirements. JavaScript Integration: Execute custom JavaScript codes that interact seamlessly with Java classes, bringing advanced functionalities to your server's ecosystem.   Explore L2 Control Hub in Action: We've prepared a series of video tutorials to demonstrate the capabilities of L2 Control Hub: Control Hub - Create a Simple Flow with 1 Condition and 1 Action: Get started with basic automations. Control Hub - Multiple Conditions with Multiple Actions: Explore more complex automations for detailed server management. Control Hub - Using Variables: Discover how to implement and use custom variables for tailored automations. Control Hub - Using JavaScript: Experience the power of custom scripts in enhancing your server functionality.   L2 Control Hub is currently about 70% complete, and we are actively developing and refining features. We invite you to join our ➡️ Discord community ⬅️ to engage with the development process, provide feedback, and be the first to test new features. Additionally, any updates or changes to the plugin are seamlessly delivered to all customers directly from our web server, ensuring your system is always up-to-date without the need for manual downloads.   Your game, your rules, automated. Join us in redefining server management in Lineage 2 and elevate your gaming community with unmatched automation capabilities. For more details, contact us directly to get started with L2 Control Hub.   Currently, the plugin is developed using aCis sources. We will continue with these sources until we finalize all the necessary details before proceeding to integrate with the more prominent sources available.       The L2 Control Hub is designed to extend beyond mere functional additions to your server. We are in the process of implementing a suite of advanced mechanisms, such as a vote manager capable of interfacing with any Lineage 2 voting site without requiring configuration, live statistics to provide admins with real-time insights, and an event engine that can generate any desired event within seconds. All these features will be seamlessly integrated into the module, enhancing your server management experience significantly.     Please note that L2 Control Hub will be a premium tool, reflecting the extensive features and benefits it offers. While we are finalizing the pricing structure, rest assured that we aim to deliver great value for your investment. We will announce the cost details soon on our platforms to ensure everyone is well-informed and can plan accordingly. Join us to take your server management to the next level with L2 Control Hub.     
  • Topics

×
×
  • Create New...