Jump to content

Recommended Posts

Posted

Hello, I need a code for a Chaotic Zone, (not auto flag zone/multifunction).

I pay with paypal. Give me your skype for contact.

 

This zone must be like this:

 

1 -Not an auto flag zone.

2 -players can attack, use any skills (offensive or deffensive, debuffs) without holding CTRL.
3 -players get normal PVP Flag when in PVP. And get normal Karma if PK. If stop PVP, Flag disapear normaly.
4 -players with karma don't drop inside the chaotic zone.
5 -players get PVP/PK points.
6 -Need CTRL only for Ally/Clan Members
 
With a Config.Properties file
 
 
 
Posted

Ive found a code for chaotic city. It works like an event. maybe it can help you.

 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java (revision 1004)
+++ head-src/com/l2jfrozen/Config.java (working copy)
@@ -69,6 +69,7 @@
public static int USERACCESS_LEVEL;
public static int MASTERACCESS_NAME_COLOR;
public static int MASTERACCESS_TITLE_COLOR;
+ public static int DUAL_AIO_ID;

//============================================================
public static void loadAccessConfig()
@@ -613,6 +614,8 @@
public static int FS_TIME_COOLDOWN;
public static int FS_TIME_ENTRY;
public static int FS_TIME_WARMUP;
+ public static int TOWN_ID_EVENT;
+ public static int BOSS_ID_EVENT;
public static int FS_PARTY_MEMBER_COUNT;
public static boolean ALLOW_QUAKE_SYSTEM;
public static boolean ENABLE_ANTI_PVP_FARM_MSG;
@@ -630,7 +633,8 @@
InputStream is = new FileInputStream(new File(OTHER));
otherSettings.load(is);
is.close();
-
+ BOSS_ID_EVENT = 315949;
+ TOWN_ID_EVENT = Integer.parseInt(otherSettings.getProperty("TownIdEvent", "9"));
DEEPBLUE_DROP_RULES = Boolean.parseBoolean(otherSettings.getProperty("UseDeepBlueDropRules", "True"));
ALLOW_GUARDS = Boolean.valueOf(otherSettings.getProperty("AllowGuards", "False"));
EFFECT_CANCELING = Boolean.valueOf(otherSettings.getProperty("CancelLesserEffect", "True"));
@@ -673,6 +677,7 @@
     ALLOW_AIO_TCOLOR = Boolean.parseBoolean(otherSettings.getProperty("AllowAioTitleColor", "True"));
     AIO_TCOLOR = Integer.decode("0x" + otherSettings.getProperty("AioTitleColor", "88AA88"));
     ALLOW_AIO_USE_GK = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseGk", "False"));
+     DUAL_AIO_ID = Integer.parseInt(otherSettings.getProperty("DualAioItemId", "6580"));
     ALLOW_AIO_USE_CM = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseClassMaster", "False"));
     ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(otherSettings.getProperty("AnnounceCastleLords", "False"));
     if(ENABLE_AIO_SYSTEM) //create map if system is enabled
Index: head-src/com/l2jfrozen/gameserver/model/zone/type/L2TownZone.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/zone/type/L2TownZone.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/model/zone/type/L2TownZone.java (working copy)
@@ -22,8 +22,10 @@
import org.w3c.dom.Node;

import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.managers.TownManager;
import com.l2jfrozen.gameserver.model.L2Character;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.entity.event.CaoticInvasor;
import com.l2jfrozen.gameserver.model.zone.L2ZoneType;
import com.l2jfrozen.util.random.Rnd;

@@ -130,7 +132,10 @@
{
character.setInsideZone(L2Character.ZONE_PEACE, true);
}
-
+ if(CaoticInvasor.ativo == true && _townId == Config.TOWN_ID_EVENT)
+ {
+ character.setInsideZone(L2Character.ZONE_PEACE, false);
+ }
}

@Override
@@ -151,11 +156,14 @@

@Override
protected void onDieInside(L2Character character)
- {}
+ {
+ }

@Override
protected void onReviveInside(L2Character character)
- {}
+ {
+ onEnter(character);
+ }

