Jump to content

Question

Posted

Hello everyone!
I have a FlagZone on my L2JSunrise server. and I would like to block some skils in there. For example: I already blocked not to form party there. but one player goes bishop, enters and heals another individual player. I don't think it's fair to ban the cardinal class from entering, because there are other skil classes to heal. so I wanted to create a rule not to use certain skils inside FlagZone. it's possible? for example, a config that I put the id of skils that can't be used in there.

8 answers to this question

Recommended Posts

  • 0
Posted (edited)

Simply put your check on Creature#checkDoCastConditions(L2Skill) - other name for Creature : L2Character.

 

Something like

 

if (isInsideZone(ZoneId.FLAGZONE) && ArrayUtils.contains(Config.ALLOWED_SKILLS_ON_FLAGZONE, skill.getId()))
{
	sendPacket(ActionFailed.STATIC_PACKET);
	return false;
}

Just after this first block

 

		if (skill == null || isSkillDisabled(skill))
		{
			// Send ActionFailed to the Player
			sendPacket(ActionFailed.STATIC_PACKET);
			return false;
		}

You have to build the Config, it's a simple int[]. The provided exemple is enough if all skills are blocked the same way on all flagzones.

 

-----

 

If you need specific skills being blocked on specific FlagZone (one FlagZone stops all heals, another stop aggro skills,...), you can also hold that Config on the zone itself, and then interrogate which zone you currently are to retrieve the correct int array, but it needs more work.

Edited by Tryskell
  • Like 1
  • 0
Posted

How do I add this restriction? can you help me? I am not yet a java programmer. I am starting the first semester in ADS.  It is and my FlagZone

 

/*
 * 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 l2r.gameserver.model.zone.type;

import l2r.gameserver.ThreadPoolManager;
import l2r.gameserver.data.xml.impl.SkillData;
import l2r.gameserver.enums.MessageType;
import l2r.gameserver.enums.ZoneIdType;
import l2r.gameserver.model.actor.L2Character;
import l2r.gameserver.model.actor.instance.L2PcInstance;
import l2r.gameserver.model.zone.L2ZoneType;
import l2r.gameserver.network.serverpackets.MagicSkillUse;
import l2r.util.Rnd;

import gr.sr.configsEngine.configs.impl.FlagZoneConfigs;

/**
 * @author -=GodFather=-
 */
public class L2FlagZone extends L2ZoneType
{
	public L2FlagZone(int id)
	{
		super(id);
	}
	
	@Override
	protected void onEnter(L2Character character)
	{
		if (FlagZoneConfigs.ENABLE_FLAG_ZONE && character.isPlayer())
		{
			L2PcInstance activeChar = character.getActingPlayer();
			activeChar.setInsideZone(ZoneIdType.FLAG, true);
			activeChar.setInsideZone(ZoneIdType.NO_SUMMON_FRIEND, true);
			activeChar.setInsideZone(ZoneIdType.NO_STORE, true);
			activeChar.setInsideZone(ZoneIdType.NO_BOOKMARK, true);
			activeChar.setInsideZone(ZoneIdType.NO_ITEM_DROP, true);
			
			SkillData.getInstance().getInfo(1323, 1).getEffects(activeChar, activeChar);
			
			if (FlagZoneConfigs.AUTO_FLAG_ON_ENTER)
			{
				activeChar.setPvpFlag(1);
			}
			if (FlagZoneConfigs.ENABLE_ANTIFEED_PROTECTION)
			{
				activeChar.startAntifeedProtection(true);
			}
			
			activeChar.broadcastUserInfo();
			
			if (activeChar.getParty() != null)
			{
				activeChar.getParty().removePartyMember(activeChar, MessageType.None);
			}
		}
	}
	
	@Override
	protected void onExit(final L2Character character)
	{
		if (FlagZoneConfigs.ENABLE_FLAG_ZONE && character.isPlayer())
		{
			L2PcInstance activeChar = character.getActingPlayer();
			activeChar.setInsideZone(ZoneIdType.FLAG, false);
			activeChar.setInsideZone(ZoneIdType.NO_SUMMON_FRIEND, false);
			activeChar.setInsideZone(ZoneIdType.NO_STORE, false);
			activeChar.setInsideZone(ZoneIdType.NO_BOOKMARK, false);
			activeChar.setInsideZone(ZoneIdType.NO_ITEM_DROP, false);
			
			if (FlagZoneConfigs.AUTO_FLAG_ON_ENTER)
			{
				activeChar.setPvpFlag(0);
			}
			if (FlagZoneConfigs.ENABLE_ANTIFEED_PROTECTION)
			{
				activeChar.startAntifeedProtection(false);
			}
			
			activeChar.broadcastUserInfo();
		}
	}
	
