Jump to content

Unique Interlude Event [Peloponnesian War] !!!!!!!!!!!!


Recommended Posts

Posted

Boorinio, i put this script to my server, i tried this event. All seams work perfect, but for some reason player are teleportting to town event they died

Ofc you are this is how the event works -.- read it better and don't spam

Posted

wtf? player should target each other ant go to town? not figt?

wtf dude READ THE FING EVENT> all player seperate into 2 team the one that kills all his teammates goes to olympiad stadium zone to fight the other guy that killed all his teamates at the end the guy that killed the other one gains a reward for all of his teammates

Posted

wtf dude READ THE FING EVENT> all player seperate into 2 team the one that kills all his teammates goes to olympiad stadium zone to fight the other guy that killed all his teamates at the end the guy that killed the other one gains a reward for all of his teammates

 

omg i know, but where is problem in event, when i am teleportted in fist spot THEN i get on target my self self or other player i am telleportted to town(giran)....

Posted

i wanna reward you but i dont know if the color bug works.

And add config for olympiad. to allow event during oly or not.

And the final winner must rewarded with bigger prize than the noob

that dies in first match ;)

Posted

i wanna reward you but i dont know if the color bug works.

And add config for olympiad. to allow event during oly or not.

And the final winner must rewarded with bigger prize than the noob

that dies in first match ;)

All this will be fixed in zodiac event engine

Posted

Problem with Boorinio event:

  How to fix it?

 

 

you probably messed up some where in adopting the code for h5/freya or w/e you are using this code is for interlude...

Guest Elfocrash
Posted

All this will be fixed in zodiac event engine

When will it be available?

Posted

Dude i addapt code for jfrozen ok.. Now how start event? What command i need use PeloponnesianWar.startevent(); ? and how use //PeloponnesianWar.startevent(); ? or how? and i need insert command in admin_command_access_rights not ?

Posted

Dude i addapt code for jfrozen ok.. Now how start event? What command i need use PeloponnesianWar.startevent(); ? and how use //PeloponnesianWar.startevent(); ? or how? and i need insert command in admin_command_access_rights not ?

make a new admin command with just that method inside it PeloponnesianWar.startevent();

Posted

Hi bro i have one bug whit this code can help me ?

Here i kill other pp winner in the other team -> http://imageshack.us/f/9/shot00001pa.png/

And in the moment who announce Team winner have this bug -> http://imageshack.us/f/19/shot00002xu.png/

Announce spartan and athenias winners O.o why?

 

I Use this code:

Index: L2jfrozen/java/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java
===================================================================
--- L2jHfrozen/java/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java	(revision 189)
+++ L2jfrozen/java/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java	(working copy)
@@ -35,6 +36,7 @@
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.OfflineShop;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Online;
+import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.PeloponnesianRegi;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.StatsCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.TvTCmd;

@@ -88,6 +89,7 @@
	if (Config.DM_COMMAND)
	{
		registerVoicedCommandHandler(new DMCmd());
	}

+		registerVoicedCommandHandler(new PeloponnesianRegi());

	if (Config.L2JMOD_ALLOW_WEDDING)

Index: L2jfrozen/java/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminReload.java
===================================================================
--- L2jfrozen/java/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminReload.java	(revision 189)
+++ L2jfrozen/java/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminReload.java	(working copy)
@@ -36,6 +36,7 @@
import com.l2jfrozen.gameserver.managers.Manager;
import com.l2jfrozen.gameserver.managers.QuestManager;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.entity.event.PeloponnesianWar;
import com.l2jfrozen.gameserver.model.multisell.L2Multisell;
import com.l2jfrozen.gameserver.script.faenor.FaenorScriptEngine