/**
* Returns this town zones name
Index: head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCaotic.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCaotic.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCaotic.java (working copy)
@@ -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.handler.admincommandhandlers;
+
+import java.util.logging.Logger;
+
+import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
+import com.l2jfrozen.gameserver.model.L2Object;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.entity.event.CaoticInvasor;
+
+/**
+ * This class handles following admin commands: - invul = turns invulnerability on/off
+ *
+ * @version $Revision: 1.2.4.4 $ $Date: 2007/07/31 10:06:02 $
+ */
+public class AdminCaotic implements IAdminCommandHandler
+{
+ private static Logger _log = Logger.getLogger(AdminCaotic.class.getName());
+
+ private static final String[] ADMIN_COMMANDS =
+ {
+ "admin_startcaos"
+ };
+
+ @Override
+ public boolean useAdminCommand(String command, L2PcInstance activeChar)
+ {
+ if (command.startsWith("admin_startcaos"))
+ {
+ try
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new CaoticInvasor(), 1);
+
+ }
+ catch (Exception e)
+ {
+ activeChar.sendMessage("Usage: //startcaos");
+ }
+ }
+ return true;
+ }
+
+
+ @Override
+ public String[] getAdminCommandList()
+ {
+ return ADMIN_COMMANDS;
+ }
+
+}
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -6922,12 +6922,6 @@
sendPacket(smsg);
return;
}
- if ((isInParty() && getParty().getLootDistribution() == L2Party.ITEM_LOOTER || !isInParty()) && !_inventory.validateCapacity(target))
- {
- sendPacket(ActionFailed.STATIC_PACKET);
- sendPacket(new SystemMessage(SystemMessageId.SLOTS_FULL));
- return;
- }
if (isInvul() && !isGM())
{
sendPacket(ActionFailed.STATIC_PACKET);
@@ -6937,35 +6931,7 @@
smsg = null;
return;
}
- if (target.getOwnerId() != 0 && target.getOwnerId() != getObjectId() && !isInLooterParty(target.getOwnerId()))
- {
- sendPacket(ActionFailed.STATIC_PACKET);
-
- if (target.getItemId() == 57)
- {
- SystemMessage smsg = new SystemMessage(SystemMessageId.FAILED_TO_PICKUP_S1_ADENA);
- smsg.addNumber(target.getCount());
- sendPacket(smsg);
- smsg = null;
- }
- else if (target.getCount() > 1)
- {
- SystemMessage smsg = new SystemMessage(SystemMessageId.FAILED_TO_PICKUP_S2_S1_S);
- smsg.addItemName(target.getItemId());
- smsg.addNumber(target.getCount());
- sendPacket(smsg);
- smsg = null;
- }
- else
- {
- SystemMessage smsg = new SystemMessage(SystemMessageId.FAILED_TO_PICKUP_S1);
- smsg.addItemName(target.getItemId());
- sendPacket(smsg);
- smsg = null;
- }
- return;
- }
-
+
if (target.getItemId() == 57 && _inventory.getAdena() == Integer.MAX_VALUE)
{
sendMessage("You have reached the maximum amount of adena, please spend or deposit the adena so you may continue obtaining adena.");
@@ -20376,5 +20342,20 @@

         _currentPetSkill = new SkillDat(currentSkill, ctrlPressed, shiftPressed);
     }
-
+
+ /**
+ * @return
+ */
+ public int getTownId()
+ {
+int x1, y1, z1, idTown = 0;
+ x1 = getX();
+ y1 = getY();
+ z1 = getZ();
+ L2TownZone Town;
+ Town = TownManager.getInstance().getTown(x1, y1, z1);
+ IdTown = Town.getTownId();
+
+ return IdTown;
+ }
}
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2MonsterInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2MonsterInstance.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2MonsterInstance.java (working copy)
@@ -134,14 +134,26 @@
return getTemplate().aggroRange > 0 && !isEventMob;
}

+ public static void waitSecs(int i)
+ {
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+ }
+
/* (non-Javadoc)
* @see com.l2jfrozen.gameserver.model.L2Attackable#onSpawn()
*/
@Override
public void onSpawn()
{
+
super.onSpawn();
-
if(getTemplate().getMinionData() != null)
{
try
@@ -403,4 +415,5 @@
}
_minionList.clearRespawnList();
}
+
}
Index: head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java (working copy)
@@ -284,7 +284,21 @@