	@Override
	public void onDieInside(final L2Character character)
	{
		if (FlagZoneConfigs.ENABLE_FLAG_ZONE && FlagZoneConfigs.ENABLE_FLAG_ZONE_AUTO_REVIVE && character.isPlayer())
		{
			final L2PcInstance activeChar = character.getActingPlayer();
			if (FlagZoneConfigs.SHOW_DIE_ANIMATION)
			{
				final MagicSkillUse msu = new MagicSkillUse(activeChar, activeChar, 23096, 1, 1, 1);
				activeChar.broadcastPacket(msu);
			}
			
			if (FlagZoneConfigs.ENABLE_FLAG_ZONE_AUTO_REVIVE)
			{
				activeChar.sendMessage("Get ready! You will be revived in " + FlagZoneConfigs.FLAG_ZONE_REVIVE_DELAY + " seconds!");
				ThreadPoolManager.getInstance().scheduleGeneral(() ->
				{
					if (activeChar.isDead())
					{
						activeChar.doRevive();
						int r = Rnd.get(FlagZoneConfigs.FLAG_ZONE_AUTO_RES_LOCS_COUNT);
						activeChar.teleToLocation(FlagZoneConfigs.xCoords[r], FlagZoneConfigs.yCoords[r], FlagZoneConfigs.zCoords[r]);
					}
				}, FlagZoneConfigs.FLAG_ZONE_REVIVE_DELAY * 1000);
			}
		}
	}
	
	@Override
	public void onReviveInside(L2Character character)
	{
		if (FlagZoneConfigs.ENABLE_FLAG_ZONE && character.isPlayer())
		{
			L2PcInstance activeChar = character.getActingPlayer();
			SkillData.getInstance().getInfo(1323, 1).getEffects(activeChar, activeChar);
			activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
			activeChar.setCurrentCp(activeChar.getMaxCp());
		}
	}
}

 

  • 0
Posted
<stat name='classes' val='97,105,112' />
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java	(revision 1132)
+++ head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java	(working copy)
@@ -56,6 +56,7 @@
 import com.l2jfrozen.gameserver.model.zone.type.L2DerbyTrackZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2EffectZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2FishingZone;
+import com.l2jfrozen.gameserver.model.zone.type.L2FlagZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2FortZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2JailZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2MotherTreeZone;
@@ -268,6 +269,8 @@
 									case "SwampZone":
 										temp = new L2SwampZone(zoneId);
 										break;
+									case "FlagZone":
+										temp = new L2FlagZone(zoneId);
 								}
 								
 								// Check for unknown type
