Jump to content

Recommended Posts

Posted

First of all hello.

My new share includes disablers for Coliseum Area.

With this patch you can disable Skill Resurrection, Scroll of Resurrection and Potions in zone of coliseum.

 

Index: config/functions/l2jfrozen.properties
===================================================================
--- config/functions/l2jfrozen.properties	(revision 948)
+++ config/functions/l2jfrozen.properties	(working copy)
@@ -280,4 +280,15 @@
ProtectorSkillLevel = 13
ProtectorSkillTime = 600
# Npc Protector Message
-ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
\ No newline at end of file
+ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
+
+#-----------------------------------------------
+# Coliseum Settings By Lekino
+#-----------------------------------------------
+#Allow using skill of resurrection and scroll of ressurection in coliseum?
+#Default: True
+AllowResColiseum = True
+
+#Allow using potions use in coliseum?
+#Default: True
+AllowPotionsColiseum = True
\ No newline at end of file
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java	(revision 948)
+++ head-src/com/l2jfrozen/Config.java	(working copy)
@@ -2378,6 +2378,8 @@
	public static String FARM2_CUSTOM_MESSAGE;
	public static String PVP1_CUSTOM_MESSAGE;
	public static String PVP2_CUSTOM_MESSAGE;
+	public static boolean ALLOW_COLISEUM_RES;
+	public static boolean ALLOW_COLISEUM_POT;		

	//============================================================
	public static void loadL2JFrozenConfig()
@@ -2497,6 +2499,8 @@
			FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!");
			PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!");
			PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