cs = null;
}
+
+ public void CaoticAnnounceToAll(String text)
+ {
+ CreatureSay cs = new CreatureSay(0, 18, "", "ChaoticCity: "+text);

+ for(L2PcInstance player : L2World.getInstance().getAllPlayers())
+ {
+ if(player != null)
+ if(player.isOnline()!=0)
+ player.sendPacket(cs);
+ }
+
+ cs = null;
+ }
+
public void announceToAll(SystemMessage sm)
{
for(L2PcInstance player : L2World.getInstance().getAllPlayers())
Index: head-src/com/l2jfrozen/gameserver/model/entity/event/CaoticInvasor.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/entity/event/CaoticInvasor.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/model/entity/event/CaoticInvasor.java (working copy)
@@ -0,0 +1,505 @@
+/*
+ * 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.l2jfrozen.gameserver.model.entity.event;
+
+import java.util.List;
+
+import javolution.util.FastList;
+
+import com.l2jfrozen.gameserver.model.L2World;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.datatables.sql.NpcTable;
+import com.l2jfrozen.gameserver.datatables.sql.SpawnTable;
+import com.l2jfrozen.gameserver.model.entity.Announcements;
+import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
+import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
+import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
+import com.l2jfrozen.util.random.Rnd;
+
+/**
+ * @author Axcel
+ */
+public class CaoticInvasor implements Runnable
+{
+ public static boolean ativo = false;
+ public static L2Spawn _bossSpawn;
+ public static boolean TreasureAtivo = false;
+ public static int _bossHeading = 0;
+ public List<L2Spawn> _treasureids = new FastList<L2Spawn>();
+ public int x1;
+ public int x2;
+ public int x3;
+ public int x4;
+ public int x5;
+ public int x6;
+
+ public int y1;
+ public int y2;
+ public int y3;
+ public int y4;
+ public int y5;
+ public int y6;
+
+ public int z1;
+ public int z2;
+ public int z3;
+ public int z4;
+ public int z5;
+ public int z6;
+
+
+ public void EventoMain()
+ {
+ Announcements.getInstance().CaoticAnnounceToAll("The event start in 2 minutes.");
+ waitSecs(120);
+ GetCity();
+ waitSecs(1);
+ ativo = true;
+ spawnBoss();
+ try
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new RecallAllPlayer(), 1);
+
+ }
+ catch (Exception e)
+ {
+ System.out.println("Erro no evento ao carregar os players");
+ }
+ Announcements.getInstance().CaoticAnnounceToAll("The event start good luck.");
+ Announcements.getInstance().CaoticAnnounceToAll("25 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("24 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("23 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("22 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("21 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("20 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("19 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("18 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("17 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("16 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("15 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("14 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("13 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("12 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("11 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("10 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("9 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("8 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("7 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("6 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("5 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("4 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("3 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("2 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("1 minute(s) till event finish!.");
+ waitSecs(60);
+ Announcements.getInstance().CaoticAnnounceToAll("Event finish!.");
+ unspawnNpcBoss();
+ unspawnTreasures();
+ ativo = false;
+ try
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new RecallAllPlayer(), 1);
+ }
+ catch (Exception e)
+ {
+ System.out.println("Erro no evento ao carregar os players");
+ }
+
+ }
+
+
+ private void GetCity()
+ {
+ int city = Rnd.get(4) + 1;
+ if (city == 1)
+ {
+ Config.TOWN_ID_EVENT = 9; // Giran
+ Announcements.getInstance().CaoticAnnounceToAll("The event started in Giran.");
+
+ x1 = 84169;
+ y1 = 147409;
+ z1 = -3431;
+
+ x2 = 82467;
+ y2 = 149129;
+ z2 = -3495;
+
+ x3 = 81138;
+ y3 = 148300;
+ z3 = -3495;
+
+ x4 = 82251;
+ y4 = 146645;
+ z4 = -3559;
+
+ x5 = 82610;
+ y5 = 147839;
+ z5 = -3495;
+
+ x6 = 79607;
+ y6 = 149563;
+ z6 = -3559;
+ }
+ else if (city == 2)
+ {
+ Config.TOWN_ID_EVENT = 13; // Goddard
+ Announcements.getInstance().CaoticAnnounceToAll("The event started in Goddard.");
+ x1 = 147741;
+ y1 = -56422;
+ z1 = -2807;
+
+ x2 = 147718;
+ y2 = -53162;
+ z2 = -2758;
+
+ x3 = 147714;
+ y3 = -58463;
+ z3 = -3007;
+
+ x4 = 149405;
+ y4 = -54993;
+ z4 = -2807;
+
+ x5 = 150558;
+ y5 = -56347;
+ z5 = -3007;
+
+ x6 = 144913;
+ y6 = -56417;
+ z6 = -3007;
+ }
+ else if (city == 3)
+ {
+ Config.TOWN_ID_EVENT = 5; // Gludin
+ Announcements.getInstance().CaoticAnnounceToAll("The event started in Gludin.");
+ x1 = -82785;
+ y1 = 150975;
+ z1 = -3155;
+
+ x2 = -80870;
+ y2 = 150187;
+ z2 = -3070;
+
+ x3 = -84141;
+ y3 = 150625;
+ z3 = -3155;
+
+ x4 = -83535;
+ y4 = 154065;
+ z4 = -3204;
+
+ x5 = -80228;
+ y5 = 154106;
+ z5 = -3204;
+
+ x6 = -79850;
+ y6 = 152732;
+ z6 = -3204;
+ }
+ else if (city == 4)
+ {
+ Config.TOWN_ID_EVENT = 12; // Aden
+ Announcements.getInstance().CaoticAnnounceToAll("The event started in Aden.");
+ x1 = 147455;
+ y1 = 26918;
+ z1 = -2230;
+
+ x2 = 146919;
+ y2 = 25799;
+ z2 = -2039;
+
+ x3 = 150041;
+ y3 = 27090;
+ z3 = -2294;
+
+ x4 = 145256;
+ y4 = 22204;
+ z4 = -2167;
+
+ x5 = 147453;
+ y5 = 28516;
+ z5 = -2294;
+
+ x6 = 147443;
+ y6 = 23835;
+ z6 = -2018;
+ }
+ }
+
+ public static void waitSecs(int i)
+ {
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+ }
+
+ public final List<L2Spawn> getBossIdd()
+ {
+ return _treasureids;
+ }
+
+ public void unspawnTreasures()
+ {
+ for (L2Spawn spawn : getBossIdd())
+ {
+ spawn.stopRespawn();
+ spawn.getLastSpawn().doDie(spawn.getLastSpawn());
+ }
+
+ getBossIdd().clear();
+ }
+
+ public void spawnBoss()
+ {
+ RespawnBoss();
+ RespawnBoss2();
+ RespawnBoss3();
+ RespawnBoss4();
+ RespawnBoss5();
+ RespawnBoss6();
+ for (L2Spawn spawn : getBossIdd())
+ if (spawn != null)
+ {
+ spawn.init();
+ }
+ }
+ private void RespawnBoss()
+ {
+ L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(Config.BOSS_ID_EVENT);// ID do mob
+ try
+ {
+ {
+ _bossSpawn = new L2Spawn(tmpl);
+
+ _bossSpawn.setLocx(x1); // loc x
+ _bossSpawn.setLocy(y1); // loc y
+ _bossSpawn.setLocz(z1); // loc z
+
+ _bossSpawn.setAmount(1);
+ _bossSpawn.setHeading(0);
+ _bossSpawn.setRespawnDelay(150000000);
+ _bossSpawn.setLocation(0);
+ _treasureids.add(_bossSpawn);
+ _bossSpawn = null;
+ }
+ }
+ catch (Exception e)
+ {
+ System.out.println("Erro no evento");
+ }
+ }
+
+ private void RespawnBoss2()
+ {
+ L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(Config.BOSS_ID_EVENT);// ID do mob
+ try
+ {
+ {
+ _bossSpawn = new L2Spawn(tmpl);
+
+ _bossSpawn.setLocx(x2); // loc x
+ _bossSpawn.setLocy(y2); // loc y
+ _bossSpawn.setLocz(z2); // loc z
+
+ _bossSpawn.setAmount(1);
+ _bossSpawn.setHeading(0);
+ _bossSpawn.setRespawnDelay(150000000);
+ _bossSpawn.setLocation(0);
+ _treasureids.add(_bossSpawn);
+ _bossSpawn = null;
+ }
+ }
+ catch (Exception e)
+ {
+ System.out.println("Erro no evento");
+ }
+ }
+
+ private void RespawnBoss3()
+ {
+ L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(Config.BOSS_ID_EVENT);// ID do mob
+ try
+ {
+ {
+ _bossSpawn = new L2Spawn(tmpl);
+
+ _bossSpawn.setLocx(x3); // loc x
+ _bossSpawn.setLocy(y3); // loc y
+ _bossSpawn.setLocz(z3); // loc z
+
+ _bossSpawn.setAmount(1);
+ _bossSpawn.setHeading(0);
+ _bossSpawn.setRespawnDelay(150000000);
+ _bossSpawn.setLocation(0);
+ _treasureids.add(_bossSpawn);
+ _bossSpawn = null;
+ }
+ }
+ catch (Exception e)
+ {
+ System.out.println("Erro no evento");
+ }
+ }
+
+ private void RespawnBoss4()
+ {
+ L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(Config.BOSS_ID_EVENT);// ID do mob
+ try
+ {
+ {
+ _bossSpawn = new L2Spawn(tmpl);
+
+ _bossSpawn.setLocx(x4); // loc x
+ _bossSpawn.setLocy(y4); // loc y
+ _bossSpawn.setLocz(z4); // loc z
+
+ _bossSpawn.setAmount(1);
+ _bossSpawn.setHeading(0);
+ _bossSpawn.setRespawnDelay(150000000);
+ _bossSpawn.setLocation(0);
+ _treasureids.add(_bossSpawn);
+ _bossSpawn = null;
+ }
+ }
+ catch (Exception e)
+ {
+ System.out.println("Erro no evento");
+ }
+ }
+
+ private void RespawnBoss5()
+ {
+ L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(Config.BOSS_ID_EVENT);// ID do mob
+ try
+ {
+ {
+ _bossSpawn = new L2Spawn(tmpl);
+
+ _bossSpawn.setLocx(x5); // loc x
+ _bossSpawn.setLocy(y5); // loc y
+ _bossSpawn.setLocz(z5); // loc z
+
+ _bossSpawn.setAmount(1);
+ _bossSpawn.setHeading(0);
+ _bossSpawn.setRespawnDelay(150000000);
+ _bossSpawn.setLocation(0);
+ _treasureids.add(_bossSpawn);
+ _bossSpawn = null;
+ }
+ }
+ catch (Exception e)
+ {
+ System.out.println("Erro no evento");
+ }
+ }
+
+ private void RespawnBoss6()
+ {
+ L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(Config.BOSS_ID_EVENT);// ID do mob
+ try
+ {
+ {
+ _bossSpawn = new L2Spawn(tmpl);
+
+ _bossSpawn.setLocx(x6); // loc x
+ _bossSpawn.setLocy(y6); // loc y
+ _bossSpawn.setLocz(z6); // loc z
+
+ _bossSpawn.setAmount(1);
+ _bossSpawn.setHeading(0);
+ _bossSpawn.setRespawnDelay(150000000);
+ _bossSpawn.setLocation(0);
+ _treasureids.add(_bossSpawn);
+ _bossSpawn = null;
+ }
+ }
+ catch (Exception e)
+ {
+ System.out.println("Erro no evento");
+ }
+ }
+
+ private static void unspawnNpcBoss()
+ {
+ if (_bossSpawn == null || _bossSpawn.getLastSpawn() == null)
+ return;
+
+ _bossSpawn.getLastSpawn().deleteMe();
+ _bossSpawn.stopRespawn();
+ SpawnTable.getInstance().deleteSpawn(_bossSpawn, true);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ @Override
+ public void run()
+ {
+ EventoMain();
+
+ }
+
+}
+
+class RecallAllPlayer implements Runnable
+{
+
+ @Override
+ public void run()
+ {
+ for (L2PcInstance player : L2World.getInstance().getAllPlayers())
+ {
+ if (player.getTownId() == Config.TOWN_ID_EVENT)
+ {
+ int x = player.getX();
+ int y = player.getY();
+ int z = player.getZ();
+ player.teleToLocation(x, y, z);
+ }
+ }
+
+ }
+}
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (working copy)
@@ -34,6 +34,7 @@
import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminBuffs;
import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCTFEngine;
import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCache;
+import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCaotic;
import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminChangeAccessLevel;
import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCharSupervision;
import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminChristmas;
@@ -122,6 +123,7 @@
registerAdminCommandHandler(new AdminInvul());
registerAdminCommandHandler(new AdminDelete());
registerAdminCommandHandler(new AdminKill());
+ registerAdminCommandHandler(new AdminCaotic());
registerAdminCommandHandler(new AdminTarget());
registerAdminCommandHandler(new AdminShop());
registerAdminCommandHandler(new AdminCTFEngine());
Index: config/head/other.properties
===================================================================
--- config/head/other.properties (revision 1004)
+++ config/head/other.properties (working copy)
@@ -4,6 +4,12 @@
#         Pack: l2jfrozen Site: www.l2jfrozen.com         #
#============================================================#

+
+
+#Evento Chaotic Invasor
+#Id do boss no evento você configura a gosto no navicat
+BossIDEvent = 25016
+
#Amount of adena/AA that a new character is given
StartingAdena = 0
StartingAncientAdena = 0
Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy)
@@ -30,6 +30,7 @@
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.CTFCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.DMCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.FarmPvpCmd;
+import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.LeaveChaotic;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.OfflineShop;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Online;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.StatsCmd;
@@ -65,6 +66,7 @@
_datatable = new FastMap<String, IVoicedCommandHandler>();

registerVoicedCommandHandler(new Voting());
+ registerVoicedCommandHandler(new LeaveChaotic());

if (Config.BANKING_SYSTEM_ENABLED)
{
Index: head-src/com/l2jfrozen/gameserver/network/serverpackets/Die.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/serverpackets/Die.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/network/serverpackets/Die.java (working copy)
@@ -18,6 +18,7 @@
*/
package com.l2jfrozen.gameserver.network.serverpackets;

+import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.datatables.AccessLevel;
import com.l2jfrozen.gameserver.datatables.sql.AccessLevels;
import com.l2jfrozen.gameserver.managers.CastleManager;
@@ -27,6 +28,7 @@
import com.l2jfrozen.gameserver.model.L2SiegeClan;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.entity.event.CTF;
+import com.l2jfrozen.gameserver.model.entity.event.CaoticInvasor;
import com.l2jfrozen.gameserver.model.entity.event.DM;
import com.l2jfrozen.gameserver.model.entity.event.TvT;
import com.l2jfrozen.gameserver.model.entity.siege.Castle;
@@ -60,6 +62,11 @@
L2PcInstance player = (L2PcInstance) cha;
_access = player.getAccessLevel();
_clan = player.getClan();
+ if(player.getTownId() == Config.TOWN_ID_EVENT && CaoticInvasor.ativo == true)
+ {
+ player.sendMessage("Se desejar sair do evento digite .leavechaotic");
+ player.sendMessage("If you want to leave this event type .leavechaotic");
+ }
_canTeleport = !((TvT.is_started() && player._inEventTvT)
|| (DM.is_started() && player._inEventDM)
|| (CTF.is_started() && player._inEventCTF)
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java (working copy)
@@ -22,6 +22,7 @@

import java.text.DateFormat;
import java.util.List;
+import java.util.logging.Level;

import javolution.text.TextBuilder;
import javolution.util.FastList;
@@ -29,6 +30,7 @@
import org.omg.PortableServer.POAManagerPackage.State;

import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.ai.CtrlEvent;
import com.l2jfrozen.gameserver.ai.CtrlIntention;
import com.l2jfrozen.gameserver.cache.HtmCache;
import com.l2jfrozen.gameserver.datatables.MobGroupTable;
@@ -51,6 +53,7 @@
import com.l2jfrozen.gameserver.model.L2DropData;
import com.l2jfrozen.gameserver.model.L2Object;
import com.l2jfrozen.gameserver.model.L2Skill;
+import com.l2jfrozen.gameserver.model.L2Attackable.AggroInfo;
import com.l2jfrozen.gameserver.model.L2Skill.SkillType;
import com.l2jfrozen.gameserver.model.L2Summon;
import com.l2jfrozen.gameserver.model.L2World;
@@ -120,7 +123,8 @@

/** The L2Spawn object that manage this L2NpcInstance. */
private L2Spawn _spawn;
-
+ protected int _hate;
+ protected int _damage;
/** The flag to specify if this L2NpcInstance is busy. */
private boolean _isBusy = false;

@@ -3326,5 +3330,11 @@
this.updateEffectIcons();
}
}
-
+
+ /**
+ * @param attacker
+ * @param damage
+ * @param aggro
+ */
+
}
Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/LeaveChaotic.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/LeaveChaotic.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/LeaveChaotic.java (working copy)
@@ -0,0 +1,52 @@
+/*
+ * 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.l2jfrozen.gameserver.handler.voicedcommandhandlers;
+
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
+import com.l2jfrozen.gameserver.model.L2World;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.entity.event.CaoticInvasor;
+
+public class LeaveChaotic implements IVoicedCommandHandler
+{
+ private static String[] _voicedCommands =
+ {
+ "leavechaotic"
+ };
+
+ @Override
+ public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+ {
+ if(command.equalsIgnoreCase("leavechaotic"))
+ {
+ if(activeChar.getTownId() == Config.TOWN_ID_EVENT && CaoticInvasor.ativo == true)
+ {
+ activeChar.teleToLocation(44070, -50243, -796);
+ }
+ else
+ {
+ activeChar.sendMessage("You can't teleport now");
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public String[] getVoicedCommandList()
+ {
+ return _voicedCommands;
+ }
+}
Posted

PS I didnt tested it

 

 

O evento funciona assim. 
Ao iniciar uma cidade aleatória fica totalmente "noPeace" então pvp rola solto sem PK e conta os pvp's enquanto isso moobs super agressivos são iniciados na cidade "spawnados".

Tem que mata-los e depois pvp rola solto. 

 

The event works like this.

When starting a random city is completely "noPeace" then pvp rolls released without PK and account pvp's super aggressive meanwhile moobs are started in the city "spawnados".
 
You have to kill them and then pvp rolls loose.

 

 

google translate ;D

Posted (edited)

 

Hello, I need a code for a Chaotic Zone, (not auto flag zone/multifunction).

I pay with paypal. Give me your skype for contact.

 

This zone must be like this:

 

1 -Not an auto flag zone.

2 -players can attack, use any skills (offensive or deffensive, debuffs) without holding CTRL.
3 -players get normal PVP Flag when in PVP. And get normal Karma if PK. If stop PVP, Flag disapear normaly.
4 -players with karma don't drop inside the chaotic zone.
5 -players get PVP/PK points.
6 -Need CTRL only for Ally/Clan Members
 
With a Config.Properties file

 

You dont need Chaotic Zone, you need Clan feature that ignore ctrl - hold need request, to attack player in that zone.

In all other conditions i guess it would play as usually( so player would get karma if pk, if pvp over - flag dissabled over time.

4. Ignore Drop for that zone.

5. Same  conditions.

Simple check on the beginning - if player isnt Ally/Clan Member then ctrl hold is ignored, but if is a ally/clan then it need ctrl - and thats all.

Edited by LightFusion

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

    • Quick head's up if anyone needs sniffer we have it and the price is reasonable. any server is doable.
    • so u need to create them and then use the icon name in the prefered ones
    • ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━      ⚔️  A NEW ERA OF LINEAGE 2 PVP  ⚔️         High Five | 2026 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ We are building something that has never existed before. Not another copy. Not another "x2000 PvP server with TvT." This is a complete PvP ecosystem — where every kill matters,every rivalry has a face, and your legacy is worn on your character. We are sharing this here first, before anything is announced publicly. We want feedback. We want the right people. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📌  CORE SERVER FEATURES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔹 Chronicle .............. High Five 🔹 Rates .................. x2000 🔹 Safe Enchant ........... +3 🔹 Max Enchant ............ +10 🔹 Enchant Rate ........... 33% 🔹 Buff Slots ............. 24 + 4 🔹 Song & Dance Slots ..... 12 🔹 Buff Duration .......... 4 hours 🔹 TvT .................... Every Hour  (Karma + PvP points) 🔹 Hero ................... Every Week 🔹 Olympiad ............... 3 Hours Daily 🔹 Castle Sieges .......... Weekly 🔹 Territory Wars ......... Weekly 🔹 Grand Bosses ........... 1 week respawn 🔹 Costume Farm Area ...... Custom mobs & zones 🔹 NPC Buffers + GM Shops 🔹 Custom Economy 🔹 Custom Playground 🔹 Custom Events 🔹 Anti-Bot | Anti-DDoS | Highly Secured 🔹 Stable | No Lag | No sudden wipes ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🚀  5 FEATURES THAT HAVE NEVER EXISTED      ON ANY LINEAGE 2 SERVER ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ─────────────────────────────────────── 💰  1. BOUNTY HUNTER SYSTEM ─────────────────────────────────────── Every player with high PvP points becomes a target. Anyone can place real in-game adena / currency / gear as a bounty on any specific player they want dead. Kill the target → collect the bounty. → Top 10 Active Bounties visible LIVE on website + in-game board → Updated in real time — anyone can see who has a price on their head → Clans place bounties on enemy leaders before sieges → Creates real economic stakes behind every single kill → 100% organic drama — no admin needed to create conflict ─────────────────────────────────────── 🏆  2. SEASON RANKED LADDER + REAL PRIZE POOL ─────────────────────────────────────── Every 45 days a Season ends. PvP Score resets. Gear stays. Glory is earned. → Top 3 players receive a REAL money prize pool at season end → Top clan earns a unique exclusive in-game title displayed for the entire next season → Permanent Hall of Fame on website — name, class, kills, and season — forever → Season end = fresh ranking start for everyone New players have a real shot. Veterans must defend. → This single feature will make clans actively recruit  and communities form around the server organically ─────────────────────────────────────── 📱  3. LIVE SERVER DASHBOARD ─────────────────────────────────────── A fully live website — accessible from any phone or browser: → Real-time Kill Feed — who killed who, where, when → Live PvP Leaderboard — updated every minute → Live Bounty Board — active bounties and claimed kills → Grand Boss timers — next Baium, Antharas, Valakas spawn → Siege countdown with registered clans visible → Server population — online now, today's peak, all-time peak Why this matters: Players check their phone at work and see their clan is losing the siege. They log in. They recruit a friend. That friend stays. Friends who have never played see the stats and ask what server it is. This is automatic word-of-mouth that no advertisement can buy. ─────────────────────────────────────── ⚔️  4. NEMESIS SYSTEM ─────────────────────────────────────── The system tracks who kills you most. If the same player kills you 5 times in a row — he becomes your official NEMESIS. → A red skull icon appears above his head — visible only to you → Kill your Nemesis → DOUBLE PvP points    + server-wide announcement: "[PlayerX] has avenged his honor against [PlayerY]!" → If he kills you 10 times consecutively → you receive the title [Hunted] — visible to the entire server    Public humiliation. Maximum motivation. → Eliminate your Nemesis → your title is removed    He receives [Defeated] for 1 hour This transforms anonymous PvP into personal rivalries. Players will bring friends just to help eliminate their Nemesis. These stories are what people talk about for years. ─────────────────────────────────────── 👑  5. CLAN SIEGE CROWN — WEARABLE LEGACY TROPHY  ─────────────────────────────────────── This feature does not exist on any L2 server in the world. Every clan that wins a Castle Siege receives 10 custom hat/accessory items — physically wearable in-game. Each Crown is: → UNIQUE per castle — Aden Crown has a different visual from Giran Crown, Rune Crown, Goddard Crown, etc. → PERSONALIZED — the clan name AND clan crest are embedded visually on the hat itself, like a clan cloak but on your head    Every player who sees you knows exactly who you are and what castle your clan owns → NUMBERED — tooltip reads:    "Crown of Aden #4/10 — Season 2"    A collectible. A proof. A statement. → PERMANENT — you lose the castle at next siege, you keep the Crown → LEGACY — at season end it becomes a permanent trophy:    "Crown of Aden — Season 2  |  [YourClanName]"    Stored in your inventory as living history When a player wearing this Crown walks through Giran, everyone sees the clan crest displayed on the accessory. No leaderboard needed. Status is worn on your character.   -------------------------------------------------------------------------------------------------------------------------------------------------------------------- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🛠️  WHO WE ARE LOOKING FOR ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ We are building the right team first. No launch date until everything is right. ✅ H5 Developer — L2J or L2OFF    Must have experience with high-rate PvP servers    Bonus: experience with custom feature development ✅ Web Developer — for the Live Dashboard + account panel    Must be comfortable with real-time data display    (websockets, live feeds, mobile-friendly) ✅ Designer / 3D Artist — for custom Crown visuals per castle    If you have L2 texture/model experience, we want to talk ✅ GMs / Community Managers    Active, fair, experienced, trusted by the community ✅ Beta Testers    Players who know H5 PvP inside out    Willing to stress-test and break things on purpose ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💬  WE WANT YOUR HONEST FEEDBACK ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ We are building this WITH the community. Every reply here shapes the final product. → Which of these 5 features excites you most? → What do you think will NOT work and why? → What is missing that would make you stay for months? → Would you play this if it opened tomorrow? We are not looking for hype. We are looking for honest opinions from people who have seen servers rise and fall. Tell us what we are getting wrong. Reply below or send a PM directly. Serious people only. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ P.S. — The inspiration for this project came from a server many of us played years ago called L2Gang. That nostalgia is what started this conversation. What we are building is something entirely new. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    • Please is anyone who can share the compiled version of the l2editor source for interlude? Because i run the !GenerateLibs.bat with the corrected code by CriticalError and then i try to build with the vs 2013 but i get errors again and again and when i try anyway to open or create something with the UnrealEd.exe then it closes automatically.
  • 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..