Index: head-src/com/l2jfrozen/gameserver/model/zone/type/L2FlagZone.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/zone/type/L2FlagZone.java	(nonexistent)
+++ head-src/com/l2jfrozen/gameserver/model/zone/type/L2FlagZone.java	(working copy)
@@ -0,0 +1,258 @@
+/*
+ * 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 <[url="http://www.gnu.org/licenses/>."]http://www.gnu.org/licenses/>.[/url]
+ */
+package com.l2jfrozen.gameserver.model.zone.type;
+
+import java.util.List;
+import java.util.concurrent.Future;
+
+import javolution.util.FastList;
+
+import com.l2jfrozen.gameserver.datatables.SkillTable;
+import com.l2jfrozen.gameserver.model.L2Character;
+import com.l2jfrozen.gameserver.model.L2Skill;
+import com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
+import com.l2jfrozen.gameserver.model.zone.L2ZoneType;
+import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
+import com.l2jfrozen.util.random.Rnd;
+
+/**
+ * @author Strato
+ * @author Elfocrash (for the correction)
+ */
+public class L2FlagZone extends L2ZoneType
+{
+	int _skillId, _skillLvl;
+	private int _chance;
+	private int _initialDelay;
+	private int _reuse;
+	private boolean _enabled;
+	private String _target;
+	private Future<?> _task;
+	private static List<Integer> _forbiddenClasses = new FastList<>();
+	
+	public L2FlagZone(int id)
+	{
+		super(id);
+		_skillId = 1323;
+		_skillLvl = 1;
+		_chance = 100;
+		_initialDelay = 0;
+		_reuse = 30000;
+		_enabled = true;
+		_target = "pc";
+	}
+	
+	@Override
+	public void setParameter(String name, String value)
+	{
+		if (name.equals("skillId"))
+		{
+			_skillId = Integer.parseInt(value);
+		}
+		else if (name.equals("skillLvl"))
+		{
+			_skillLvl = Integer.parseInt(value);
+		}
+		else if (name.equals("chance"))
+		{
+			_chance = Integer.parseInt(value);
+		}
+		else if (name.equals("initialDelay"))
+		{
+			_initialDelay = Integer.parseInt(value);
+		}
+		else if (name.equals("default_enabled"))
+		{
+			_enabled = Boolean.parseBoolean(value);
+		}
+		else if (name.equals("target"))
+		{
+			_target = String.valueOf(value);
+		}
+		else if (name.equals("reuse"))
+		{
+			_reuse = Integer.parseInt(value);
+		}
+		else if (name.equals("classes"))
+		{
+			String[] propertySplit = value.split(",");
+			for (String classId : propertySplit)
+			{
+				int classes = Integer.parseInt(classId);
+				_forbiddenClasses.add(classes);
+			}
+		}
+		else
+		{
+			super.setParameter(name, value);
+		}
+	}
+	
+	@Override
+	protected void onEnter(L2Character character)
+	{
+		if (character instanceof L2PcInstance)
+		{
+			character.setInsideZone(L2Character.ZONE_NOSUMMONFRIEND, true);
+			character.setInsideZone(L2Character.ZONE_NO_HEALER, true);
+			if (isForbiddenClass(((L2PcInstance) character)))
+			{
+				for (L2Skill skill : character.getAllSkills())
+				{
+					switch (skill.getSkillType())
+					{
+						case HEAL:
+						case HEAL_PERCENT:
+						case BALANCE_LIFE:
+						case RESURRECT:
+							((L2PcInstance) character).disableSkill(skill);
+							((L2PcInstance) character).sendSkillList();
+							break;
+					}
+				}
+			}
+			
+			// Set pvp flag
+			((L2PcInstance) character).setPvpFlag(1);
+			((L2PcInstance) character).sendMessage("Entrando em Zona Flag!!!");
+			((L2PcInstance) character).broadcastUserInfo();
+			if ((character instanceof L2PlayableInstance && _target.equalsIgnoreCase("pc") || character instanceof L2PcInstance && _target.equalsIgnoreCase("pc_only") || character instanceof L2MonsterInstance && _target.equalsIgnoreCase("npc")) && _task == null)
+			{
+				_task = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new ApplySkill(/* this */), _initialDelay, _reuse);
+			}
+		}
+	}
+	
+	@Override
+	protected void onExit(L2Character character)
+	{
+		if (character instanceof L2PcInstance)
+		{
+			character.setInsideZone(L2Character.ZONE_NOSUMMONFRIEND, false);
+			character.setInsideZone(L2Character.ZONE_NO_HEALER, false);
+			if (isForbiddenClass(((L2PcInstance) character)))
+			{
+				for (L2Skill skill : character.getAllSkills())
+				{
+					switch (skill.getSkillType())
+					{
+						case HEAL:
+						case HEAL_PERCENT:
+						case BALANCE_LIFE:
+						case RESURRECT:
+							((L2PcInstance) character).enableSkill(skill);
+							((L2PcInstance) character).sendSkillList();
+							break;
+					}
+				}
+			}
+			
+			((L2PcInstance) character).setPvpFlag(0);
+			((L2PcInstance) character).sendMessage("Saindo da Zona de Flag!!");
+			((L2PcInstance) character).broadcastUserInfo();
+		}
+		if (_characterList.isEmpty() && _task != null)
+		{
+			_task.cancel(true);
+			_task = null;
+		}
+	}
+	
+	public L2Skill getSkill()
+	{
+		return SkillTable.getInstance().getInfo(_skillId, _skillLvl);
+	}
+	
+	public String getTargetType()
+	{
+		return _target;
+	}
+	
+	public boolean isEnabled()
+	{
+		return _enabled;
+	}
+	
+	public int getChance()
+	{
+		return _chance;
+	}
+	
+	public void setZoneEnabled(boolean val)
+	{
+		_enabled = val;
+	}
+	
+	class ApplySkill implements Runnable
+	{
+		@Override
+		public void run()
+		{
+			if (isEnabled())
+			{
+				for (L2Character temp : _characterList.values())
+				{
+					if (temp != null && !temp.isDead())
+					{
+						if ((temp instanceof L2PlayableInstance && getTargetType().equalsIgnoreCase("pc") || temp instanceof L2PcInstance && getTargetType().equalsIgnoreCase("pc_only") || temp instanceof L2MonsterInstance && getTargetType().equalsIgnoreCase("npc")) && Rnd.get(100) < getChance())
+						{
+							L2Skill skill = null;
+							if ((skill = getSkill()) == null)
+							{
+								System.out.println("ATTENTION: error on zone with id " + getId());
+								System.out.println("Skill " + _skillId + "," + _skillLvl + " not present between skills");
+							}
+							else
+								skill.getEffects(temp, temp);
+						}
+					}
+				}
+			}
+		}
+	}
+	
+	public static boolean isForbiddenClass(L2PcInstance player)
+	{
+		if (player.isGM())
+			return false;
+		
+		if (_forbiddenClasses == null)
+			return false;
+		
+		if (_forbiddenClasses.contains(player.getClassId().getId()))
+			return true;
+		
+		return false;
+	}
+	
+	public static List<Integer> getForbiddenClasses()
+	{
+		return _forbiddenClasses;
+	}
+	
+	@Override
+	public void onDieInside(L2Character character)
+	{
+		
+	}
+	
+	@Override
+	public void onReviveInside(L2Character character)
+	{
+		onEnter(character);
+	}
+}
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/model/L2Character.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/L2Character.java	(revision 1132)
+++ head-src/com/l2jfrozen/gameserver/model/L2Character.java	(working copy)
@@ -322,8 +322,8 @@
 	/** The Constant ZONE_CLANHALL. */
 	public static final int ZONE_CLANHALL = 16;
 	
