|
Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo. Caso seja registrado, efetue login. Esqueceu sua senha? Clique aqui Recomendamos o uso do Mozilla Firefox para uma melhor visualização. |
|
| Início | Postados Hoje | Marcar Fóruns Como Lidos | Álbums | Banidos | SE Team | Medalhas |
|
|||||||
| Registrar | Loteria VIP | Staff SE | Regras do fórum | Comunidade | Arcade | Postados Hoje | Pesquisar | Experience |
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
LinkBack | Ferramentas do Tópico | Modos de Exibição |
|
|
#1 (permalink) | |||||||||||||||
|
Jesus Te Ama, Mas EU Não!
![]() Registrado em: Oct 2008
Localização: 45º 33º 34º N | 122º 41º 41º W DESTINATION: ANYWHERE Adidas
Posts: 4,133
Agradeceu: 837
Agradecido 6,058 Vezes em 2,106 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]()
Nome Real: Anderson Andrade
|
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
O nome do evento é Zodiac e nele contém 5 eventos aludidos posteriormente:
Descrição: Correções de bugs (por eventos separados) Sistema de proteção IP Tempo entre eventos Tempo para início Configuração sobre a recompensa que os jogadores estarão recebendo [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar] [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar] Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
Index: L2jHellasC/config/Mods/Event.ini
===================================================================
--- L2jHellasC/config/Mods/Event.ini (revision 205)
+++ L2jHellasC/config/Mods/Event.ini (working copy)
@@ -2,6 +2,31 @@
# Events #
######################################
+#=====================#
+# Zodiac Event Engine #
+#=====================#
+#Currently contains 4 unique events
+#will add more in the near future!
+#Enable Zodiac Engine?
+Zodiace = true
+#Same ip protection?
+SameIpProtection = false
+#What should players get from
+#zodiacs event's?
+ZodiadReward = 3470
+#How many rewards should they win?
+ZodiadRewardc = 1
+#How many minutes should the players have to vote?
+#It should be 10 or lower
+VotingMin = 2
+#How many !minutes! should we w8 to
+#start the first event after the gs is on?
+MinutesInitial = 2
+#How many minutes after the next one starts?
+MinutesAfterEvent = 60
+
+
+
#==================#
# CTF Engine #
#==================#
Index: L2jHellasC/java/com/l2jhellas/Config.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/Config.java (revision 206)
+++ L2jHellasC/java/com/l2jhellas/Config.java (working copy)
@@ -83,7 +83,6 @@
* LoginServer Config locations *
*********************************/
public static final String LOGIN_CONFIGURATION_FILE = "./config/Network/LoginServer.ini";
-
// ================================
// GameServer && LoginServer
// ================================
@@ -727,6 +726,14 @@
public static boolean ENABLE_HITMAN_EVENT;
public static boolean HITMAN_TAKE_KARMA;
+ public static boolean ZODIAC_ENABLE;
+ public static int ZODIAC_REWARD;
+ public static int ZODIAC_REWARD_COUN;
+ public static boolean SAME_IP_ZODIAC;
+ public static int ZODIAC_VOTE_MINUTES;
+ public static int INITIAL_START;
+ public static int BETWEEN_EVENTS;
+
// TVT_CONFIG_FILE
public static boolean TVT_AUTO_STARTUP_ON_BOOT;
public static boolean TVT_ALLOW_INTERFERENCE;
@@ -1841,6 +1848,14 @@
if (VIP_MIN_PARTICIPANTS < 10)
VIP_MIN_PARTICIPANTS = 10; // can't be set less then lvl 10
+ ZODIAC_ENABLE = Boolean.parseBoolean(EventSettings.getProperty("Zodiace", "true"));
+ ZODIAC_REWARD = Integer.parseInt(EventSettings.getProperty("ZodiadReward", "3470"));
+ ZODIAC_REWARD_COUN = Integer.parseInt(EventSettings.getProperty("ZodiadRewardc", "1"));
+ SAME_IP_ZODIAC= Boolean.parseBoolean(EventSettings.getProperty("SameIpProtection", "true"));
+ ZODIAC_VOTE_MINUTES= Integer.parseInt(EventSettings.getProperty("VotingMin", "5"));
+ INITIAL_START= Integer.parseInt(EventSettings.getProperty("MinutesInitial", "10"));
+ BETWEEN_EVENTS =Integer.parseInt(EventSettings.getProperty("MinutesAfterEvent", "60"));
+
FIRST_TVT_DELAY = Integer.parseInt(EventSettings.getProperty("FirstEventDelay", "10"));
TVT_AURA = Boolean.parseBoolean(EventSettings.getProperty("TvTAura", "true"));
TVT_JOIN_CURSED = Boolean.parseBoolean(EventSettings.getProperty("TvTJoinWithCursedWeapon", "true"));
Index: L2jHellasC/java/com/l2jhellas/gameserver/GameServer.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/GameServer.java (revision 206)
+++ L2jHellasC/java/com/l2jhellas/gameserver/GameServer.java (working copy)
@@ -110,6 +110,7 @@
import com.l2jhellas.gameserver.model.entity.Olympiad;
import com.l2jhellas.gameserver.model.entity.engines.Hitman;
import com.l2jhellas.gameserver.model.entity.engines.QuizEvent;
+import com.l2jhellas.gameserver.model.entity.engines.ZodiacMain;
import com.l2jhellas.gameserver.network.L2GameClient;
import com.l2jhellas.gameserver.network.L2GamePacketHandler;
import com.l2jhellas.gameserver.script.faenor.FaenorScriptEngine;
@@ -162,6 +163,7 @@
DayNightSpawnManager.getInstance().notifyChangeMode();
AutoChatHandler.getInstance();
Universe.getInstance();
+ ZodiacMain.ZodiacIn();
FloodProtector.getInstance();
StaticObjects.getInstance();
TeleportLocationTable.getInstance();
Index: L2jHellasC/java/com/l2jhellas/gameserver/handler/VoicedCommandHandler.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/handler/VoicedCommandHandler.java (revision 206)
+++ L2jHellasC/java/com/l2jhellas/gameserver/handler/VoicedCommandHandler.java (working copy)
@@ -33,6 +33,7 @@
import com.l2jhellas.gameserver.handler.voicedcommandhandlers.VipTeleport;
import com.l2jhellas.gameserver.handler.voicedcommandhandlers.VoiceInfo;
import com.l2jhellas.gameserver.handler.voicedcommandhandlers.Wedding;
+import com.l2jhellas.gameserver.handler.voicedcommandhandlers.ZodiacRegistration;
import com.l2jhellas.gameserver.handler.voicedcommandhandlers.pmoff;
import com.l2jhellas.gameserver.handler.voicedcommandhandlers.stat;
import com.l2jhellas.gameserver.handler.voicedcommandhandlers.tradeoff;
@@ -95,6 +96,8 @@
registerVoicedCommandHandler(new ChaosCmd());
registerVoicedCommandHandler(new Premium());
registerVoicedCommandHandler(new QuizCmd());
+ if(Config.ZODIAC_ENABLE)
+ registerVoicedCommandHandler(new ZodiacRegistration());
_log.log(Level.INFO, getClass().getSimpleName() + ": Loaded " + size() + " Handlers in total.");
}
Index: L2jHellasC/java/com/l2jhellas/gameserver/handler/voicedcommandhandlers/ZodiacRegistration.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/handler/voicedcommandhandlers/ZodiacRegistration.java (revision 0)
+++ L2jHellasC/java/com/l2jhellas/gameserver/handler/voicedcommandhandlers/ZodiacRegistration.java (revision 0)
@@ -0,0 +1,105 @@
+/*
+ * 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.l2jhellas.gameserver.handler.voicedcommandhandlers;
+
+import java.io.File;
+
+import com.l2jhellas.Config;
+import com.l2jhellas.gameserver.handler.IVoicedCommandHandler;
+import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jhellas.gameserver.model.entity.engines.CaptureThem;
+import com.l2jhellas.gameserver.model.entity.engines.CastleWars;
+import com.l2jhellas.gameserver.model.entity.engines.PeloponnesianWar;
+import com.l2jhellas.gameserver.model.entity.engines.ProtectTheLdr;
+import com.l2jhellas.gameserver.model.entity.engines.TreasureChest;
+import com.l2jhellas.gameserver.model.entity.engines.ZodiacMain;
+import com.l2jhellas.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * @author Boorinio
+ */
+public class ZodiacRegistration implements IVoicedCommandHandler
+{
+ private static final String[] VOICED_COMMANDS =
+ {
+ "join", "leave"
+ };
+
+ @Override
+ public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+ {
+ String Ip = activeChar.getClient().getConnection().getInetAddress().getHostAddress();
+
+ if (command.startsWith(VOICED_COMMANDS[0]) && ZodiacMain.isEligible(activeChar, Ip))
+ {
+ activeChar.isinZodiac = true;
+ activeChar.sendMessage("You are now registered!");
+ ZodiacMain.Ips.add(Ip);
+ if(CastleWars.CastleWarsRunning)
+ {
+ String Castle_Path = "data/html/zodiac/CastleTutorial.htm";
+ File mainText = new File(Config.DATAPACK_ROOT, Castle_Path);
+ NpcHtmlMessage html = new NpcHtmlMessage(1);
+ html.setFile(Castle_Path);
+ activeChar.sendPacket(html);
+ }
+ else if(CaptureThem.CaptureThemRunning)
+ {
+ String Capture_Path = "data/html/zodiac/Tutorial.htm";
+ File mainText = new File(Config.DATAPACK_ROOT, Capture_Path);
+ NpcHtmlMessage html = new NpcHtmlMessage(1);
+ html.setFile(Capture_Path);
+ activeChar.sendPacket(html);
+ }
+ else if(PeloponnesianWar.PeloRunning)
+ {
+ String Pelo_Path = "data/html/zodiac/TutorialPelo.htm";
+ File mainText = new File(Config.DATAPACK_ROOT, Pelo_Path);
+ NpcHtmlMessage html = new NpcHtmlMessage(1);
+ html.setFile(Pelo_Path);
+ activeChar.sendPacket(html);
+ }
+ else if(ProtectTheLdr.ProtectisRunning)
+ {
+ String Protect_Path = "data/html/zodiac/ProtectTuto.htm";
+ File mainText = new File(Config.DATAPACK_ROOT, Protect_Path);
+ NpcHtmlMessage html = new NpcHtmlMessage(1);
+ html.setFile(Protect_Path);
+ activeChar.sendPacket(html);
+ }
+ else if(TreasureChest.TreasureRunning)
+ {
+ String Capture_Path = "data/html/zodiac/Treasure.htm";
+ File mainText = new File(Config.DATAPACK_ROOT, Capture_Path);
+ NpcHtmlMessage html = new NpcHtmlMessage(1);
+ html.setFile(Capture_Path);
+ activeChar.sendPacket(html);
+ }
+ }
+ if ((command.startsWith(VOICED_COMMANDS[1]) && activeChar.isinZodiac))
+ {
+ activeChar.isinZodiac = false;
+ activeChar.sendMessage("You are now unregistered!");
+ ZodiacMain.Ips.remove(Ip);
+ }
+ return true;
+ }
+
+ @Override
+ public String[] getVoicedCommandList()
+ {
+ return VOICED_COMMANDS;
+ }
+}
\ No newline at end of file
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2NpcInstance.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2NpcInstance.java (revision 206)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2NpcInstance.java (working copy)
@@ -63,7 +63,11 @@
import com.l2jhellas.gameserver.model.entity.L2Event;
import com.l2jhellas.gameserver.model.entity.Olympiad;
import com.l2jhellas.gameserver.model.entity.engines.CTF;
+import com.l2jhellas.gameserver.model.entity.engines.CaptureThem;
+import com.l2jhellas.gameserver.model.entity.engines.CastleWars;
import com.l2jhellas.gameserver.model.entity.engines.DM;
+import com.l2jhellas.gameserver.model.entity.engines.ProtectTheLdr;
+import com.l2jhellas.gameserver.model.entity.engines.TreasureChest;
import com.l2jhellas.gameserver.model.entity.engines.TvT;
import com.l2jhellas.gameserver.model.entity.engines.VIP;
import com.l2jhellas.gameserver.model.quest.Quest;
@@ -2248,7 +2252,28 @@
{
if (!super.doDie(killer))
return false;
-
+ if(getNpcId() == 18286 && TreasureChest.TreasureRunning)
+ {
+ TreasureChest.LuckyOne((L2PcInstance) killer);
+ }
+ if(getNpcId() == 36006)
+ {
+ if(!CastleWars.isFinished&&CastleWars.CastleWarsRunning)
+ {
+ CastleWars.flagskilled++;
+ CastleWars.attackersWin();
+ }
+ if( CaptureThem.CaptureThemRunning)
+ ((L2PcInstance) killer).ZodiacPoints = ((L2PcInstance) killer).ZodiacPoints+10;
+ }
+ if(getNpcId() == 36007&&ProtectTheLdr.ProtectisRunning)
+ {
+ ProtectTheLdr.team2wins();
+ }
+ if(getNpcId() == 36008&&ProtectTheLdr.ProtectisRunning)
+ {
+ ProtectTheLdr.team1wins();
+ }
// normally this wouldn't really be needed, but for those few exceptions,
// we do need to reset the weapons back to the initial templated weapon.
_currentLHandId = getTemplate().lhand;
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2PcInstance.java (revision 206)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -136,9 +136,13 @@
import com.l2jhellas.gameserver.model.entity.Olympiad;
import com.l2jhellas.gameserver.model.entity.Siege;
import com.l2jhellas.gameserver.model.entity.engines.CTF;
+import com.l2jhellas.gameserver.model.entity.engines.CaptureThem;
+import com.l2jhellas.gameserver.model.entity.engines.CastleWars;
import com.l2jhellas.gameserver.model.entity.engines.ChaosEvent;
import com.l2jhellas.gameserver.model.entity.engines.DM;
import com.l2jhellas.gameserver.model.entity.engines.Hitman;
+import com.l2jhellas.gameserver.model.entity.engines.PeloponnesianWar;
+import com.l2jhellas.gameserver.model.entity.engines.ProtectTheLdr;
import com.l2jhellas.gameserver.model.entity.engines.TvT;
import com.l2jhellas.gameserver.model.entity.engines.VIP;
import com.l2jhellas.gameserver.model.quest.Quest;
@@ -230,6 +234,9 @@
// Chaos Event.
public int _chaosKills;
public boolean _inChaosEvent = false;
+ public boolean isinZodiac;
+ public int ZodiacPoints;
+ public int CountIps;
// Character Skills
private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?";
@@ -5090,6 +5097,22 @@
RankPvpSystem cps = new RankPvpSystem(killer, this);
cps.doPvp();
}
+ if (CastleWars.CastleWarsRunning && (isinZodiac && pk.isinZodiac))
+ {
+ sendMessage("You will be revived in your spot");
+
+ }
+ if((pk.isinZodiac&&pk.isinZodiac) && CaptureThem.CaptureThemRunning)
+ pk.ZodiacPoints ++;
+ if(isinZodiac&&PeloponnesianWar.PeloRunning)
+ {
+ isinZodiac = false;
+ teleToLocation(82698, 148638,-3473);
+ getAppearance().setNameColor(0xFFFFFF);
+ setTitle("");
+ broadcastUserInfo();
+ }
+
if (pk != null && pk._inEventTvT && _inEventTvT)
{
if (TvT._teleport || TvT._started)
@@ -11130,7 +11153,21 @@
sendPacket(new EtcStatusUpdate(this));
_reviveRequested = 0;
_revivePower = 0;
+ if (CastleWars.CastleWarsRunning)
+ {
+ if (CastleWars.isattacker(this))
+ {
+
+ teleToLocation(CastleWars.attackersx, CastleWars.attackersy, CastleWars.attackersz);
+ }
+ if (CastleWars.isdefender(this))
+ {
+
+ teleToLocation(CastleWars.defendersx, CastleWars.defendersy, CastleWars.defendersz);
+ }
+ }
+
if (isInParty() && getParty().isInDimensionalRift())
{
if (!DimensionalRiftManager.getInstance().checkIfInPeaceZone(getX(), getY(), getZ()))
@@ -11136,7 +11173,33 @@
if (!DimensionalRiftManager.getInstance().checkIfInPeaceZone(getX(), getY(), getZ()))
getParty().getDimensionalRift().memberRessurected(this);
}
-
+ if(isinZodiac && CaptureThem.CaptureThemRunning)
+ {
+ getStatus().setCurrentHp(getMaxHp());
+ getStatus().setCurrentMp(getMaxMp());
+ getStatus().setCurrentCp(getMaxCp());
+ teleToLocation(149722, 46700, -3413);
+ L2Skill skill;
+ skill = SkillTable.getInstance().getInfo(1323, 1);
+ skill.getEffects(this,this);
+ }
+ if(isinZodiac && ProtectTheLdr.ProtectisRunning)
+ {
+ getStatus().setCurrentHp(getMaxHp());
+ getStatus().setCurrentMp(getMaxMp());
+ getStatus().setCurrentCp(getMaxCp());
+ L2Skill skill;
+ skill = SkillTable.getInstance().getInfo(1323, 1);
+ skill.getEffects(this,this);
+ if(ProtectTheLdr._Team1.contains(this))
+ {
+ teleToLocation(ProtectTheLdr.team1x, ProtectTheLdr.team1y, ProtectTheLdr.team1z);
+ }
+ if(ProtectTheLdr._Team2.contains(this))
+ {
+ teleToLocation(ProtectTheLdr.team2x, ProtectTheLdr.team2y, ProtectTheLdr.team2z);
+ }
+ }
ChaosEvent chaos = new ChaosEvent();
if (_inChaosEvent)
{
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2TeleporterInstance.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2TeleporterInstance.java (revision 206)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/actor/instance/L2TeleporterInstance.java (working copy)
@@ -177,6 +177,11 @@
if (list != null)
{
//you cannot teleport to village that is in siege
+ if(player.isinZodiac)
+ {
+ player.sendMessage("You cannot teleport while in Zodiac's Event's");
+ return;
+ }
if (SiegeManager.getInstance().getSiege(list.getLocX(), list.getLocY(), list.getLocZ()) != null)
{
player.sendPacket(new SystemMessage(SystemMessageId.NO_PORT_THAT_IS_IN_SIGE));
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/CaptureThem.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/CaptureThem.java (revision 0)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/CaptureThem.java (revision 0)
@@ -0,0 +1,203 @@
+package com.l2jhellas.gameserver.model.entity.engines;
+
+import java.io.File;
+import java.util.List;
+
+import javolution.util.FastList;
+import javolution.util.FastSet;
+
+import com.l2jhellas.Config;
+import com.l2jhellas.gameserver.Announcements;
+import com.l2jhellas.gameserver.datatables.csv.DoorTable;
+import com.l2jhellas.gameserver.datatables.sql.NpcTable;
+
+import com.l2jhellas.gameserver.model.L2Skill;
+import com.l2jhellas.gameserver.model.L2Spawn;
+import com.l2jhellas.gameserver.model.L2World;
+import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jhellas.gameserver.model.actor.instance.L2NpcInstance;
+import com.l2jhellas.gameserver.model.entity.engines.ZodiacMain;
+import com.l2jhellas.gameserver.network.serverpackets.NpcHtmlMessage;
+import com.l2jhellas.gameserver.skills.SkillTable;
+import com.l2jhellas.gameserver.templates.L2NpcTemplate;
+/**
+ * @author Boorinio
+ */
+public class CaptureThem
+{
+ public static boolean CaptureThemRunning;
+ private static int i;
+ private static List<L2PcInstance> _players = new FastList<L2PcInstance>();
+ private static FastSet<L2NpcInstance> _flags = new FastSet<L2NpcInstance>();
+ private static int flagId =36006;
+ private static int MostPoints=0;
+ public static L2PcInstance MostPointsPlayer;
+ private static int[] flagsx =
+ {
+ 149506,149412,150025,148741,149999,150110,150121,149550,149235,
+ };
+ private static int[] flagsy =
+ {
+ 47471,46144,46670,46750,46221,46464,46872,47105,47871,
+ };
+ private static int flagsz = -3413;
+ public static void openRegistration()
+ {
+ CaptureThemRunning=true;
+ ZodiacMain.ZodiacRegisterActive=true;
+ Announcements.getInstance().announceToAll("CaptureThem Event has Started!");
+ Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
+ Announcements.getInstance().announceToAll("You have 10 minutes to register!");
+ waitSecs(300);
+ Announcements.getInstance().announceToAll("You have 5 minutes to register!");
+ waitSecs(180);
+ Announcements.getInstance().announceToAll("You have 2 minutes to register!");
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("You have 1 minute to register!");
+ waitSecs(60);
+ stopRegistration();
+ }
+ public static void stopRegistration()
+ {
+ Announcements.getInstance().announceToAll("CaptureThem Registration is Over!");
+ for(L2PcInstance players: L2World.getInstance().getAllPlayers() )
+ {
+ ZodiacMain.ZodiacRegisterActive=false;
+ if(players.isinZodiac)
+ {
+ String Capture_Path = "data/html/zodiac/CaptureThem.htm";
+ File mainText = new File(Config.DATAPACK_ROOT, Capture_Path);
+ NpcHtmlMessage html = new NpcHtmlMessage(1);
+ html.setFile(Capture_Path);
+ players.sendPacket(html);
+ _players.add(players);
+
+
+ }
+ }
+ waitSecs(20);
+ if(_players!=null)
+ StartEvent();
+ else
+ {
+ Announcements.getInstance().announceToAll("The event was canceled due to lack of players!");
+ CaptureThemRunning=false;
+ }
+ }
+
+public static void StartEvent()
+ {
+ DoorTable.getInstance().getDoor(24190001).closeMe();
+ DoorTable.getInstance().getDoor(24190002).closeMe();
+ DoorTable.getInstance().getDoor(24190003).closeMe();
+ DoorTable.getInstance().getDoor(24190004).closeMe();
+ L2NpcInstance flags=null;
+ for(i=0;i<9;i++)
+ {
+ flags = addSpawn(flagId,flagsx[i],flagsy[i],flagsz);
+ _flags.add(flags);
+ }
+ for (L2PcInstance players: _players)
+ {
+ players.ZodiacPoints =0;
+ players.getAppearance().setNameColor(0xFF0000);
+ players.setTitle("CaptureThem");
+ L2Skill skill;
+ skill = SkillTable.getInstance().getInfo(1323, 1);
+ skill.getEffects(players, players);
+ players.broadcastUserInfo();
+ players.teleToLocation(149527, 46684, -3413);
+ players.sendMessage("The Event has Started! And will finish in 10 minutes");
+
+ }
+ Announcements.getInstance().announceToAll("You have 10 minutes until the event is over!");
+ waitSecs(300);
+ Announcements.getInstance().announceToAll("You have 5 minutes until the event is over!");
+ waitSecs(180);
+ Announcements.getInstance().announceToAll("You have 2 minutes until the event is over!");
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("You have 1 minute until the event is over!");
+ waitSecs(60);
+ StopClean();
+
+ }
+
+
+public static void StopClean()
+ {
+ for (L2PcInstance players: _players)
+ {
+ if(players.ZodiacPoints>MostPoints)
+ {
+ MostPointsPlayer = players;
+ MostPoints=players.ZodiacPoints;
+ }
+ }
+ if(MostPointsPlayer!=null)
+ {
+ MostPointsPlayer.addItem("Reward", Config.ZODIAC_REWARD,Config.ZODIAC_REWARD_COUN, MostPointsPlayer, true);
+ Announcements.getInstance().announceToAll("Winner of the event "+MostPointsPlayer+" With "+MostPoints+" Points!");
+ }
+ for (L2PcInstance players: _players)
+ {
+ players.getAppearance().setNameColor(0xFFFFFF);
+ players.setTitle("");
+ players.broadcastUserInfo();
+ players.teleToLocation(82698, 148638, -3473);
+ players.broadcastUserInfo();
+ players.isinZodiac=false;
+ players.sendMessage("The Event is officially finished!");
+ }
+ for(L2NpcInstance flags: _flags)
+ {
+ flags.deleteMe();
+
+ }
+ DoorTable.getInstance().getDoor(24190001).openMe();
+ DoorTable.getInstance().getDoor(24190002).openMe();
+ DoorTable.getInstance().getDoor(24190003).openMe();
+ DoorTable.getInstance().getDoor(24190004).openMe();
+ _players.clear();
+ _flags.clear();
+ CaptureThemRunning=false;
+
+
+}
+public static void waitSecs(int i)
+{
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+}
+private static L2NpcInstance addSpawn(int npcId, int x, int y, int z)
+{
+ L2NpcInstance result = null;
+ try
+ {
+ L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
+ if (template != null)
+ {
+ L2Spawn spawn = new L2Spawn(template);
+ spawn.setInstanceId(0);
+ spawn.setHeading(1);
+ spawn.setLocx(x);
+ spawn.setLocy(y);
+ spawn.setLocz(z);
+ spawn.stopRespawn();
+ result = spawn.spawnOne();
+ return result;
+ }
+ }
+ catch (Exception e1)
+ {
+ }
+ return null;
+}
+
+
+}
\ No newline at end of file
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/CastleWars.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/CastleWars.java (revision 0)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/CastleWars.java (revision 0)
@@ -0,0 +1,294 @@
+/*
+ * 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/>.
+ */
+/**
+ * @author Boorinio
+ */
+package com.l2jhellas.gameserver.model.entity.engines;
+
+import java.util.List;
+
+import com.l2jhellas.Config;
+import com.l2jhellas.gameserver.Announcements;
+import com.l2jhellas.gameserver.datatables.csv.DoorTable;
+import com.l2jhellas.gameserver.datatables.sql.NpcTable;
+import com.l2jhellas.gameserver.model.L2Spawn;
+import com.l2jhellas.gameserver.model.L2World;
+import com.l2jhellas.gameserver.model.actor.instance.L2NpcInstance;
+import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jhellas.gameserver.templates.L2NpcTemplate;
+
+import javolution.util.FastList;
+import javolution.util.FastSet;
+
+public class CastleWars
+{
+ private static List<L2PcInstance> _defenders = new FastList<L2PcInstance>();
+ private static List<L2PcInstance> _attackers = new FastList<L2PcInstance>();
+ private static FastSet<L2NpcInstance> _flags = new FastSet<L2NpcInstance>();
+ public static boolean isFinished;
+ public static boolean CastleWarsRunning;
+ private static boolean alaksokolies = false;
+ private static int i;
+ public static int flagskilled = 0;
+ public static int defendersx = 77566;
+ public static int defendersy = -152128;
+ public static int defendersz = -545;
+ public static int attackersx = 84303;
+ public static int attackersy = -140727;
+ public static int attackersz = -1568;
+ public static int[] flagslocx =
+ {
+ 77545, 76663, 78446,
+ };
+ private static int[] flagslocy =
+ {
+ -149937, -154522, -154524,
+ };
+ private static int[] flagslocz =
+ {
+ 345, 128, 235,
+ };
+
+ public static void openRegi()
+ {
+ ZodiacMain.ZodiacRegisterActive=true;
+ Announcements.getInstance().announceToAll("CastleWars Event has Started!");
+ Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
+ Announcements.getInstance().announceToAll("You have 10 minutes to register!");
+ waitSecs(300);
+ Announcements.getInstance().announceToAll("You have 5 minutes to register!");
+ waitSecs(180);
+ Announcements.getInstance().announceToAll("You have 2 minutes to register!");
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("You have 1 minute to register!");
+ waitSecs(60);
+ CastleWarsRunning = true;
+ ZodiacMain.ZodiacRegisterActive=false;
+ isFinished = false;
+ stopRegi();
+ preparecastle();
+ shufflePlayers();
+ teleportThem();
+ if (!isFinished)
+ Announcements.getInstance().announceToAll("You have 10 minutes until the event is over!");
+ waitSecs(300);
+ if (!isFinished)
+ Announcements.getInstance().announceToAll("You have 5 minutes until the event is over!");
+ waitSecs(180);
+ if (!isFinished)
+ Announcements.getInstance().announceToAll("You have 2 minutes until the event is over!");
+ waitSecs(60);
+ if (!isFinished)
+ Announcements.getInstance().announceToAll("You have 1 minute until the event is over!");
+ waitSecs(60);
+ if (!isFinished)
+ {
+ defendersWin();
+
+ }
+
+ }
+
+ public static void preparecastle()
+ {
+ DoorTable.getInstance().getDoor(22130001).openMe();
+ DoorTable.getInstance().getDoor(22130002).openMe();
+ DoorTable.getInstance().getDoor(22130003).openMe();
+ DoorTable.getInstance().getDoor(22130004).openMe();
+ DoorTable.getInstance().getDoor(22130005).openMe();
+ DoorTable.getInstance().getDoor(22130010).openMe();
+ DoorTable.getInstance().getDoor(22130007).openMe();
+ DoorTable.getInstance().getDoor(22130011).openMe();
+ DoorTable.getInstance().getDoor(22130009).openMe();
+ DoorTable.getInstance().getDoor(22130008).openMe();
+ DoorTable.getInstance().getDoor(22130010).openMe();
+ DoorTable.getInstance().getDoor(22130006).openMe();
+ L2NpcInstance flags = null;
+ for (i = 0; i < 3; i++)
+ {
+ flags = addSpawn(36006, flagslocx[i], flagslocy[i], flagslocz[i]);
+ _flags.add(flags);
+ }
+ }
+
+ public static void cleanevent()
+ {
+ for (L2PcInstance defender : _defenders)
+ {
+ defender.getAppearance().setNameColor(0xFFFFFF);
+ defender.setTitle("");
+ defender.broadcastUserInfo();
+ defender.teleToLocation(82724, 148307, -3469);
+ defender.isinZodiac = false;
+ }
+ for (L2PcInstance attacker : _attackers)
+ {
+ attacker.getAppearance().setNameColor(0xFFFFFF);
+ attacker.setTitle("");
+ attacker.broadcastUserInfo();
+ attacker.teleToLocation(82724, 148307, -3469);
+ attacker.isinZodiac = false;
+ }
+ for (L2NpcInstance flags : _flags)
+ {
+ flags.deleteMe();
+
+ }
+ flagskilled = 0;
+ _flags.clear();
+ _defenders.clear();
+ _attackers.clear();
+ DoorTable.getInstance().getDoor(22130001).closeMe();
+ DoorTable.getInstance().getDoor(22130002).closeMe();
+ DoorTable.getInstance().getDoor(22130003).closeMe();
+ DoorTable.getInstance().getDoor(22130004).closeMe();
+ DoorTable.getInstance().getDoor(22130005).closeMe();
+ DoorTable.getInstance().getDoor(22130010).closeMe();
+ DoorTable.getInstance().getDoor(22130007).closeMe();
+ DoorTable.getInstance().getDoor(22130011).closeMe();
+ DoorTable.getInstance().getDoor(22130009).closeMe();
+ DoorTable.getInstance().getDoor(22130008).closeMe();
+ DoorTable.getInstance().getDoor(22130010).closeMe();
+ DoorTable.getInstance().getDoor(22130006).closeMe();
+ }
+
+ public static void defendersWin()
+ {
+ Announcements.getInstance().announceToAll("Defenders Won the event they protected the flags!");
+ for (L2PcInstance defender : _defenders)
+ {
+ defender.sendMessage("Congratulations! Here is a reward for your effort!");
+ defender.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN, defender, true);
+ }
+ isFinished = true;
+ cleanevent();
+ }
+ public static boolean isattacker(L2PcInstance player)
+ {
+
+ if(_attackers.contains(player.getName()))
+ {
+ return true;
+ }
+ else
+ return false;
+
+ }
+ public static boolean isdefender(L2PcInstance player)
+ {
+
+ if(_defenders.contains(player.getName()))
+ {
+ return true;
+ }
+ else
+ return false;
+
+ }
+ public static void attackersWin()
+ {
+ if (flagskilled == 3)
+ {
+ Announcements.getInstance().announceToAll("Attackers Won the event they killed all the flags!");
+ for (L2PcInstance attacker : _attackers)
+ {
+ attacker.sendMessage("Congratulations! Here is a reward for your effort!");
+ attacker.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN,attacker, true);
+ }
+ isFinished = true;
+ cleanevent();
+ }
+ }
+
+ public static void teleportThem()
+ {
+ for (L2PcInstance defender : _defenders)
+ {
+ defender.teleToLocation(defendersx, defendersy, defendersz);
+ }
+ for (L2PcInstance attacker : _attackers)
+ {
+ attacker.teleToLocation(attackersx, attackersy, attackersz);
+ }
+ }
+
+ public static void stopRegi()
+ {
+ Announcements.getInstance().announceToAll("Registrations are now over!");
+ }
+
+ public static void shufflePlayers()
+ {
+ for (L2PcInstance player : L2World.getInstance().getAllPlayers())
+ {
+ if (player.isinZodiac)
+ {
+ if (alaksokolies)
+ {
+ _defenders.add(player);
+ player.getAppearance().setNameColor(0xFF0000);
+ player.setTitle("Defender");
+ player.broadcastUserInfo();
+ alaksokolies = false;
+ }
+ else
+ {
+ _attackers.add(player);
+ player.getAppearance().setNameColor(0x0000FF);
+ player.setTitle("Attacker");
+ player.broadcastUserInfo();
+ alaksokolies = true;
+ }
+ }
+ }
+ }
+
+ public static void waitSecs(int i)
+ {
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+ }
+
+ private static L2NpcInstance addSpawn(int npcId, int x, int y, int z)
+ {
+ L2NpcInstance result = null;
+ try
+ {
+ L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
+ if (template != null)
+ {
+ L2Spawn spawn = new L2Spawn(template);
+ spawn.setInstanceId(0);
+ spawn.setHeading(1);
+ spawn.setLocx(x);
+ spawn.setLocy(y);
+ spawn.setLocz(z);
+ spawn.stopRespawn();
+ result = spawn.spawnOne();
+ return result;
+ }
+ }
+ catch (Exception e1)
+ {
+ }
+ return null;
+ }
+}
\ No newline at end of file
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/PeloponnesianWar.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/PeloponnesianWar.java (revision 0)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/PeloponnesianWar.java (revision 0)
@@ -0,0 +1,309 @@
+package com.l2jhellas.gameserver.model.entity.engines;
+
+import java.util.List;
+
+import javolution.util.FastList;
+import javolution.util.FastSet;
+
+import com.l2jhellas.Config;
+import com.l2jhellas.gameserver.Announcements;
+import com.l2jhellas.gameserver.datatables.sql.NpcTable;
+import com.l2jhellas.gameserver.model.L2Spawn;
+import com.l2jhellas.gameserver.model.L2World;
+import com.l2jhellas.gameserver.model.actor.instance.L2NpcInstance;
+import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jhellas.gameserver.templates.L2NpcTemplate;
+
+/**
+ * @author Boorinio
+ */
+public class PeloponnesianWar
+{
+ private static boolean alaksokolies = true;
+ public static boolean PeloRunning, continuez, continuez2;
+ private static int i, countA, countS;
+ private static List<L2PcInstance> _participants = new FastList<L2PcInstance>();
+ private static List<L2PcInstance> _athenians = new FastList<L2PcInstance>();
+ private static List<L2PcInstance> _spartans = new FastList<L2PcInstance>();
+ private static FastSet<L2NpcInstance> _protectors = new FastSet<L2NpcInstance>();
+ private static int athenianx = 72923;
+ private static int atheniany = 142764;
+ private static int athenianz = -3773;
+ private static int spartanx = -87891;
+ private static int spartany = 142198;
+ private static int spartanz = -3646;
+ private static int protectors = 30627;
+ private static int[] protectorsx =
+ {
+ 72931, 72995, 73011, 73070, -87921, -87998, -87908, -87836,
+ };
+ private static int[] protectorsy =
+ {
+ 143270, 143250, 142272, 142282, 142707, 142679, 141758, 141777,
+ };
+ private static int[] protectorsz =
+ {
+ -3773, -3773, -3773, -3773, -3646, -3646, -3646, -3646,
+ };
+
+ public static void startevent()
+
+ {
+ PeloRunning = true;
+ ZodiacMain.ZodiacRegisterActive = true;
+ Announcements.getInstance().announceToAll("Peloponnesian War Event has Started!");
+ Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
+ Announcements.getInstance().announceToAll("You have 10 minutes to register!");
+ waitSecs(300);
+ Announcements.getInstance().announceToAll("You have 5 minutes to register!");
+ waitSecs(180);
+ Announcements.getInstance().announceToAll("You have 2 minutes to register!");
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("You have 1 minute to register!");
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("Registrations closed!");
+ ZodiacMain.ZodiacRegisterActive = false;
+ for (L2PcInstance player : L2World.getInstance().getAllPlayers())
+ {
+ if (player.isinZodiac)
+ {
+ _participants.add(player);
+ if (alaksokolies)
+ {
+ _spartans.add(player);
+ player.setTitle("Spartan");
+ player.getAppearance().setNameColor(0x0000FF);
+ player.broadcastUserInfo();
+ alaksokolies = false;
+ }
+ else
+ {
+ _athenians.add(player);
+ player.setTitle("Athenian");
+ player.getAppearance().setNameColor(0xFF0000);
+ player.broadcastUserInfo();
+ alaksokolies = true;
+ }
+
+ }
+ }
+ spawnProtectors();
+ teleportplayers();
+ Announcements.getInstance().announceToAll("Civil War round started!");
+ Announcements.getInstance().announceToAll("You have 3 minutes the one who survive will face the opponent race!!");
+ waitSecs(180);
+ for (L2PcInstance finals : _athenians)
+ {
+ if (finals.isinZodiac)
+ countA++;
+ }
+ for (L2PcInstance finals : _spartans)
+ {
+ if (finals.isinZodiac)
+ countS++;
+ }
+ if (countA > 1)
+ {
+ Announcements.getInstance().announceToAll("Athenians cheated and tried to send more than two players Spartans won!");
+ reward(false);
+ }
+ else if (countS > 1)
+ {
+ Announcements.getInstance().announceToAll("Spartans cheated and tried to send more than two players Athenians won!");
+ reward(true);
+ }
+ else
+ {
+ finalround();
+ Announcements.getInstance().announceToAll("Spartan and Athenian representative have 2 minutes to face each other");
+ waitSecs(120);
+ checkwhowon();
+ }
+ cleanthemess();
+ }
+
+ public static void cleanthemess()
+ {
+ for (L2PcInstance participant : _participants)
+ {
+ if (participant.isinZodiac)
+ {
+ participant.setTitle("");
+ participant.getAppearance().setNameColor(0xFFFFFF);
+ participant.broadcastUserInfo();
+ participant.teleToLocation(82698, 148638, -3473);
+ }
+ participant.isinZodiac = false;
+ }
+ for (L2NpcInstance protectors : _protectors)
+ {
+ protectors.deleteMe();
+ }
+ continuez = false;
+ continuez2 = false;
+ PeloRunning = false;
+ _protectors.clear();
+ _participants.clear();
+ _athenians.clear();
+ _spartans.clear();
+ }
+
+ private static void reward(boolean Athenians)
+ {
+ if (Athenians)
+ {
+ for (L2PcInstance athenians : _athenians)
+ {
+
+ athenians.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN, athenians, true);
+
+ }
+ }
+ else
+ {
+ for (L2PcInstance spartans : _spartans)
+ {
+
+ spartans.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN, spartans, true);
+
+ }
+ }
+ }
+
+ public static void checkwhowon()
+ {
+ for (L2PcInstance winner : _participants)
+ {
+ if (winner.isinZodiac && _athenians.contains(winner))
+ {
+
+ continuez = true;
+ }
+ if (winner.isinZodiac && _spartans.contains(winner))
+ {
+
+ continuez2 = true;
+ }
+ if (continuez && continuez2)
+ {
+ Announcements.getInstance().announceToAll("Both representatives are alive blame them for not getting a reward!");
+ }
+ else if (continuez)
+ {
+ Announcements.getInstance().announceToAll("Athenians won!");
+ reward(true);
+ }
+ else if (continuez2)
+ {
+ Announcements.getInstance().announceToAll("Spartans won!");
+ reward(false);
+ }
+ }
+ }
+
+ public static void finalround()
+ {
+ for (L2PcInstance athenian : _athenians)
+ {
+ if (athenian.isinZodiac)
+ {
+ athenian.sendMessage("You are the best athenian you will face the best spartan");
+ athenian.setTitle("FinalAthenian");
+ athenian.setCurrentHp(athenian.getMaxHp());
+ athenian.setCurrentMp(athenian.getMaxMp());
+ athenian.setCurrentCp(athenian.getMaxCp());
+ athenian.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN, athenian, true);
+ athenian.broadcastUserInfo();
+ athenian.teleToLocation(-21754, -20955, -3026);
+ }
+ }
+ for (L2PcInstance spartan : _spartans)
+ {
+ if (spartan.isinZodiac)
+ {
+ spartan.sendMessage("You are the best spartan you will face the best athenian");
+ spartan.setTitle("FinalSpartan");
+ spartan.setCurrentHp(spartan.getMaxHp());
+ spartan.setCurrentMp(spartan.getMaxMp());
+ spartan.setCurrentCp(spartan.getMaxCp());
+ spartan.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN, spartan, true);
+ spartan.broadcastUserInfo();
+ spartan.teleToLocation(-19821, -20988, -3026);
+ }
+ }
+ }
+
+ public static void teleportplayers()
+ {
+ for (L2PcInstance player : _participants)
+ {
+ if (_athenians.contains(player))
+ {
+ player.teleToLocation(athenianx, atheniany, athenianz);
+ }
+ else
+ {
+ player.teleToLocation(spartanx, spartany, spartanz);
+ }
+ }
+ }
+
+ public static void spawnProtectors()
+ {
+ L2NpcInstance protector = null;
+ for (i = 0; i < 8; i++)
+ {
+ protector = addSpawn(protectors, protectorsx[i], protectorsy[i], protectorsz[i]);
+ _protectors.add(protector);
+ }
+ }
+
+ public static void RemoveAthenian(String name)
+ {
+ _athenians.remove(name);
+
+ }
+
+ public static void RemoveSpartan(String name)
+ {
+ _spartans.remove(name);
+ }
+
+ public static void waitSecs(int i)
+ {
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+ }
+
+ private static L2NpcInstance addSpawn(int npcId, int x, int y, int z)
+ {
+ L2NpcInstance result = null;
+ try
+ {
+ L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
+ if (template != null)
+ {
+ L2Spawn spawn = new L2Spawn(template);
+ spawn.setInstanceId(0);
+ spawn.setHeading(1);
+ spawn.setLocx(x);
+ spawn.setLocy(y);
+ spawn.setLocz(z);
+ spawn.stopRespawn();
+ result = spawn.spawnOne();
+ return result;
+ }
+ }
+ catch (Exception e1)
+ {
+ }
+ return null;
+ }
+
+}
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/ProtectTheLdr.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/ProtectTheLdr.java (revision 0)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/ProtectTheLdr.java (revision 0)
@@ -0,0 +1,196 @@
+/*
+ * 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/>.
+ */
+/**
+ * @author Boorinio
+ */
+package com.l2jhellas.gameserver.model.entity.engines;
+
+import java.util.List;
+
+import javolution.util.FastList;
+import javolution.util.FastSet;
+
+import com.l2jhellas.Config;
+import com.l2jhellas.gameserver.Announcements;
+import com.l2jhellas.gameserver.datatables.sql.NpcTable;
+import com.l2jhellas.gameserver.model.L2Spawn;
+import com.l2jhellas.gameserver.model.L2World;
+import com.l2jhellas.gameserver.model.actor.instance.L2NpcInstance;
+import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jhellas.gameserver.templates.L2NpcTemplate;
+
+public class ProtectTheLdr
+{
+ public static List<L2PcInstance> _Team1 = new FastList<L2PcInstance>();
+ public static List<L2PcInstance> _Team2 = new FastList<L2PcInstance>();
+ public static int team1x=-19790;
+ public static int team1y=-21023;
+ public static int team1z=-3025;
+ private static int leader1=36007;
+ public static int team2x=-21780,team2y=-20976,team2z=-3027,leader2=36008;
+ private static int leader2x=-21717,leader2y=-20859,leader2z=-3027;
+ private static int leader1x=-19846,leader1y=-20859,leader1z=-3027;
+ public static boolean ProtectisRunning,alaksokolies;
+ private static FastSet<L2NpcInstance> _leaders = new FastSet<L2NpcInstance>();
+
+ public static void startevent()
+ {
+ ZodiacMain.ZodiacRegisterActive=true;
+ Announcements.getInstance().announceToAll("ProtectTheLeader Event has Started!");
+ Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
+ Announcements.getInstance().announceToAll("You have 10 minutes to register!");
+ waitSecs(300);
+ Announcements.getInstance().announceToAll("You have 5 minutes to register!");
+ waitSecs(180);
+ Announcements.getInstance().announceToAll("You have 2 minutes to register!");
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("You have 1 minute to register!");
+ waitSecs(60);
+ ZodiacMain.ZodiacRegisterActive=false;
+ ProtectisRunning=true;
+ Announcements.getInstance().announceToAll("Registrations are now over!");
+ shufflePlayers();
+ teleportplayers();
+ L2NpcInstance spawn1 = null;
+ L2NpcInstance spawn2 = null;
+ spawn1=addSpawn(leader1,leader1x, leader1y,leader1z);
+ spawn2=addSpawn(leader2,leader2x, leader2y,leader2z);
+ _leaders.add(spawn1);
+ _leaders.add(spawn2);
+ Announcements.getInstance().announceToAll("Go kill the enemy's Leader rb!");
+ }
+ public static void team1wins()
+ {
+ Announcements.getInstance().announceToAll("Team 1 won team's 2 leader is dead!");
+ for(L2PcInstance member: _Team1)
+ {
+
+ member.sendMessage("Congratulations! The enemy leader is dead!");
+ member.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN,member, true);
+ }
+ cleanthemess();
+ }
+ public static void team2wins()
+ {
+ Announcements.getInstance().announceToAll("Team 2 won team's 1 leader is dead!");
+ for(L2PcInstance member: _Team2)
+ {
+
+ member.sendMessage("Congratulations! The enemy leader is dead!");
+ member.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN,member, true);
+ }
+ cleanthemess();
+ }
+ public static void cleanthemess()
+ {
+ for(L2PcInstance member: _Team1)
+ {
+ member.getAppearance().setNameColor(0xFFFFFF);
+ member.setTitle("");
+ member.broadcastUserInfo();
+ member.isinZodiac = false;
+ member.teleToLocation(82743, 148219, -3470);
+
+ }
+ for(L2PcInstance member: _Team2)
+ {
+ member.getAppearance().setNameColor(0xFFFFFF);
+ member.setTitle("");
+ member.broadcastUserInfo();
+ member.isinZodiac = false;
+ member.teleToLocation(82743, 148219, -3470);
+ }
+ for (L2NpcInstance leader : _leaders)
+ {
+ leader.deleteMe();
+
+ }
+ ProtectisRunning=false;
+ }
+ public static void teleportplayers()
+ {
+ for(L2PcInstance member: _Team1)
+ {
+ member.teleToLocation(team1x,team1y,team1z);
+ }
+ for(L2PcInstance member: _Team2)
+ {
+ member.teleToLocation(team2x,team2y,team2z);
+ }
+ }
+ public static void shufflePlayers()
+ {
+ for (L2PcInstance player : L2World.getInstance().getAllPlayers())
+ {
+ if (player.isinZodiac)
+ {
+ if (alaksokolies)
+ {
+ _Team1.add(player);
+ player.getAppearance().setNameColor(0xFF0000);
+ player.setTitle("Team1");
+ player.broadcastUserInfo();
+ alaksokolies = false;
+ }
+ else
+ {
+ _Team2.add(player);
+ player.getAppearance().setNameColor(0x0000FF);
+ player.setTitle("Team2");
+ player.broadcastUserInfo();
+ alaksokolies = true;
+ }
+ }
+ }
+ }
+
+ public static void waitSecs(int i)
+ {
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+ }
+
+ private static L2NpcInstance addSpawn(int npcId, int x, int y, int z)
+ {
+ L2NpcInstance result = null;
+ try
+ {
+ L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
+ if (template != null)
+ {
+ L2Spawn spawn = new L2Spawn(template);
+ spawn.setInstanceId(0);
+ spawn.setHeading(1);
+ spawn.setLocx(x);
+ spawn.setLocy(y);
+ spawn.setLocz(z);
+ spawn.stopRespawn();
+ result = spawn.spawnOne();
+ return result;
+ }
+ }
+ catch (Exception e1)
+ {
+ }
+ return null;
+ }
+
+}
\ No newline at end of file
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/TreasureChest.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/TreasureChest.java (revision 0)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/TreasureChest.java (revision 0)
@@ -0,0 +1,133 @@
+package com.l2jhellas.gameserver.model.entity.engines;
+
+import java.util.List;
+
+import javolution.util.FastList;
+import javolution.util.FastSet;
+
+import com.l2jhellas.Config;
+import com.l2jhellas.gameserver.Announcements;
+import com.l2jhellas.gameserver.datatables.sql.NpcTable;
+import com.l2jhellas.gameserver.model.L2Spawn;
+import com.l2jhellas.gameserver.model.L2World;
+import com.l2jhellas.gameserver.model.actor.instance.L2NpcInstance;
+import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jhellas.gameserver.templates.L2NpcTemplate;
+import com.l2jhellas.util.Rnd;
+
+public class TreasureChest
+{
+ public static boolean TreasureRunning;
+ private static List<L2PcInstance> _players = new FastList<L2PcInstance>();
+ private static FastSet<L2NpcInstance> _Npcs = new FastSet<L2NpcInstance>();
+ private static int x = 87377, y = 20459, z = -5270, i;
+
+ public static void registration()
+ {
+ ZodiacMain.ZodiacRegisterActive = true;
+ Announcements.getInstance().announceToAll("TreasureChest Event has Started!");
+ Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
+ Announcements.getInstance().announceToAll("You have 10 minutes to register!");
+ waitSecs(300);
+ Announcements.getInstance().announceToAll("You have 5 minutes to register!");
+ waitSecs(180);
+ Announcements.getInstance().announceToAll("You have 2 minutes to register!");
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("You have 1 minute to register!");
+ waitSecs(60);
+ for (L2PcInstance players : L2World.getInstance().getAllPlayers())
+ {
+
+ if (players.isinZodiac)
+ {
+
+ _players.add(players);
+
+ }
+ }
+ if (_players != null)
+ startevent();
+ else
+ Announcements.getInstance().announceToAll("Event was cancelled cause no one registered!");
+
+ }
+
+ public static void startevent()
+ {
+ ZodiacMain.ZodiacRegisterActive = false;
+ TreasureRunning = true;
+ for (L2PcInstance players : _players)
+ {
+ players.teleToLocation(x, y, z, true);
+ players.sendMessage("Kill as many chest as you can!");
+ }
+ L2NpcInstance npcs = null;
+ for (i = 0; i < 40; i++)
+ {
+ npcs = addSpawn(18286, x + Rnd.get(-750, +750), y + Rnd.get(-750, +750), z);
+ _Npcs.add(npcs);
+ }
+ }
+
+ public static void LuckyOne(L2PcInstance killer)
+ {
+ if (Rnd.get(50) == 2)
+ {
+ Announcements.getInstance().announceToAll(killer + " killed the lucky chest!");
+ killer.addItem("Reward", Config.ZODIAC_REWARD, Config.ZODIAC_REWARD_COUN, killer, true);
+ cleanthemess();
+ }
+ }
+
+ public static void cleanthemess()
+ {
+ for (L2PcInstance players : _players)
+ {
+ players.teleToLocation(83225, 148068, -3430, true);
+ }
+ for (L2NpcInstance npc : _Npcs)
+ {
+ npc.deleteMe();
+ }
+ TreasureRunning = false;
+ _players.clear();
+ _Npcs.clear();
+ }
+
+ public static void waitSecs(int i)
+ {
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+ }
+
+ private static L2NpcInstance addSpawn(int npcId, int x, int y, int z)
+ {
+ L2NpcInstance result = null;
+ try
+ {
+ L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
+ if (template != null)
+ {
+ L2Spawn spawn = new L2Spawn(template);
+ spawn.setInstanceId(0);
+ spawn.setHeading(1);
+ spawn.setLocx(x);
+ spawn.setLocy(y);
+ spawn.setLocz(z);
+ spawn.stopRespawn();
+ result = spawn.spawnOne();
+ return result;
+ }
+ }
+ catch (Exception e1)
+ {
+ }
+ return null;
+ }
+}
\ No newline at end of file
Index: L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/ZodiacMain.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/ZodiacMain.java (revision 0)
+++ L2jHellasC/java/com/l2jhellas/gameserver/model/entity/engines/ZodiacMain.java (revision 0)
@@ -0,0 +1,319 @@
+package com.l2jhellas.gameserver.model.entity.engines;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javolution.text.TextBuilder;
+
+import com.l2jhellas.Config;
+import com.l2jhellas.gameserver.Announcements;
+import com.l2jhellas.gameserver.ThreadPoolManager;
+import com.l2jhellas.gameserver.model.L2World;
+import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jhellas.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * @author Boorinio
+ */
+public class ZodiacMain
+{
+ public static List<String> Ips = new ArrayList<String>();
+ public static boolean ZodiacRegisterActive;
+ public static int i, max;
+ public static int[] count =
+ {
+ 0, 0, 0, 0, 0
+ };
+ public static boolean voting;
+
+ public static void ZodiacIn()
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ startVoting();
+ }
+ }, 60 * 1000 * Config.INITIAL_START);
+ }
+
+ public static void startVoting()
+ {
+ voting = true;
+ for (L2PcInstance players : L2World.getInstance().getAllPlayers())
+ {
+ showHtmlWindow(players);
+ }
+ switch (Config.ZODIAC_VOTE_MINUTES)
+ {
+ case 10:
+ Announcements.getInstance().announceToAll("You have 10 minutes to vote for the event you like!");
+ waitSecs(300);
+ Announcements.getInstance().announceToAll("You have 5 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 3 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 9:
+ Announcements.getInstance().announceToAll("You have 9 minutes to vote for the event you like!");
+ waitSecs(240);
+ Announcements.getInstance().announceToAll("You have 5 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 3 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 8:
+ Announcements.getInstance().announceToAll("You have 8 minutes to vote for the event you like!");
+ waitSecs(180);
+ Announcements.getInstance().announceToAll("You have 5 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 3 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 7:
+ Announcements.getInstance().announceToAll("You have 7 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 5 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 3 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 6:
+ Announcements.getInstance().announceToAll("You have 6 minutes to vote for the event you like!");
+ waitSecs(180);
+ Announcements.getInstance().announceToAll("You have 3 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 5:
+ Announcements.getInstance().announceToAll("You have 5 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 3 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 4:
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("You have 3 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 3:
+ Announcements.getInstance().announceToAll("You have 3 minutes to vote for the event you like!");
+ waitSecs(120);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 2:
+ Announcements.getInstance().announceToAll("You have 2 minutes to vote for the event you like!");
+ waitSecs(60);
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+ case 1:
+ Announcements.getInstance().announceToAll("You have 1 minute to vote for the event you like!");
+ waitSecs(60);
+ voting = false;
+ endit();
+ break;
+
+ }
+ }
+
+ public static void showHtmlWindow(L2PcInstance activeChar)
+ {
+ NpcHtmlMessage nhm = new NpcHtmlMessage(5);
+ TextBuilder tb = new TextBuilder("");
+ tb.append("<html><head><title>Zodiac Event Voting</title></head><body>");
+ tb.append("<center>");
+ tb.append("<td valign=\"top\"><font color=\"FF6600\">Vote for the event you want to play!</font>");
+ tb.append("<br>");
+ tb.append("<img src=\"SSQ_dungeon_T.SSQ_fire1_e013\" width=256 height=64>");
+ tb.append("<br1>");
+ tb.append("<img src=\"L2UI.SquareWhite\" width=194 height=1>");
+ tb.append("<table bgcolor=333333 width=204>");
+ tb.append("<tr>");
+ tb.append("<td><center><button value=\"CaptureThem\" action=\"bypass -h CaptureThem\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
+ tb.append("</tr>");
+ tb.append(" <tr>");
+ tb.append("<td><center><button value=\"Peloponnesian\" action=\"bypass -h PeloponnesianWar\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
+ tb.append("</tr>");
+ tb.append("<tr>");
+ tb.append("<td><center><button value=\"CastleWars\" action=\"bypass -h CastleWars\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
+ tb.append("</tr>");
+ tb.append("<tr>");
+ tb.append("<td><center><button value=\"ProtectTheLdr\" action=\"bypass -h ProtectTheLdr\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
+ tb.append("</tr>");
+ tb.append("<tr>");
+ tb.append("<td><center><button value=\"TreasureChest\" action=\"bypass -h TreasureChest\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td>");
+ tb.append("</tr>");
+ tb.append("</table>");
+ tb.append("<font color=\"FF6600\">By Boorinio!</font>");
+ tb.append("</center>");
+ tb.append("</body></html>");
+ nhm.setHtml(tb.toString());
+ activeChar.sendPacket(nhm);
+ }
+
+ public static void showFinalWindow(L2PcInstance player)
+ {
+
+ NpcHtmlMessage nhm = new NpcHtmlMessage(5);
+ TextBuilder tb = new TextBuilder("");
+ tb.append("<html><title>Zodiac Event Engine</title><body>Current Votes:<br>");
+ tb.append("Current Votes:<br><br>");
+ tb.append("Peloponnesian War: " + count[0] + "<br>");
+ tb.append("Capture Them: " + count[1] + "<br>");
+ tb.append("Castle Wars: " + count[2] + "<br>");
+ tb.append("Treasure Chests: " + count[4] + "<br>");
+ tb.append("Protect The Leader: " + count[3] + "<br><br>");
+ tb.append("</body></html>");
+ nhm.setHtml(tb.toString());
+ player.sendPacket(nhm);
+ }
+
+ public static void endit()
+ {
+ max = 0;
+ for (i = 0; i < 5; i++)
+ {
+ if (count[i] > max)
+ max = i;
+ }
+ if (max == 0)
+ {
+ Announcements.getInstance().announceToAll("Peloponnesian Event has the most votes!");
+ Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
+ waitSecs(10);
+ PeloponnesianWar.startevent();
+ }
+ else if (max == 1)
+ {
+ Announcements.getInstance().announceToAll("CaptureThem Event has the most votes!");
+ Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
+ waitSecs(10);
+ CaptureThem.openRegistration();
+ }
+ else if (max == 2)
+ {
+ Announcements.getInstance().announceToAll("CastleWars Event has the most votes!");
+ Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
+ waitSecs(10);
+ CastleWars.openRegi();
+ }
+ else if (max == 3)
+ {
+ Announcements.getInstance().announceToAll("ProtectTheLeader Event has the most votes!");
+ Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
+ waitSecs(10);
+ ProtectTheLdr.startevent();
+ }
+ else if (max == 4)
+ {
+ Announcements.getInstance().announceToAll("Treasure Chest Event has the most votes!");
+ Announcements.getInstance().announceToAll("In 10 seconds the registration will open!");
+ waitSecs(10);
+ TreasureChest.registration();
+ }
+ else
+ {
+ Announcements.getInstance().announceToAll("No votes event canceled!");
+ }
+ max = 0;
+ for (i = 0; i < 4; i++)
+ {
+ count[i] = 0;
+ }
+ waitSecs(Config.BETWEEN_EVENTS * 60);
+ startVoting();
+ }
+
+ public static boolean isEligible(L2PcInstance player, String ip)
+ {
+
+ if (player.isinZodiac)
+ {
+ player.sendMessage("You are Already in Zodiac");
+ return false;
+ }
+ if (!ZodiacRegisterActive)
+ {
+ player.sendMessage("Zodiac's Registrations are offline!");
+ return false;
+ }
+ if (player.getLevel() < 76)
+ {
+ player.sendMessage("You are lower than 76 lvl");
+ return false;
+ }
+ if (player.isInJail())
+ {
+ player.sendMessage("You are in jail...daah");
+ return false;
+ }
+ if (player.isInOlympiadMode())
+ {
+ player.sendMessage("You are in olympiad mode");
+ return false;
+ }
+ if (hasbots(ip) && Config.SAME_IP_ZODIAC)
+ {
+ player.sendMessage("You have already joinned with that ip");
+ return false;
+ }
+ return true;
+ }
+
+ public static void waitSecs(int i)
+ {
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+ }
+
+ public static boolean hasbots(String ip)
+ {
+ if (Ips.contains(ip))
+ {
+ return true;
+ }
+ else
+ return false;
+ }
+
+}
\ No newline at end of file
Index: L2jHellasC/java/com/l2jhellas/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/network/clientpackets/RequestBypassToServer.java (revision 206)
+++ L2jHellasC/java/com/l2jhellas/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
@@ -42,6 +42,7 @@
import com.l2jhellas.gameserver.model.entity.engines.DM;
import com.l2jhellas.gameserver.model.entity.engines.TvT;
import com.l2jhellas.gameserver.model.entity.engines.VIP;
+import com.l2jhellas.gameserver.model.entity.engines.ZodiacMain;
import com.l2jhellas.gameserver.network.serverpackets.ActionFailed;
import com.l2jhellas.gameserver.network.serverpackets.NpcHtmlMessage;
@@ -115,6 +116,36 @@
{
playerHelp(activeChar, _command.substring(12));
}
+ else if(_command.startsWith("PeloponnesianWar")&&ZodiacMain.voting)
+ {
+ activeChar.sendMessage("You have voted for PeloponnesianWar!");
+ ZodiacMain.count[0]++;
+ ZodiacMain.showFinalWindow(activeChar);
+ }
+ else if(_command.startsWith("CaptureThem")&&ZodiacMain.voting)
+ {
+ activeChar.sendMessage("You have voted for CaptureThem!");
+ ZodiacMain.count[1]++;
+ ZodiacMain.showFinalWindow(activeChar);
+ }
+ else if(_command.startsWith("CastleWars")&&ZodiacMain.voting)
+ {
+ activeChar.sendMessage("You have voted for CastleWars!");
+ ZodiacMain.count[2]++;
+ ZodiacMain.showFinalWindow(activeChar);
+ }
+ else if(_command.startsWith("ProtectTheLdr")&&ZodiacMain.voting)
+ {
+ activeChar.sendMessage("You have voted for ProtectTheLeader!");
+ ZodiacMain.count[3]++;
+ ZodiacMain.showFinalWindow(activeChar);
+ }
+ else if(_command.startsWith("TreasureChest")&&ZodiacMain.voting)
+ {
+ activeChar.sendMessage("You have voted for TreasureChest!");
+ ZodiacMain.count[4]++;
+ ZodiacMain.showFinalWindow(activeChar);
+ }
else if (_command.startsWith("sendMsg"))
{ // Message System By Pauler
Index: L2jHellasC/java/com/l2jhellas/gameserver/network/clientpackets/RequestRestart.java
===================================================================
--- L2jHellasC/java/com/l2jhellas/gameserver/network/clientpackets/RequestRestart.java (revision 206)
+++ L2jHellasC/java/com/l2jhellas/gameserver/network/clientpackets/RequestRestart.java (working copy)
@@ -59,9 +59,6 @@
_log.warning("[RequestRestart] activeChar null!?");
return;
}
-
-
-
if (player.isInOlympiadMode() || Olympiad.getInstance().isRegistered(player))
{
player.sendMessage("You cant logout in olympiad mode");
@@ -67,7 +64,11 @@
player.sendMessage("You cant logout in olympiad mode");
return;
}
-
+ if(player.isinZodiac)
+ {
+ player.sendMessage("You cant logout while in zodiac");
+ return;
+ }
if (player.isTeleporting())
{
player.abortCast();
Index: L2JHellasD/data/html/zodiac/CaptureThem.htm
===================================================================
--- L2JHellasD/data/html/zodiac/CaptureThem.htm (revision 0)
+++ L2JHellasD/data/html/zodiac/CaptureThem.htm (revision 0)
@@ -0,0 +1,3 @@
+<html><title>CaptureThem</title><body>Jail:<br>
+You will be teleported in 20 seconds.<br>
+</body></html>
\ No newline at end of file
Index: L2JHellasD/data/html/zodiac/CastleTutorial.htm
===================================================================
--- L2JHellasD/data/html/zodiac/CastleTutorial.htm (revision 0)
+++ L2JHellasD/data/html/zodiac/CastleTutorial.htm (revision 0)
@@ -0,0 +1,14 @@
+<html><title>CastleWars Tutorial</title><body>Jail:<br>
+Once the Event starts:<br>
+-If you are a defender:<br>
+You need to defend all of the castle's flags<br>
+2 in the artifact's rooms<br>
+1 on the roof top<br>
+If you succeed for 10 minutes you win the event<br>
+<br>
+-If you are an attacker:
+You need to kill all the flags in the castle<br>
+2 in the artifact's rooms<br>
+1 on the roof top<br>
+If you kill all 3 flags the event ends!<br>
+</body></html>
\ No newline at end of file
Index: L2JHellasD/data/html/zodiac/ProtectTuto.htm
===================================================================
--- L2JHellasD/data/html/zodiac/ProtectTuto.htm (revision 0)
+++ L2JHellasD/data/html/zodiac/ProtectTuto.htm (revision 0)
@@ -0,0 +1,7 @@
+<html><title>Protect The Leader</title><body>Jail:<br>
+PLEASE READ!<br>
+You will be teleported with the rest of your team<br>
+in a stadium,There a rb will be spawned next to you<br>
+protect it at all costs.In front of you is the enemy team<br>
+Kill their rb first and you win!<br>
+</body></html>
\ No newline at end of file
Index: L2JHellasD/data/html/zodiac/Treasure.htm
===================================================================
--- L2JHellasD/data/html/zodiac/Treasure.htm (revision 0)
+++ L2JHellasD/data/html/zodiac/Treasure.htm (revision 0)
@@ -0,0 +1,7 @@
+<html><title>Treasure Chest</title><body>Jail:<br>
+You are Registered for Treasure Chest Event.<br>
+During this event you will have to kill treasure chests<br>
+as quickly as you can only one of them is the lucky one!<br>
+Killing players is not allowed so you WILL take karma<br>
+if you kill any other player!!!<br>
+</body></html>
\ No newline at end of file
Index: L2JHellasD/data/html/zodiac/Tutorial.htm
===================================================================
--- L2JHellasD/data/html/zodiac/Tutorial.htm (revision 0)
+++ L2JHellasD/data/html/zodiac/Tutorial.htm (revision 0)
@@ -0,0 +1,10 @@
+<html><title>CaptureThem</title><body>Jail:<br>
+You are Registered for captureThem Event.<br>
+During this event you will have the chance to<br>
+fight othe rplayers for points that can be<br>
+obtainned by<br>
+1)killing players(1 point)<br>
+2)Killing flags(10 points)<br>
+NOTE: Flags don't respawn so you better<br>
+choose your targets wiselly<br>
+</body></html>
\ No newline at end of file
Index: L2JHellasD/data/html/zodiac/TutorialPelo.htm
===================================================================
--- L2JHellasD/data/html/zodiac/TutorialPelo.htm (revision 0)
+++ L2JHellasD/data/html/zodiac/TutorialPelo.htm (revision 0)
@@ -0,0 +1,8 @@
+<html><title>Peloponnesian War</title><body>Jail:<br>
+How this works:<br>
+There are 2 teams.Athenians and Spartans.
+Once you get with your team in an arena<br>
+you will fight each other,the one that survives<br>
+ will fight the other race's survivor<br>
+ The representative that wins gets<br> rewards for everybody in his team!
+</body></html>
\ No newline at end of file
Index: L2JHellasD/sql/game/npc.sql
===================================================================
--- L2JHellasD/sql/game/npc.sql (revision 205)
+++ L2JHellasD/sql/game/npc.sql (working copy)
@@ -6609,6 +6609,9 @@
(36003,29019,'Antharas',0,'',0,'Monster.antaras',300.00,300.00,79,'male','L2GrandBoss',40,13090000,22197,2380.00,265.32,60,57,73,76,70,80,262720918,29116376,13308,8064,28099,1641,333,0,3819,0,0,0,81,301,NULL,0,0,13,'FULL_PARTY'),
(36004,29028,'Valakas',0,'',0,'Monster2.valakas',190.00,335.00,85,'male','L2GrandBoss',40,16660000,22197,2856.00,265.32,60,57,73,76,70,80,284286178,27215401,14375,7999,36620,1999,333,0,3819,0,0,0,194,486,'valakas_clan',300,0,13,'FULL_PARTY'),
(36005,29001,'Queen Ant',0,'',0,'Monster.queen_ant',45.00,53.00,40,'female','L2GrandBoss',40,229898,667,495.04,2.14,60,57,73,76,70,80,2179535,140740,329,1615,77,655,278,0,3819,0,0,0,129,372,'queen_ant_clan',1000,0,0,'LAST_HIT');
+ (36006,35062,'CaptureFlag',0,'',0,'Deco.flag_a',21.00,82.00,1,'etc','L2Monster',80,700000,989,3.16,0.91,40,43,30,21,20,10,0,0,652,753,358,295,423,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
+ (36007,29022,'Zake',0,'',0,'Monster.zaken',16.00,32.00,60,'male','L2GrandBoss',40,858518,1975,799.68,2.45,60,57,73,76,70,80,4879745,423589,7273,2951,19762,1197,333,0,3819,0,0,0,68,275,NULL,0,1,12,'FULL_PARTY'),
+ (36008,29022,'Blane',0,'',0,'Monster.zaken',16.00,32.00,60,'male','L2GrandBoss',40,858518,1975,799.68,2.45,60,57,73,76,70,80,4879745,423589,7273,2951,19762,1197,333,0,3819,0,0,0,68,275,NULL,0,1,12,'FULL_PARTY');
-- DO Check in this nightwolf
UPDATE `npc` SET `type` = 'L2NpcWalker' WHERE `id` IN (31358,31359,31360,31361,31362,31363,31357,31356,31364,31365,32070,32072);
|
|||||||||||||||
|
|
||||||||||||||||
| Links Patrocinados |
|
|