Jump to content

[Share]Coliseum Disablers


Recommended Posts

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.

Link to comment
Share on other sites

If I did something wrong please feedback.

 

Yep, you did ;D

 

If you *WHAT* to disable

 

--------

 

Nice share, may be useful :)

Link to comment
Share on other sites

Very nice work , good code but can i ask if this works for High Five?

Never try packs of HF, probably you should make several changes to adapt it.

good luck.

Link to comment
Share on other sites

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

    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt  
    • Server Rates: » Xp 500x. » Sp 500x. » Aden 500x. » Drop 1x. » PartyXp 2x. » PartySp 2x. » Starting character level -61. Enchant rates: » Safe enchant +4. » Blessed and simple scrolls max enchant (+16). » Crystal scrolls max enchant (+20). » Simple enchant scrolls chance – 65%. » Blessed enchant scrolls chance – 100%. » Crystal enchant scrolls chance – 50% Augmentations: » Mid life stone skill chance – 5%. » High life stone skill chance – 10%. » Top life stone skill chance – 20%. » Augments 1+1 Unique features: » Main town – Giran » Automatic-Manual Potions. » Working 2 castle sieges. (Giran-Aden) » SPS cancel lasts 10 seconds and than buffs come back. » Stackable scrolls, lifestones, book of giants. » Unique pvp zone » More then 11 active raid bosses. » Wedding system. » Unique farming areas. » Npc skill enchanter. » Full npc buffer with auto buff. » Max count of buffs – 55. » Max subclasses – 4. » Free and no quest class change. » Free and no quest sub class. » Raid boss drop nobless item. » No weight limit. » Unique protection anti-hwy armor for archers/daggers etc. » Ingame password change. » Top pvp/pk/online ranks NPC. » Unique monsters & NPC. » Interlude retail skills. » Server up-time [24/7] [99]%. » Perfect class balance (all class can kill all class depending on players skill and setup knowledge,gear,augmentations). » Announcements on double kills triple kills etc. » Announcements on Grand Boss death , with the name of the killer as well as clan name of the player. » Information Npc in game with all servers infromations. Custom server gear : 1). Titanium Armor Lv.1 2). Epic Armor Lv.2 3). Epic Weapons-Kamikaze-Black S grade (Same Stats) 4). Demonic-Angelic Wings-Baium Hair-Custom Accessories (SameStats) 5). Custom Fighter/Mage tattoo Lv1-Lv2-Lv3 6). Shirt (STR,CON,INT +1) 7). Custom Shields Server Commands: .tvtjoin .tvtleave – Join or leave tvt event. .ctfjoin .ctfleave – Join or leave ctf event. .dmjoin .dmleave – Join of leave dm event. .online – current online players count. .repair – repairs stuck character in world. .menu – opens online menu panel. .exit – PVP zone exit in case you are bullied. .changepassword - Opens online menu then u can change ur password in game. .farm - Enable/disable autofarm Event system: » TVT event » CTF event » DM event » Tournament Event » Party Zone » Unique event shop. Olympiad game: » Retail olympiad game. » Competition period [1] week. » Olympiad start time [18:00] end [00:00] GMT+2. » New Heroes every Sunday.
    • Tomorrow grand opening lests go 🙂 
    • New season of Warfire X150 has been postponed to September 28th.
  • Topics

×
×
  • Create New...