-	/** The Constant ZONE_UNUSED. */
-	public static final int ZONE_UNUSED = 32;
+	/** The Constant ZONE_NO_HEALER. */
+	public static final int ZONE_NO_HEALER = 32;
 	
 	/** The Constant ZONE_NOLANDING. */
 	public static final int ZONE_NOLANDING = 64;
DATAPACK

### Eclipse Workspace Patch 1.0
#P L2jFrozen_DataPack
Index: data/zones/zone.xml
===================================================================
--- data/zones/zone.xml	(revision 1132)
+++ data/zones/zone.xml	(working copy)
@@ -275,11 +275,13 @@
 		<spawn X='17577' Y='170128' Z='-3534'/>
 		<spawn X='19737' Y='170976' Z='-3583'/>
 	</zone>
-<zone id='11037' type='Town' shape='Cuboid' minZ='-3500' maxZ='-3400'>
+<!--  <zone id='11037' type='Town' shape='Cuboid' minZ='-3500' maxZ='-3400'> -->
+	<zone id='11037' type='FlagZone' shape='Cuboid' minZ='-3800' maxZ='-3100'>
 		<stat name='name' val='Primeval Isle'/>
 		<stat name='townId' val='19'/>
 		<stat name='taxById' val='8'/>
 		<stat name='noPeace' val='true'/>
+		<stat name='classes' val='97,105,112' />
 		<spawn X='10468' Y='-24569' Z='-3645'/>
 		<spawn X='10928' Y='-24641' Z='-3643'/>
 		<spawn X='8480' Y='-23706' Z='-3727'/>
 

 

  • 0
Posted
3 hours ago, MairHost said:

<stat name='classes' val='97,105,112' />

#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java	(revision 1132)
+++ head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java	(working copy)
@@ -56,6 +56,7 @@
 import com.l2jfrozen.gameserver.model.zone.type.L2DerbyTrackZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2EffectZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2FishingZone;
+import com.l2jfrozen.gameserver.model.zone.type.L2FlagZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2FortZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2JailZone;
 import com.l2jfrozen.gameserver.model.zone.type.L2MotherTreeZone;
@@ -268,6 +269,8 @@
 									case "SwampZone":
 										temp = new L2SwampZone(zoneId);
 										break;
+									case "FlagZone":
+										temp = new L2FlagZone(zoneId);
 								}
 								
 								// Check for unknown type
