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

    • Reconstructed the MSNP8 client/server chain in Lineage 2 (from C4 to HFp5) with full protocol capabilities + added Discord integration    Clean MSNP8:       MSNP8 + Discord Bridge:   
    • I'm looking for the GVE code for Luecera2.
    • Recommended seller, I'm using his services. Good luck @Ave
    • https://l2.gamedream.pl/ Update #2 — GameDream Interlude (C6)     This update focuses on Epic bosses, quest chains and overall QoL :cool Highlights: Frintezza access follows a full retail-like chain: Four Goblets → Last Imperial Prince → Journey to a Settlement Retail-like entry requirements restored (scroll + Command Channel) Four Goblets quest is now available in-game Shot visuals synced with attack/skill usage Community Board Premium Shop refreshed with classic Interlude buttons and cleaner tables Epic Raidboss access: Frintezza — 4–5 party Command Channel + scroll + Antique Brooch Antharas — Portal Stone Baium — Bloody Fabric Valakas — Floating Stone Queen Ant / Core / Orfen / Zaken — no quest gates Bug Fixes & QoL: Frintezza quest chain fully fixed TvT rewards — single reward + anti-abuse protection Shots — no double triggering Premium Shop — no blank tabs Mammon NPCs in Giran working correctly Cancel works retail-like (up to 5 buffs removed) Summon Friend fixed with anti-exploit guards YetiBuffer — Saved Buff Profiles (Save / Clear / Restore) PvE — increased aggro range + balance tweaks EXP toggle commands: expoff / expon / expblock Thanks for testing and feedback — more updates coming soon ❤️
    • Hello I would like to offer You my NEW 2026 Updater / Launcher with custom skins.   - UPDATER FEATURES -   1. Performance and Intelligent Resource Management: Smart Disk Detection (SSD/HDD): The updater automatically detects the user's drive type. For SSD/NVMe drives: Launches up to 8-12 concurrent threads, utilizing the full yet optimized connection speed. For HDD drives: Limits the thread count (to 2-3) to prevent computer slowdowns and avoid overloading the drive head. Multi-threaded Downloading: Instead of downloading file by file, the updater downloads multiple files simultaneously, drastically reducing update time. ZSTD Compression: Support for the modern Zstandard compression algorithm (.zst). Files are downloaded in compressed form and decompressed on the fly, saving bandwidth and accelerating downloads. HTTP/2 and Keep-Alive Support: Utilizing the HTTP/2 protocol and persistent connections allows for the instant download of thousands of small files without establishing a new connection for each one.   2. Modern User Interface (UI/UX): Transparency and PNG Graphics: Support for irregular window shapes, allowing for the creation of a unique, modern launcher look. Taskbar Integration: The progress bar is displayed not only in the window but also on the Windows taskbar icon. Built-in News Browser (Optional): The updater features a built-in browser module that displays news/changelogs directly within the launcher (without opening an external browser). Multi-language Support (Optional): Built-in language switching system (e.g., EN/PL/RU, etc.) with dynamic loading of button graphics and text. Animated Buttons (Optional): Dedicated, animated buttons redirecting to Discord, Facebook, YouTube, Instagram, and the website.   3. Technical Features and Application Security: Anti-Dual Run (Optional): The updater checks if the game is already running to prevent file conflicts during updates. Error Diagnostics: Built-in logging system (debug_log.txt) and hardware exception handling (SEH), facilitating the diagnosis of problems for players who cannot run the game. Internal Configuration: Updater settings are stored inside the .exe file, eliminating publicly accessible configuration files.   4. File Categorization (Normal vs. Critical vs. Once): Critical Files: Critical files are verified more thoroughly (via MD5 Hash) even in quick check mode to guarantee stability. Normal Files: Standard game files (textures, models, sounds) are checked depending on the selected mode (Quick vs. Full). Once Files (Overwrite Exclusions): Applies to user configuration files (e.g., Option.ini, User.ini).   5. Check Modes (Verification Algorithms): Self-Update: The updater can update itself before checking game files, allowing for easy deployment of launcher fixes. The updater supports two main operating modes that switch intelligently based on user action: Smart Check (Startup Quick Check): Runs automatically upon updater startup or pressing the START button (unless a full check is forced). Full Check (Full MD5 Verification): Manually triggered by the player via the "Full Check" button. Automatic Update Detection: If a newer version of a file appears on the server, it is automatically detected and downloaded without player interaction. Atomic Updates: Files are downloaded and verified first, and only then saved to the disk. This prevents game client corruption in case of internet connection loss. The entire process takes seconds, even with clients weighing 30GB+. - PATCH BUILDER FEATURES -   1. Professional File Structure Management (Tree-List Hybrid): Directory Tree Visualization: Instead of a flat file list, the Builder displays a clear structure of folders and subfolders. You can collapse and expand entire tree branches, facilitating work with thousands of files. Normal and Critical Division: A clear window division into two main zones: Normal Files and Critical Files. Ghost and Excluded Files Division: The interface visually informs about the status of unchanged files (existing in the previous patch version) and files excluded from the update. Show/Hide Ghosts: With one click, you can hide unchanged files to focus solely on what you are actually sending to players in this update.   2. Intuitive Interaction: Drag & Drop: Full Drag & Drop support. You can grab files or entire folders and drag them between the "Normal" and "Critical" lists. Transfer is intelligent – it moves the entire content of selected folders. Keyboard Shortcuts: Fast workflow thanks to keyboard support: Delete, Enter, Ctrl+A / Ctrl+C (select and copy paths).   3. Advanced Filtering and Searching: Context Search: The search bar works in real-time, filtering the file tree. Type /folder: Searches only within folder names. Type *ex: Shows only excluded files. Standard Typing: Searches files by name.   4. Automation and Security: Auto Self-Update: The Builder automatically detects the updater executable file. Real-Time Statistics: The status bar continuously shows the file count (Normal/Critical), total patch weight (in Bytes/MB/GB), and the last update date. System File Protection: Files marked as "Critical" cannot be accidentally added to the exclusion list – the program blocks such actions.   5. Performance (Backend): ZSTD Compression: The Builder uses the latest Zstandard algorithm to compress files before sending, ensuring a significantly smaller patch size than standard ZIP, saving server bandwidth and player time. Multi-threading: The packing and MD5 checksum generation process utilizes multiple CPU threads, drastically reducing patch building time.   - PRICING - NEW Updater standard price: 79 euro (if You ask for mods, price will change).   - CONTACT - Discord: ave7309   CLICK HERE TO CHECK LATEST TEMPLATES!                         * I have right to REFUSE to take an order. * Supported games: Lineage 2 / Black Desert / MU Online / Tantra / Rohan / Aion / Cabal / Fiesta any more...  
  • 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..