+			ALLOW_COLISEUM_RES = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowResColiseum", "True"));
+			ALLOW_COLISEUM_POT = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowPotionsColiseum", "True"));
		}
		catch(Exception e)
		{
Index: head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java	(working copy)
@@ -50,6 +50,7 @@
import com.l2jfrozen.gameserver.model.zone.type.L2CastleTeleportZone;
import com.l2jfrozen.gameserver.model.zone.type.L2CastleZone;
import com.l2jfrozen.gameserver.model.zone.type.L2ClanHallZone;
+import com.l2jfrozen.gameserver.model.zone.type.L2ColiseumZone;
import com.l2jfrozen.gameserver.model.zone.type.L2CustomZone;
import com.l2jfrozen.gameserver.model.zone.type.L2DamageZone;
import com.l2jfrozen.gameserver.model.zone.type.L2DerbyTrackZone;
@@ -240,6 +241,10 @@
								{
									temp = new L2NoHqZone(zoneId);
								}
+								else if(zoneType.equals("ColiseumArea"))
+								{
+									temp = new L2ColiseumZone(zoneId);
+								}								
								else if(zoneType.equals("BossZone"))
								{
									int boss_id = -1;
Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/Potions.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/Potions.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/Potions.java	(working copy)
@@ -28,6 +28,7 @@
import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.datatables.SkillTable;
import com.l2jfrozen.gameserver.handler.IItemHandler;
+import com.l2jfrozen.gameserver.model.L2Character;
import com.l2jfrozen.gameserver.model.L2Effect;
import com.l2jfrozen.gameserver.model.L2Effect.EffectType;
import com.l2jfrozen.gameserver.model.L2Skill;
@@ -241,6 +242,13 @@
			return;
		}

+		//Check if Character is in coliseum
+		if(activeChar.isInsideZone(L2Character.ZONE_COLISEUM) && !Config.ALLOW_COLISEUM_POT)
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}		
+
		//if(activeChar._inEventCTF && CTF._started && !Config.CTF_ALLOW_POTIONS)
		if(activeChar._inEventCTF && CTF.is_started() && !Config.CTF_ALLOW_POTIONS)
		{
Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/ScrollOfResurrection.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/ScrollOfResurrection.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/ScrollOfResurrection.java	(working copy)
@@ -18,6 +18,7 @@
  */
package com.l2jfrozen.gameserver.handler.itemhandlers;

+import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.datatables.SkillTable;
import com.l2jfrozen.gameserver.handler.IItemHandler;
import com.l2jfrozen.gameserver.managers.CastleManager;
@@ -66,7 +67,12 @@
		{
			activeChar.sendMessage("This Item Cannot Be Used On Olympiad Games.");
		}
-
+		
+		if(activeChar.isInsideZone(L2Character.ZONE_COLISEUM) && !Config.ALLOW_COLISEUM_RES)
+		{
+			activeChar.sendMessage("This item cannot be used on Coliseum");
+		}
+		
		if(activeChar.isMovementDisabled())
			return;

Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Resurrect.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Resurrect.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Resurrect.java	(working copy)
@@ -22,6 +22,7 @@

import javolution.util.FastList;

+import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.handler.ISkillHandler;
import com.l2jfrozen.gameserver.model.L2Character;
import com.l2jfrozen.gameserver.model.L2Object;
@@ -56,6 +57,12 @@
		L2Character target = null;
		L2PcInstance targetPlayer;
		List<L2Character> targetToRes = new FastList<L2Character>();
+		
+		if(activeChar.isInsideZone(L2Character.ZONE_COLISEUM) && !Config.ALLOW_COLISEUM_RES)
+		{
+			activeChar.sendPacket(SystemMessage.sendString("You can't use resurrect skill in coliseum!"));
+			return;
+		}	

		for(L2Object target2 : targets)
		{
Index: head-src/com/l2jfrozen/gameserver/model/L2Character.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/L2Character.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/model/L2Character.java	(working copy)
@@ -339,6 +339,9 @@

	/** The Constant ZONE_DANGERAREA. */
	public static final int ZONE_DANGERAREA = 16384;
+	
+	/** The Constant ZONE_COLISEUM. */
+	public static final int ZONE_COLISEUM = 16385;	

	/** The _current zones. */
	private int _currentZones = 0;
Index: head-src/com/l2jfrozen/gameserver/model/zone/type/L2ColiseumZone.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/zone/type/L2ColiseumZone.java	(revision 0)
+++ head-src/com/l2jfrozen/gameserver/model/zone/type/L2ColiseumZone.java	(revision 0)
@@ -0,0 +1,69 @@
+/* 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 2, 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+package com.l2jfrozen.gameserver.model.zone.type;
+
+import com.l2jfrozen.gameserver.datatables.csv.MapRegionTable;
+import com.l2jfrozen.gameserver.model.L2Character;
+import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.zone.L2ZoneType;
+import com.l2jfrozen.gameserver.network.SystemMessageId;
+import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
+/**
+ * 
+ * @author Leki
+ */
+public class L2ColiseumZone extends L2ZoneType
+{
+	public L2ColiseumZone(int id)
+	{
+		super(id);
+	}
+
+	@Override
+	protected void onEnter(L2Character character)
+	{
+		character.setInsideZone(L2Character.ZONE_PVP, true);
+		character.setInsideZone(L2Character.ZONE_COLISEUM, true);
+		if(character instanceof L2PcInstance)
+		{
+			((L2PcInstance) character).sendPacket(new SystemMessage(SystemMessageId.ENTERED_COMBAT_ZONE));
+		}
+	}
+
+	@Override
+	protected void onExit(L2Character character)
+	{
+		character.setInsideZone(L2Character.ZONE_PVP, false);
+		character.setInsideZone(L2Character.ZONE_COLISEUM, false);
+		
+		if(character instanceof L2PcInstance)
+		{
+			
+			((L2PcInstance) character).sendPacket(new SystemMessage(SystemMessageId.LEFT_COMBAT_ZONE));
+		}
+	}
+
+	@Override
+	public void onDieInside(L2Character character)
+	{}
+
+	@Override
+	public void onReviveInside(L2Character character)
+	{}
+}

 

DP

Index: zone.xml
===================================================================
--- zone.xml	(revision 948)
+++ zone.xml	(working copy)
@@ -17,7 +17,7 @@
		<stat name='spawnY' val='142402'/>
		<stat name='spawnZ' val='-3643'/>
	</zone>
-	<zone id='11012' type='Arena' shape='NPoly' minZ='-3500' maxZ='-3300'>
+	<zone id='11012' type='ColiseumArea' shape='NPoly' minZ='-3500' maxZ='-3300'>
		<stat name='name' val='Coliseum'/>
		<stat name='spawnX' val='147451'/>
		<stat name='spawnY' val='46728'/>

 

If you want to disable something else in coliseum, just add this

activeChar.isInsideZone(L2Character.ZONE_COLISEUM)

 

Credits to me.

If I did something wrong please feedback.

Posted

If I did something wrong please feedback.

 

Yep, you did ;D

 

If you *WHAT* to disable

 

--------

 

Nice share, may be useful :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Hello everyone, Lineage II clan MightyTeam is reopening recruitment and looking for ambitious, active players who want to compete seriously and grow together. We are building a disciplined and organized environment focused on teamwork, strategy, and long-term success. What we offer: Strong and experienced leadership, Fair and respectful treatment for every member, Organized clan structure and tactical gameplay, Competitive mentality with clear goals, Stable and drama-free environment, What we expect: Activity and willingness to improve, Teamplay and communication, Respect toward clan members, Motivation to compete and dominate, No politics. No toxicity. Only focused players with the right mentality.   If you are interested in joining MightyTeam, contact on Discord: tzelal.  <-- there is a dot  or Telegram tz3gg. 
    • Lol thanks no l better get Acis /Lucera/Mobius and will squeeze more profit that your crazy ass price files for fucks know what. Even Reborn was smart enough use Acis after Lucera to squeeze shit a lot of money 😁 Fucking hell 15 grants lol 😂 
    • It seems the SkyLord is simply not familiar with what l2-scripts and Bonux represents today. His opinion is likely based on our older materials — which is understandable. We haven't been standing still. Over the years, the studio has moved to a fundamentally different level of development. Our early builds are still available on the legacy site at very accessible prices — and they remain entirely viable for launching a project. As practice shows, solid servers can still be built on them, albeit with greater effort. As for the market — Classic, Essence, and Main have long been running on l2-scripts engines, and the majority of successful servers have, at one stage or another, used our source code as their foundation. This isn't self-promotion — it's the history of the industry. Today, for established projects with a reputation, we offer a different format: private partnership with individual terms tailored to your business goals. If you're interested in long-term collaboration — we're open to the conversation. We have solutions for every level — from newcomers to top-tier projects. Feel free to reach out, and we'll be happy to discuss.
    • implemented Black Market NPC that can copy and make discount on desired multisells , spawns despawns and fully configurable with schedule and random timer   implemented Dungeon Finder , fully configurable for custom dungeons and can be accessed from 2-9 party size. Your choice! 
    • https://en.l2oops.com/chronicle/lineage-2-essence   almost all the servers on here are using l2scripts or bonux files..
  • 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..