Index: head-src/com/l2jfrozen/gameserver/model/zone/type/L2FlagZone.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/zone/type/L2FlagZone.java	(nonexistent)
+++ head-src/com/l2jfrozen/gameserver/model/zone/type/L2FlagZone.java	(working copy)
@@ -0,0 +1,258 @@
+/*
+ * 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 <[url="http://www.gnu.org/licenses/>."]http://www.gnu.org/licenses/>.[/url]
+ */
+package com.l2jfrozen.gameserver.model.zone.type;
+
+import java.util.List;
+import java.util.concurrent.Future;
+
+import javolution.util.FastList;
+
+import com.l2jfrozen.gameserver.datatables.SkillTable;
+import com.l2jfrozen.gameserver.model.L2Character;
+import com.l2jfrozen.gameserver.model.L2Skill;
+import com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
+import com.l2jfrozen.gameserver.model.zone.L2ZoneType;
+import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
+import com.l2jfrozen.util.random.Rnd;
+
+/**
+ * @author Strato
+ * @author Elfocrash (for the correction)
+ */
+public class L2FlagZone extends L2ZoneType
+{
+	int _skillId, _skillLvl;
+	private int _chance;
+	private int _initialDelay;
+	private int _reuse;
+	private boolean _enabled;
+	private String _target;
+	private Future<?> _task;
+	private static List<Integer> _forbiddenClasses = new FastList<>();
+	
+	public L2FlagZone(int id)
+	{
+		super(id);
+		_skillId = 1323;
+		_skillLvl = 1;
+		_chance = 100;
+		_initialDelay = 0;
+		_reuse = 30000;
+		_enabled = true;
+		_target = "pc";
+	}
+	
+	@Override
+	public void setParameter(String name, String value)
+	{
+		if (name.equals("skillId"))
+		{
+			_skillId = Integer.parseInt(value);
+		}
+		else if (name.equals("skillLvl"))
+		{
+			_skillLvl = Integer.parseInt(value);
+		}
+		else if (name.equals("chance"))
+		{
+			_chance = Integer.parseInt(value);
+		}
+		else if (name.equals("initialDelay"))
+		{
+			_initialDelay = Integer.parseInt(value);
+		}
+		else if (name.equals("default_enabled"))
+		{
+			_enabled = Boolean.parseBoolean(value);
+		}
+		else if (name.equals("target"))
+		{
+			_target = String.valueOf(value);
+		}
+		else if (name.equals("reuse"))
+		{
+			_reuse = Integer.parseInt(value);
+		}
+		else if (name.equals("classes"))
+		{
+			String[] propertySplit = value.split(",");
+			for (String classId : propertySplit)
+			{
+				int classes = Integer.parseInt(classId);
+				_forbiddenClasses.add(classes);
+			}
+		}
+		else
+		{
+			super.setParameter(name, value);
+		}
+	}
+	
+	@Override
+	protected void onEnter(L2Character character)
+	{
+		if (character instanceof L2PcInstance)
+		{
+			character.setInsideZone(L2Character.ZONE_NOSUMMONFRIEND, true);
+			character.setInsideZone(L2Character.ZONE_NO_HEALER, true);
+			if (isForbiddenClass(((L2PcInstance) character)))
+			{
+				for (L2Skill skill : character.getAllSkills())
+				{
+					switch (skill.getSkillType())
+					{
+						case HEAL:
+						case HEAL_PERCENT:
+						case BALANCE_LIFE:
+						case RESURRECT:
+							((L2PcInstance) character).disableSkill(skill);
+							((L2PcInstance) character).sendSkillList();
+							break;
+					}
+				}
+			}
+			
+			// Set pvp flag
+			((L2PcInstance) character).setPvpFlag(1);
+			((L2PcInstance) character).sendMessage("Entrando em Zona Flag!!!");
+			((L2PcInstance) character).broadcastUserInfo();
+			if ((character instanceof L2PlayableInstance && _target.equalsIgnoreCase("pc") || character instanceof L2PcInstance && _target.equalsIgnoreCase("pc_only") || character instanceof L2MonsterInstance && _target.equalsIgnoreCase("npc")) && _task == null)
+			{
+				_task = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new ApplySkill(/* this */), _initialDelay, _reuse);
+			}
+		}
+	}
+	
+	@Override
+	protected void onExit(L2Character character)
+	{
+		if (character instanceof L2PcInstance)
+		{
+			character.setInsideZone(L2Character.ZONE_NOSUMMONFRIEND, false);
+			character.setInsideZone(L2Character.ZONE_NO_HEALER, false);
+			if (isForbiddenClass(((L2PcInstance) character)))
+			{
+				for (L2Skill skill : character.getAllSkills())
+				{
+					switch (skill.getSkillType())
+					{
+						case HEAL:
+						case HEAL_PERCENT:
+						case BALANCE_LIFE:
+						case RESURRECT:
+							((L2PcInstance) character).enableSkill(skill);
+							((L2PcInstance) character).sendSkillList();
+							break;
+					}
+				}
+			}
+			
+			((L2PcInstance) character).setPvpFlag(0);
+			((L2PcInstance) character).sendMessage("Saindo da Zona de Flag!!");
+			((L2PcInstance) character).broadcastUserInfo();
+		}
+		if (_characterList.isEmpty() && _task != null)
+		{
+			_task.cancel(true);
+			_task = null;
+		}
+	}
+	
+	public L2Skill getSkill()
+	{
+		return SkillTable.getInstance().getInfo(_skillId, _skillLvl);
+	}
+	
+	public String getTargetType()
+	{
+		return _target;
+	}
+	
+	public boolean isEnabled()
+	{
+		return _enabled;
+	}
+	
+	public int getChance()
+	{
+		return _chance;
+	}
+	
+	public void setZoneEnabled(boolean val)
+	{
+		_enabled = val;
+	}
+	
+	class ApplySkill implements Runnable
+	{
+		@Override
+		public void run()
+		{
+			if (isEnabled())
+			{
+				for (L2Character temp : _characterList.values())
+				{
+					if (temp != null && !temp.isDead())
+					{
+						if ((temp instanceof L2PlayableInstance && getTargetType().equalsIgnoreCase("pc") || temp instanceof L2PcInstance && getTargetType().equalsIgnoreCase("pc_only") || temp instanceof L2MonsterInstance && getTargetType().equalsIgnoreCase("npc")) && Rnd.get(100) < getChance())
+						{
+							L2Skill skill = null;
+							if ((skill = getSkill()) == null)
+							{
+								System.out.println("ATTENTION: error on zone with id " + getId());
+								System.out.println("Skill " + _skillId + "," + _skillLvl + " not present between skills");
+							}
+							else
+								skill.getEffects(temp, temp);
+						}
+					}
+				}
+			}
+		}
+	}
+	
+	public static boolean isForbiddenClass(L2PcInstance player)
+	{
+		if (player.isGM())
+			return false;
+		
+		if (_forbiddenClasses == null)
+			return false;
+		
+		if (_forbiddenClasses.contains(player.getClassId().getId()))
+			return true;
+		
+		return false;
+	}
+	
+	public static List<Integer> getForbiddenClasses()
+	{
+		return _forbiddenClasses;
+	}
+	
+	@Override
+	public void onDieInside(L2Character character)
+	{
+		
+	}
+	
+	@Override
+	public void onReviveInside(L2Character character)
+	{
+		onEnter(character);
+	}
+}
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/model/L2Character.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/L2Character.java	(revision 1132)
+++ head-src/com/l2jfrozen/gameserver/model/L2Character.java	(working copy)
@@ -322,8 +322,8 @@
 	/** The Constant ZONE_CLANHALL. */
 	public static final int ZONE_CLANHALL = 16;
 	