/**
@@ -56,6 +56,7 @@

		if (command.startsWith("admin_reload"))
		{
+			PeloponnesianWar.startevent();
			sendReloadPage(activeChar);
		StringTokenizer st = new StringTokenizer(command);
		st.nextToken();

Index: L2jfrozen/java/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/PeloponnesianRegi.java
===================================================================
--- L2jfrozen/java/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/PeloponnesianRegi.java	(revision 0)
+++ L2jfrozen/java/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/PeloponnesianRegi.java	(revision 0)
@@ -0,0 +1,95 @@
+/*
+ * 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 java.io.File;
+
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.entity.event.PeloponnesianWar;
+import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * @author Boorinio
+ */
+public class PeloponnesianRegi implements IVoicedCommandHandler
+{
+	private static final String[] VOICED_COMMANDS =
+	{
+	"join", "leave"
+	};
+	
+	@Override
+	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+	{
+		if(PeloponnesianWar.PeloRegi)
+		{
+			if (command.startsWith(VOICED_COMMANDS[0])&& isEligible(activeChar))
+			{
+				activeChar.inPeloponnesianWar =  true;
+				activeChar.sendMessage("You are now registered to PeloponnesianWar event!");
+				String Capture_Path = "data/html/TutorialPelo.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.inPeloponnesianWar)
+			{
+				activeChar.inPeloponnesianWar =  false;
+				activeChar.sendMessage("You are now unregistered.");
+			}
+		}
+		else
+		{
+			if (command.startsWith(VOICED_COMMANDS[0])||(command.startsWith(VOICED_COMMANDS[1])))
+				{
+				  activeChar.sendMessage("CaptureThem registrations are inactive.");
+				}
+		}
+		return true;
+	}
+	public boolean isEligible(L2PcInstance player)
+	{
+		if(player.inPeloponnesianWar)
+		{
+			player.sendMessage("You are already Registered");
+			return false;
+		}
+		if(player.getLevel()<76)
+		{
+			player.sendMessage("You are low level");
+			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;
+		}
+		return true;
+	}
+	
+	@Override
+	public String[] getVoicedCommandList()
+	{
+		return VOICED_COMMANDS;
+	}
+}
\ No newline at end of file

Index: L2jfrozen/java/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- L2jfrozen/java/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(revision 189)
+++ L2jfrozen/java/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -144,6 +144,7 @@
import com.l2jfrozen.gameserver.model.entity.L2Rebirth;
import com.l2jfrozen.gameserver.model.entity.event.CTF;
import com.l2jfrozen.gameserver.model.entity.event.DM;
+import com.l2jfrozen.gameserver.model.entity.event.PeloponnesianWar;
import com.l2jfrozen.gameserver.model.entity.event.L2Event;
import com.l2jfrozen.gameserver.model.entity.event.TvT;
import com.l2jfrozen.gameserver.model.entity.event.VIP;
@@ -249,6 +249,11 @@

public final class L2PcInstance extends L2PlayableInstance
{
+	public boolean inPeloponnesianWar = false;
+	public boolean isAthenian=false;
+	public boolean isDeadAthenian=false;
+	public boolean isSpartan=false;
+	public boolean isDeadSpartan=false;

/** The Constant RESTORE_SKILLS_FOR_CHAR. */
private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?";

@@ -7608,6 +7609,22 @@
			{
				pk.kills.add(getName());
			}
+			if(inPeloponnesianWar)
+			{
+				inPeloponnesianWar = false;
+				
+				if(isAthenian)
+				{
+					isDeadAthenian=true;
+				}
+				if(isSpartan)
+				{
+					isDeadSpartan=true;
+				}
+				isAthenian=false;
+				isSpartan=false;
+				teleToLocation(82698, 148638,-3473);
+			}
			if(_inEventTvT && pk._inEventTvT)
			{
				if(TvT.is_teleport() || TvT.is_started())

Index: L2jfrozen/java/com/l2jfrozen/gameserver/model/entity/engines/PeloponnesianWar.java
===================================================================
--- L2jfrozen/java/com/l2jfrozen/gameserver/model/entity/engines/PeloponnesianWar.java	(revision 0)
+++ L2jfrozen/java/com/l2jfrozen/gameserver/model/entity/engines/PeloponnesianWar.java	(revision 0)
@@ -0,0 +1,285 @@
+package com.l2jfrozen.gameserver.model.entity.engines;
+
+import java.util.List;
+
+import javolution.util.FastList;
+import javolution.util.FastSet;
+
+import com.l2jfrozen.gameserver.model.entity.Announcements;
+import com.l2jfrozen.gameserver.datatables.sql.NpcTable;
+import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
+import com.l2jfrozen.gameserver.model.L2World;
+import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
+
+/**
+ * @author Boorinio
+ */
+public class PeloponnesianWar
+{
+	private static boolean alaksokolies=true;
+	public static boolean PeloRunning;
+	private static int i,countA,countS;
+	public static boolean PeloRegi;
+	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  =
+			{
+			73019,72986,72958,72921,72896,72975,73009,73044,73075,73095,-87893,-87921,-87944,-87971,-87992,-88017,-87931,-87904,-87872,-87849,-87821,
+			};
+	private static int [] protectorsy  =
+		{
+		143260,143260,143265,143257,143258,142276,142272,142275,142267,142262,142715,142717,142723,142719,142718,142717,141731,141738,141731,141730,141730,
+		};
+	private static int [] protectorsz  =
+		{
+		-3789,-3773,-3773,-3773,-3773,-3773,-3773,-3773,-3798,-3773,-3672,-3646,-3672,-3646,-3646,-3646,-3646,-3646,-3646,-3646,-3646,
+		};
+	public static void startevent()
+	
+	{
+		PeloRunning=true;
+		PeloRegi=true;
+		Announcements.getInstance().announceToAll("Peloponnesian Event has Started!");
+		Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
+		Announcements.getInstance().announceToAll("You have 5 minutes to register!");
+		waitSecs(300);
+		Announcements.getInstance().announceToAll("Registrations closed!");
+		PeloRegi=false;
+		for(L2PcInstance player: L2World.getInstance().getAllPlayers() )
+		{
+			if(player.inPeloponnesianWar)
+			{
+				_participants.add(player);
+				if(alaksokolies)
+				{
+					_spartans.add(player);
+					player.isSpartan = true;
+					player.setTitle("Spartan");
+					player.getAppearance().setNameColor(0x0000FF);
+					player.broadcastUserInfo();
+					alaksokolies = false;
+				}
+				else
+				{
+					_athenians.add(player);
+					player.isAthenian=true;
+					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.isAthenian)
+				countA++;
+		}
+		for(L2PcInstance finals:_spartans)
+		{
+			if(finals.isSpartan)
+				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.inPeloponnesianWar||participant.isAthenian||participant.isSpartan||participant.isDeadAthenian||participant.isDeadAthenian)
+			{
+				participant.setTitle("");
+				participant.getAppearance().setNameColor(0xFFFFFF);
+				participant.broadcastUserInfo();
+				participant.teleToLocation(82698, 148638,-3473);
+			}
+			participant.isAthenian=false;
+			participant.isSpartan=false;
+			participant.isDeadAthenian=false;
+			participant.isDeadSpartan=false;
+		}
+		for(L2NpcInstance protectorss: _protectors)
+		{
+			protectorss.deleteMe();
+		}
+		PeloRunning=false;
+		_protectors.clear();
+		_participants.clear();
+		_athenians.clear();
+		_spartans.clear();
+	}
+	private static void reward(boolean Athenians)
+	{
+		if(Athenians)
+		{
+			for(L2PcInstance participant:_participants)
+			{
+				if(participant.isAthenian||participant.isDeadAthenian)
+				{
+					participant.addItem("Reward", 3470,1, participant, true);
+				}
+			}
+		}
+		else
+		{
+			for(L2PcInstance participant:_participants)
+			{
+				if(participant.isSpartan||participant.isDeadSpartan)
+				{
+					participant.addItem("Reward", 3470,1, participant, true);
+				}
+			}
+		}
+	}
+	public static void checkwhowon()
+	{
+		for(L2PcInstance winner : _participants)
+		{
+			if(winner.inPeloponnesianWar&&winner.isAthenian)
+			{
+				Announcements.getInstance().announceToAll("Athenians won!");
+				reward(true);
+			}
+			else if(winner.inPeloponnesianWar&&winner.isSpartan)
+			{
+				Announcements.getInstance().announceToAll("Spartans won!");
+				reward(false);
+			}
+			else
+				Announcements.getInstance().announceToAll("No one won blame your representatives!");
+		}
+	}
+	public static void finalround()
+	{
+		for(L2PcInstance athenian : _athenians)
+		{
+			if(athenian.isAthenian)
+			{
+			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.broadcastUserInfo();
+			athenian.teleToLocation(-21754,-20955,-3026);
+			}
+		}
+		for(L2PcInstance spartan : _spartans)
+		{
+			if(spartan.isSpartan)
+			{
+			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.broadcastUserInfo();
+			spartan.teleToLocation(-19821,-20988,-3026);
+			}
+		}
+	}
+	public static void teleportplayers()
+	{
+		for(L2PcInstance player: _participants)
+		{
+			if(player.isAthenian)
+			{
+				player.teleToLocation(athenianx,atheniany, athenianz);
+			}
+			else
+			{
+				player.teleToLocation(spartanx,spartany,spartanz);
+			}
+		}
+	}
+	public static void spawnProtectors()
+	{
+		L2NpcInstance protector = null;
+		for(i=0;i<21;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: L2JHellasD/data/html/TutorialPelo.htm
===================================================================
--- L2JHellasD/data/html/TutorialPelo.htm	(revision 0)
+++ L2JHellasD/data/html/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

 

For jfrozen Have one idea how fix this bug?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • ⭐⭐⭐⭐⭐L2Lusty 50x [Essence - High Five] Start 08 February⭐⭐⭐⭐⭐  L2Lusty Essence - High Five 50x Website: https://l2lusty.online/ Starts on 08/02/2025 16:00 London Time Rates: XP 50X, Adena 20X, Spoil 20X, Drop 20X, Max enchant +16 with 50% normal and 60% blessed, Chaos Event whit 3x Lcoins Drop 24h Website:  https://l2lusty.online/
    • Hi, I inviting you to join L2Einhovant server, lets give them chanse. It's x1 Classic with some bonus futures, no duals box, no wipes, buffs stores and etc. Grow up by litle steps together with the server population.   🔥 Why L2Einhovant? ✅ Authentic Classic Gameplay – No dual box, all classes inportant, no auto farm. ✅ Hardcore x1 Rates – A true test of your gameplay skill, level up stages. ✅ Active Community & Fair Administration – A server built for passionate players. ✅ Long-Term Stability – Grow your character in a world that lasts.   Gather your allies, sharpen your weapons, and prepare for an unforgettable journey. Join to our comunity now and prepare for start.   Open beta: 1th February. Grand opening: 7th February, 20:00 UTC+2.   🔗 Discord: https://discord.gg/zfKd4tU9N2
    • ElmoreLab Harbor - Eternal C1 x1: ✅ https://harbor.elmorelab.com ElmoreLab Harbor - Eternal C1 x1 - is an exclusive server of the Eternal C1 chronicles from the top project ElmoreLab Harbor.   A unique server of its kind, on which everyone will have maximum pleasure, such as oldschool players who dream of nostalgia and to feel the warmest and classic C1 chronicles, as well as experienced players who are tired of thousands unbalanced servers of late chronicles. Due to the professional corrections of the balance system and the HONEST gameplay system - on this server, EVERY player will feel like in their own, warm and cozy Harbor C1. Let's return to the origins of L2 - back to 2004 in C1! ❤️   ⭐ Server characteristics:   STRICTLY 1 window, NO BOXES Bans for RMT and bots/cheats No donations with benefits Unique and high-quality PTS-build from Master Toma Professional corrections and full class-balance Reworked economy and closed all abuses Improved animations and all aspects of the game Exclusive HD-client with high-quality textures Experienced administration and management Fixed all bugs, geodata, exploits and holes Maximum sociality due to the 1-box system Discovering, exploring and researching Big online International server Nostalgia and oldschool-feelings   Rates: x1 Server start: 14.02.2025   The server is at the final stages of development and preparation for release. Information on the server will be updated, soon the patchnotes and changes/edits will be posted. Don't miss the legendary and epic experience on the best server in the last 20 years! ❤️ Join our C1-forum with a lot of information about server and active discussions.   ⭐ Website: https://harbor.elmorelab.com   ✅ Forum: https://forum-harbor.elmorelab.com   💥 Telegram: https://t.me/l2harbor https://t.me/l2harbor_chat   ⚡ Discord: https://discord.gg/harborelmorelab
    • yeah ok, if you say what is fuctional 100% i can't say something different 😛  but if someone find hard to compile it or get vs and all that things i have here one more simple way here to put overlay in your own server or to change your window name with few money.
  • Topics

×
×
  • Create New...