-	/** The Constant ZONE_UNUSED. */
-	public static final int ZONE_UNUSED = 32;
+	/** The Constant ZONE_NO_HEALER. */
+	public static final int ZONE_NO_HEALER = 32;
 	
 	/** The Constant ZONE_NOLANDING. */
 	public static final int ZONE_NOLANDING = 64;
DATAPACK

### Eclipse Workspace Patch 1.0
#P L2jFrozen_DataPack
Index: data/zones/zone.xml
===================================================================
--- data/zones/zone.xml	(revision 1132)
+++ data/zones/zone.xml	(working copy)
@@ -275,11 +275,13 @@
 		<spawn X='17577' Y='170128' Z='-3534'/>
 		<spawn X='19737' Y='170976' Z='-3583'/>
 	</zone>
-<zone id='11037' type='Town' shape='Cuboid' minZ='-3500' maxZ='-3400'>
+<!--  <zone id='11037' type='Town' shape='Cuboid' minZ='-3500' maxZ='-3400'> -->
+	<zone id='11037' type='FlagZone' shape='Cuboid' minZ='-3800' maxZ='-3100'>
 		<stat name='name' val='Primeval Isle'/>
 		<stat name='townId' val='19'/>
 		<stat name='taxById' val='8'/>
 		<stat name='noPeace' val='true'/>
+		<stat name='classes' val='97,105,112' />
 		<spawn X='10468' Y='-24569' Z='-3645'/>
 		<spawn X='10928' Y='-24641' Z='-3643'/>
 		<spawn X='8480' Y='-23706' Z='-3727'/>
 

 

I don't wanna undo my flagzone. I just want to block some skils in there. and this is yours too for l2jfrozen

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
Answer this question...

×   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

    • Gaining attention on Instagram today is more competitive than ever. Whether you're a content creator, entrepreneur, or influencer, building a loyal audience is essential—but often slow. That’s why many users turn to free Instagram followers to kickstart their growth and establish credibility early. With services like GoupSocial, you no longer have to wait months to build traction. By using tools such as instagram followers panel free and free smm panels, you can gain real followers and reach your goals faster. Why Free Instagram Followers Make a Difference Let’s face it—numbers matter. A higher follower count directly affects how others see your brand or profile. When people visit your account and see a big audience, they’re more likely to trust you, follow you, and engage with your content. Here’s how free Instagram followers impact your account: ✅ Boosted credibility: People associate large followings with trust and value. ✅ Greater reach: The Instagram algorithm favors high-engagement accounts. ✅ Brand appeal: Businesses want to collaborate with profiles that already have visibility. ✅ Faster momentum: Platforms like instagram free followers panel eliminate slow, organic-only growth paths. Add tools like free ig likes every 24 hours, and you're not just growing—you’re staying active and visible across the platform. Top Benefits of Using Free Instagram Followers 1. Gain Social Proof Instantly When visitors see a high follower count, it validates your profile. Tools like idigic Instagram followers allow you to generate this social proof fast—without compromising on quality. 2. Consistent Engagement With Likes and Views Pairing followers with tools like free ig likes every 24 hours ensures your content gets seen and interacted with. The algorithm loves engagement, and this keeps your posts fresh and prioritized. 3. Easier Entry Into Explore Page Profiles with high engagement have a better shot at being featured on trending pages. Platforms like igtools followers can help drive those early signals Instagram uses to recommend content. 4. Save Time While Looking Organic Building your presence takes time—unless you have help. With instagram free followers 100 real services, your account grows quickly and still looks natural, without spammy or fake-looking numbers. 5. Attract Collaborations With Brands Businesses look for influencers who can amplify their message. When your profile has strong numbers—boosted via instagram free followers like and free smm panels—you’re more likely to land partnerships and deals. Is It Safe to Get Free Instagram Followers? Yes, if done correctly. The key is using trusted sources. Some platforms fill your profile with bots, which can get your account flagged or banned. That’s why services like GoupSocial are essential—they deliver real, safe engagement through tools like instagram followers panel free. With idigic Instagram followers or igtools followers, the goal isn’t just more numbers—it’s smart, consistent growth that Instagram’s algorithm can respect. How to Use GoupSocial to Get Free Instagram Followers Getting started is simple: 🖊️ Enter your Instagram username 🎯 Choose the number of followers you want 🚀 Click "submit" and watch your count increase in real time Whether you want to test the waters with a few followers or boost engagement with free ig likes every 24 hours, GoupSocial has the tools to help. The Power of Using Growth Tools Strategically Gaining traction with free Instagram followers isn’t about cheating the system—it’s about working smarter. Using platforms that offer instagram free followers 100 real ensures you don’t just inflate numbers, but also increase your influence. Tools like instagram free followers like, free smm panels, and instagram followers panel free create a foundation of trust, engagement, and visibility. It’s the perfect launchpad for creators who want to focus on content—not on chasing every new follower manually. Start Strong, Grow Smarter Instagram success is no longer reserved for those with large budgets. With the right tools, anyone can build influence. Free Instagram followers from reputable services like GoupSocial help you achieve fast, safe, and impactful growth. Use features like free ig likes every 24 hours, explore tools like idigic Instagram followers, and make use of instagram free followers like strategies to grow with confidence. The power to scale is in your hands—start now and watch your audience thrive.
    • Buying & Selling FFXIV FFXI Horizon Eden and other server
    • Buying & Selling Torn City Cash
    • Added: payment method MidTrans - for Indonesia MercadoPago - for Brazil and etc.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock