Town War Event For L2j Interlude

Find the proper support area, Saga-Version.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
xanthos
Posts: 24
Joined: Wed Apr 30, 2008 12:23 pm

Town War Event For L2j Interlude

Post by xanthos »

Hello all.I found a town war event and I tried to adapt it from l2j gracia final to l2j interlude but I have a little prob.

This is the error:

Code: Select all

Buildfile: C:\Users\Xanthos\Documents\java\GameServer\build.xmlclean:init:    [mkdir] Created dir: C:\Users\Xanthos\Documents\java\GameServer\build    [mkdir] Created dir: C:\Users\Xanthos\Documents\java\GameServer\build\classes    [mkdir] Created dir: C:\Users\Xanthos\Documents\java\GameServer\build\dist    [mkdir] Created dir: C:\Users\Xanthos\Documents\java\GameServer\build\dist\doc    [mkdir] Created dir: C:\Users\Xanthos\Documents\java\GameServer\build\dist\login    [mkdir] Created dir: C:\Users\Xanthos\Documents\java\GameServer\build\dist\login\lib    [mkdir] Created dir: C:\Users\Xanthos\Documents\java\GameServer\build\dist\gameserver    [mkdir] Created dir: C:\Users\Xanthos\Documents\java\GameServer\build\dist\gameserver\libversion:compile:    [javac] Compiling 1286 source files to C:\Users\Xanthos\Documents\java\GameServer\build\classes    [javac] C:\Users\Xanthos\Documents\java\GameServer\java\net\sf\l2j\gameserver\handler\admincommandhandlers\AdminTownWar.java:69: cannot find symbol    [javac] symbol  : method values()    [javac] location: interface java.util.Collection<com.equal.gameserver.model.actor.instance.L2PcInstance>    [javac]       Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();    [javac]                                                                           ^    [javac] C:\Users\Xanthos\Documents\java\GameServer\java\net\sf\l2j\gameserver\handler\admincommandhandlers\AdminTownWar.java:141: cannot find symbol    [javac] symbol  : method values()    [javac] location: interface java.util.Collection<com.equal.gameserver.model.actor.instance.L2PcInstance>    [javac]       Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();    [javac]                                                                           ^    [javac] 2 errors BUILD FAILEDC:\Users\Xanthos\Documents\java\GameServer\build.xml:73: Compile failed; see the compiler error output for details. Total time: 16 seconds
Original Town War Event patch:

Code: Select all

Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTownWar.java===================================================================--- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTownWar.java	(revision 0)+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTownWar.java	(revision 0)@@ -0,0 +1,185 @@++package net.sf.l2j.gameserver.handler.admincommandhandlers;++import java.util.Collection;++import net.sf.l2j.Config;+import net.sf.l2j.gameserver.Announcements;+import net.sf.l2j.gameserver.handler.IAdminCommandHandler;+import net.sf.l2j.gameserver.instancemanager.TownManager;+import net.sf.l2j.gameserver.model.L2Object;+import net.sf.l2j.gameserver.model.L2World;+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;+import net.sf.l2j.gameserver.model.zone.type.L2TownZone;++public class AdminTownWar implements IAdminCommandHandler+{+	private static final String[] ADMIN_COMMANDS =+	{+		"admin_townwar_start",+		"admin_townwar_end"+	};+     private L2Object _activeObject;+     public final L2Object getActiveObject()+    {+        return _activeObject;+    }+	public boolean useAdminCommand(String command, L2PcInstance activeChar)+	{+		if (command.startsWith("admin_townwar_start"))+		{+			startTW(activeChar);+		}+		if (command.startsWith("admin_townwar_end"))+		{+			endTW(activeChar);+		}+		return true;+	}+	@SuppressWarnings("deprecation")+	private void startTW(L2PcInstance activeChar)+	{+		if (Config.TW_ALL_TOWNS)+		{+			TownManager.getTown(1).setParameter("isPeaceZone", "false");+			TownManager.getTown(2).setParameter("isPeaceZone", "false");+			TownManager.getTown(3).setParameter("isPeaceZone", "false");+			TownManager.getTown(4).setParameter("isPeaceZone", "false");+			TownManager.getTown(5).setParameter("isPeaceZone", "false");+			TownManager.getTown(6).setParameter("isPeaceZone", "false");+			TownManager.getTown(7).setParameter("isPeaceZone", "false");+			TownManager.getTown(8).setParameter("isPeaceZone", "false");+			TownManager.getTown(9).setParameter("isPeaceZone", "false");+			TownManager.getTown(10).setParameter("isPeaceZone", "false");+			TownManager.getTown(11).setParameter("isPeaceZone", "false");+			TownManager.getTown(12).setParameter("isPeaceZone", "false");+			TownManager.getTown(13).setParameter("isPeaceZone", "false");+			TownManager.getTown(14).setParameter("isPeaceZone", "false");+			TownManager.getTown(15).setParameter("isPeaceZone", "false");+			TownManager.getTown(16).setParameter("isPeaceZone", "false");+			TownManager.getTown(17).setParameter("isPeaceZone", "false");+			TownManager.getTown(19).setParameter("isPeaceZone", "false");+			TownManager.getTown(20).setParameter("isPeaceZone", "false");	+		}+		if (!Config.TW_ALL_TOWNS && Config.TW_TOWN_ID != 18 && Config.TW_TOWN_ID != 21 && Config.TW_TOWN_ID != 22)+		{+		TownManager.getTown(Config.TW_TOWN_ID).setParameter("isPeaceZone", "false");+		}+		+		Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();+		{+            int x,y,z;+            L2TownZone Town;+            byte zonaPaz = 1;+            +          	for (L2PcInstance onlinePlayer : pls)+               if (onlinePlayer.isOnline() == 1 )+                  {+                  	x = onlinePlayer.getX();+                  	y = onlinePlayer.getY();+                  	z = onlinePlayer.getZ();+                  +                  	Town = TownManager.getTown(x, y, z);+                  	if (Town != null)+                  	{+                  		if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+                  		{+                  			onlinePlayer.setInsideZone(zonaPaz, false);+                          		onlinePlayer.revalidateZone(true);+                  		}+                  		else if (Config.TW_ALL_TOWNS)+                  		{+                  			onlinePlayer.setInsideZone(zonaPaz, false);+                          		onlinePlayer.revalidateZone(true);+                  		}+                  	}+                  	onlinePlayer.setInTownWar(true);+                   }	+		}+		+		if (Config.TW_ALL_TOWNS)+		{+			Announcements.getInstance().announceToAll("All towns have been set war zone by " + activeChar.getName() + ".");+		}+		if (!Config.TW_ALL_TOWNS) +		{+			Announcements.getInstance().announceToAll(TownManager.getTown(Config.TW_TOWN_ID).getName() + " has been set war zone by " + activeChar.getName() + ".");+		}+	}+	+	+	@SuppressWarnings("deprecation")+	private void endTW(L2PcInstance activeChar)+	{+		if (Config.TW_ALL_TOWNS)+		{+			TownManager.getTown(1).setParameter("isPeaceZone", "true");+			TownManager.getTown(2).setParameter("isPeaceZone", "true");+			TownManager.getTown(3).setParameter("isPeaceZone", "true");+			TownManager.getTown(4).setParameter("isPeaceZone", "true");+			TownManager.getTown(5).setParameter("isPeaceZone", "true");+			TownManager.getTown(6).setParameter("isPeaceZone", "true");+			TownManager.getTown(7).setParameter("isPeaceZone", "true");+			TownManager.getTown(8).setParameter("isPeaceZone", "true");+			TownManager.getTown(9).setParameter("isPeaceZone", "true");+			TownManager.getTown(10).setParameter("isPeaceZone", "true");+			TownManager.getTown(11).setParameter("isPeaceZone", "true");+			TownManager.getTown(12).setParameter("isPeaceZone", "true");+			TownManager.getTown(13).setParameter("isPeaceZone", "true");+			TownManager.getTown(14).setParameter("isPeaceZone", "true");+			TownManager.getTown(15).setParameter("isPeaceZone", "true");+			TownManager.getTown(16).setParameter("isPeaceZone", "true");+			TownManager.getTown(17).setParameter("isPeaceZone", "true");+			TownManager.getTown(19).setParameter("isPeaceZone", "true");+			TownManager.getTown(20).setParameter("isPeaceZone", "true");+		}+		if (!Config.TW_ALL_TOWNS && Config.TW_TOWN_ID != 18 && Config.TW_TOWN_ID != 21 && Config.TW_TOWN_ID != 22)+		{+		TownManager.getTown(Config.TW_TOWN_ID).setParameter("isPeaceZone", "true");+		}+		+		Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();+		{+             int xx,yy,zz;+             L2TownZone Town;+             byte zonaPaz = 1;++            for (L2PcInstance onlinePlayer : pls)+              if (onlinePlayer.isOnline() == 1 )+                  {+                  	xx = onlinePlayer.getX();+                  	yy = onlinePlayer.getY();+                  	zz = onlinePlayer.getZ();+                  +                  	Town = TownManager.getTown(xx,yy,zz);+                  	if (Town != null)+                  	{+                  		if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+                  		{+                  			onlinePlayer.setInsideZone(zonaPaz, true);+                          		onlinePlayer.revalidateZone(true);+                  		}+                  		else if (Config.TW_ALL_TOWNS)+                  		{+                  			onlinePlayer.setInsideZone(zonaPaz, true);+                          		onlinePlayer.revalidateZone(true);+                  		}+                  	}+             	    onlinePlayer.setInTownWar(false);+                  }		+            }+		if (Config.TW_ALL_TOWNS)+		{+			Announcements.getInstance().announceToAll("All towns have been set back to normal by " + activeChar.getName() + ".");	+		}+		if (!Config.TW_ALL_TOWNS)+		{+			Announcements.getInstance().announceToAll(TownManager.getTown(Config.TW_TOWN_ID).getName() + " has been set back to normal by " + activeChar.getName() + ".");+		}+	}+	+	public String[] getAdminCommandList()+	{+		return ADMIN_COMMANDS;+	}+}\ No newline at end of fileIndex: java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java===================================================================--- java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java	(revision 2797)+++ java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java	(working copy)@@ -105,6 +105,7 @@ 		registerAdminCommandHandler(new AdminTvTEvent()); 		registerAdminCommandHandler(new AdminUnblockIp()); 		registerAdminCommandHandler(new AdminZone());+		registerAdminCommandHandler(new AdminTownWar()); 		_log.config("AdminCommandHandler: Loaded " + _datatable.size() + " handlers."); 	} Index: java/net/sf/l2j/gameserver/model/L2Character.java===================================================================--- java/net/sf/l2j/gameserver/model/L2Character.java	(revision 2797)+++ java/net/sf/l2j/gameserver/model/L2Character.java	(working copy)@@ -75,6 +75,7 @@ import net.sf.l2j.gameserver.model.itemcontainer.Inventory; import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.model.quest.QuestState;+import net.sf.l2j.gameserver.model.zone.type.L2TownZone; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.Attack;@@ -559,8 +566,31 @@ 	 * <li>Modify the position of the pet if necessary</li><BR><BR> 	 * 	 */+	    private boolean _inTownWar;+		public final boolean isinTownWar() { return _inTownWar; }+		public final void setInTownWar(boolean value) { _inTownWar = value; } 	public void teleToLocation(int x, int y, int z, boolean allowRandomOffset) 	{+		 if(Config.TW_DISABLE_GK)+		 {+			 int x1,y1,z1;+			 x1 = getX();+			 y1 = getY();+			 z1 = getZ();+			 L2TownZone Town;+			 Town = TownManager.getTown(x1,y1,z1);+			 if (Town != null && isinTownWar() )+			 {+	      			if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+	    		    	{+	      					return;+	    		    	}+	    	    	else if (Config.TW_ALL_TOWNS)+	    	    		{+			    			return;+	    	    		}+			 }+		 } 		// Stop movement 		stopMove(null, false); 		abortAttack();Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java===================================================================--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 2797)+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)@@ -81,6 +81,7 @@ import net.sf.l2j.gameserver.instancemanager.ItemsOnGroundManager; import net.sf.l2j.gameserver.instancemanager.QuestManager; import net.sf.l2j.gameserver.instancemanager.SiegeManager;+import net.sf.l2j.gameserver.instancemanager.TownManager; import net.sf.l2j.gameserver.model.BlockList; import net.sf.l2j.gameserver.model.FishData; import net.sf.l2j.gameserver.model.L2AccessLevel;@@ -139,6 +140,7 @@ import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.model.quest.QuestState; import net.sf.l2j.gameserver.model.quest.State;+import net.sf.l2j.gameserver.model.zone.type.L2TownZone; import net.sf.l2j.gameserver.network.L2GameClient; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.AbnormalStatusUpdate; @@ -4950,6 +4952,26 @@ 	@Override 	public boolean doDie(L2Character killer) 	{+	if (Config.TW_RESS_ON_DIE)+	{+		int x1,y1,z1;+		x1 = getX();+		y1 = getY();+		z1 = getZ();+		L2TownZone Town;+		Town = TownManager.getTown(x1,y1,z1);+		if (Town != null && isinTownWar())+		{+			if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+			{+				reviveRequest(this, null, false);+			}+			else if (Config.TW_ALL_TOWNS)+			{+				reviveRequest(this, null, false);+			}+		}+	} 		// Kill the L2PcInstance 		if (!super.doDie(killer)) 			return false;@@ -5283,6 +5285,25 @@      */     public void increasePvpKills()     {+      	int x,y,z;+    	x = getX();+      	y = getY();+      	z = getZ();+        L2TownZone Town;+      	Town = TownManager.getTown(x,y,z);+      	if (Town != null && isinTownWar())+      	{+      			if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+    		    	{+    		    		getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);+    		    		sendMessage("You received your prize for a town war kill!");+    		    	}+    	    		else if (Config.TW_ALL_TOWNS)+    	    		{+		    			getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);+		    			sendMessage("You received your prize for a town war kill!");+   	    		}+      	}         // Add karma to attacker and increase its PK counter         setPvpKills(getPvpKills() + 1);@@ -5334,8 +5355,42 @@             newKarma = Integer.MAX_VALUE - getKarma();          // Add karma to attacker and increase its PK counter+        int x,y,z;+    	x = getX();+      	y = getY();+      	z = getZ();+        L2TownZone Town;+      	Town = TownManager.getTown(x,y,z);+      	         setPkKills(getPkKills() + 1);-        setKarma(getKarma() + newKarma);+         if (Town != null && isinTownWar())+         { +	        //nothing+         }+         else if (Town != null && !isinTownWar())+         {+        	 setKarma(getKarma() + newKarma);+         }+         else if (Town == null)+         {+        	 setKarma(getKarma() + newKarma);+         }+      	+         +         if (Town != null && isinTownWar())+      	 {+      			if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+    		    	{+    		    		getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);+    		    		sendMessage("You received your prize for a town war kill!");+    		    	}+    	    		else if (Config.TW_ALL_TOWNS && Town.getTownId() != 0)+    	    		{+		    			getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);+		    			sendMessage("You received your prize for a town war kill!");+    	    		}+      	 }+                         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter         sendPacket(new UserInfo(this)); @@ -11945,30 +12084,51 @@     	}     	super.setIsCastingNow(value);     }-    public void checkItemRestriction()-    {-    	for (int i = 0; i < Inventory.PAPERDOLL_TOTALSLOTS; i++)++	/**+	 * @param b+	 */+    private boolean isintwtown = false;+    +    public boolean isInsideTWTown()+	{+    	if (isintwtown)     	{-    		L2ItemInstance equippedItem = getInventory().getPaperdollItem(i);-    		if (equippedItem != null && !equippedItem.getItem().checkCondition(this, this))-    		{-				getInventory().unEquipItemInSlotAndRecord(i);-				if (equippedItem.isWear())-					continue;-				SystemMessage sm = null;-				if (equippedItem.getEnchantLevel() > 0)-				{-					sm = new SystemMessage(SystemMessageId.EQUIPMENT_S1_S2_REMOVED);-					sm.addNumber(equippedItem.getEnchantLevel());-					sm.addItemName(equippedItem);-				}-				else-				{-					sm = new SystemMessage(SystemMessageId.S1_DISARMED);-					sm.addItemName(equippedItem);-				}-				sendPacket(sm);-    		}+    		return true;     	}-    }+		else +			return false;++	}+   +	public void setInsideTWTown(boolean b)+	{+		isintwtown = true;+	}+	    public void checkItemRestriction()+	    {+	    	for (int i = 0; i < Inventory.PAPERDOLL_TOTALSLOTS; i++)+	    	{+	    		L2ItemInstance equippedItem = getInventory().getPaperdollItem(i);+	    		if (equippedItem != null && !equippedItem.getItem().checkCondition(this, this))+	    		{+					getInventory().unEquipItemInSlotAndRecord(i);+					if (equippedItem.isWear())+					continue;+					SystemMessage sm = null;+					if (equippedItem.getEnchantLevel() > 0)+					{+						sm = new SystemMessage(SystemMessageId.EQUIPMENT_S1_S2_REMOVED);+						sm.addNumber(equippedItem.getEnchantLevel());+						sm.addItemName(equippedItem);+					}+					else+					{+						sm = new SystemMessage(SystemMessageId.S1_DISARMED);+						sm.addItemName(equippedItem);+					}+					sendPacket(sm);+	    		}+	    	}+	   } }Index: java/net/sf/l2j/gameserver/instancemanager/TownManager.java===================================================================--- java/net/sf/l2j/gameserver/instancemanager/TownManager.java	(revision 2797)+++ java/net/sf/l2j/gameserver/instancemanager/TownManager.java	(working copy)@@ -14,12 +14,14 @@  */ package net.sf.l2j.gameserver.instancemanager; +import java.util.logging.Logger;++import javolution.util.FastList; import net.sf.l2j.gameserver.datatables.MapRegionTable; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.entity.Castle;+import net.sf.l2j.gameserver.model.zone.type.L2TownZone; import net.sf.l2j.gameserver.model.zone.L2ZoneType;-import net.sf.l2j.gameserver.model.zone.type.L2TownZone;- public class TownManager {     //private static final Logger _log = Logger.getLogger(TownManager.class.getName());@@ -167,12 +169,11 @@      public final static L2TownZone getTown(int townId)     {-    	for (L2ZoneType temp : ZoneManager.getInstance().getAllZones())-    	{-        	if (temp instanceof L2TownZone && ((L2TownZone) temp).getTownId() == townId)-        		return (L2TownZone) temp;-    	}-        return null;+    	    	for (L2ZoneType temp : ZoneManager.getInstance().getAllZones())+    		    	{+    		        	if (temp instanceof L2TownZone && ((L2TownZone) temp).getTownId() == townId)+    		        		return (L2TownZone) temp;+    		    	}        return null;     }      /**@@ -184,11 +185,10 @@      */     public final static L2TownZone getTown(int x, int y, int z)     {-        for (L2ZoneType temp : ZoneManager.getInstance().getZones(x, y, z))-        {-        	if (temp instanceof L2TownZone)-        		return (L2TownZone) temp;-        }-        return null;+    	        for (L2ZoneType temp : ZoneManager.getInstance().getZones(x, y, z))+    		        {+    		        	if (temp instanceof L2TownZone)+    		        		return (L2TownZone) temp;+    		        }        return null;     } }Index: java/net/sf/l2j/Config.java===================================================================--- java/net/sf/l2j/Config.java	(revision 2797)+++ java/net/sf/l2j/Config.java	(working copy)@@ -109,6 +109,7 @@     public static Map<Integer, Integer> SKILL_REUSE_LIST;     public static boolean	AUTO_LEARN_SKILLS;     public static boolean	AUTO_LOOT_HERBS;+    public static boolean	AUTO_LOOT_RAID;     public static byte		BUFFS_MAX_AMOUNT;     public static byte		DANCES_MAX_AMOUNT;     public static boolean	AUTO_LEARN_DIVINE_INSPIRATION;@@ -395,6 +396,7 @@     public static int		MIN_MONSTER_ANIMATION;     public static int		MAX_MONSTER_ANIMATION;     public static int		COORD_SYNCHRONIZE;+    public static int		MULTISELL_MAX_AMOUNT;     public static boolean	GRIDS_ALWAYS_ON;     public static int		GRID_NEIGHBOR_TURNON_TIME;     public static int		GRID_NEIGHBOR_TURNOFF_TIME;@@ -560,7 +562,12 @@     public static boolean	L2JMOD_ENABLE_WAREHOUSESORTING_CLAN;     public static boolean	L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE;     public static boolean	L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT;-    +    public static int		TW_TOWN_ID;+    public static boolean 	TW_ALL_TOWNS;+    public static int		TW_ITEM_ID;+    public static int		TW_ITEM_AMOUNT;+    public static boolean 	TW_ALLOW_KARMA;+    public static boolean 	TW_DISABLE_GK;+    public static boolean 	TW_RESS_ON_DIE;     /** ************************************************** **/ 	/** L2JMods Settings -End                              **/ 	/** ************************************************** **/@@ -1344,6 +1351,7 @@ 	                ALT_PARTY_RANGE2					= Integer.parseInt(Character.getProperty("AltPartyRange2", "1400")); 	                STARTING_ADENA						= Integer.parseInt(Character.getProperty("StartingAdena", "100")); 	                AUTO_LOOT							= Boolean.parseBoolean(Character.getProperty("AutoLoot", "true"));+	                AUTO_LOOT_RAID						= Boolean.parseBoolean(Character.getProperty("AutoLootRaid", "true")); 	                UNSTUCK_INTERVAL					= Integer.parseInt(Character.getProperty("UnstuckInterval", "300")); 	                PLAYER_SPAWN_PROTECTION				= Integer.parseInt(Character.getProperty("PlayerSpawnProtection", "0")); 	                RESPAWN_RANDOM_ENABLED				= Boolean.parseBoolean(Character.getProperty("RespawnRandomInTown", "False"));@@ -1512,6 +1520,7 @@ 	                MIN_MONSTER_ANIMATION						= Integer.parseInt(General.getProperty("MinMonsterAnimation", "5")); 	                MAX_MONSTER_ANIMATION						= Integer.parseInt(General.getProperty("MaxMonsterAnimation", "20")); 	                COORD_SYNCHRONIZE							= Integer.parseInt(General.getProperty("CoordSynchronize", "-1"));+	                MULTISELL_MAX_AMOUNT     					= Integer.parseInt(General.getProperty("MaxAmountBuy", "5000")); 	                GRIDS_ALWAYS_ON								= Boolean.parseBoolean(General.getProperty("GridsAlwaysOn", "False")); 	                GRID_NEIGHBOR_TURNON_TIME					= Integer.parseInt(General.getProperty("GridNeighborTurnOnTime", "1")); 	                GRID_NEIGHBOR_TURNOFF_TIME					= Integer.parseInt(General.getProperty("GridNeighborTurnOffTime", "90"));@@ -1767,7 +1776,15 @@ 	                L2JMOD_ENABLE_WAREHOUSESORTING_CLAN     = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingClan", "False")); 	                L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE  = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False")); 	                L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT  = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingFreight", "False"));-	+	                +	                TW_TOWN_ID                    = Integer.parseInt(L2JModSettings.getProperty("TWTownId", "9"));	                +	                TW_ALL_TOWNS				  			= Boolean.parseBoolean(L2JModSettings.getProperty("TWAllTowns", "False"));+	                TW_ITEM_ID                    = Integer.parseInt(L2JModSettings.getProperty("TownWarItemId", "57"));+	                TW_ITEM_AMOUNT                    = Integer.parseInt(L2JModSettings.getProperty("TownWarItemAmount", "5000"));+	                TW_ALLOW_KARMA				  			= Boolean.parseBoolean(L2JModSettings.getProperty("AllowKarma", "False"));+	                TW_DISABLE_GK				  			= Boolean.parseBoolean(L2JModSettings.getProperty("DisableGK", "True"));+	                TW_RESS_ON_DIE				  			= Boolean.parseBoolean(L2JModSettings.getProperty("SendRessOnDeath", "False"));++	                 	                if (TVT_EVENT_PARTICIPATION_NPC_ID == 0) 	                { 	                    TVT_EVENT_ENABLED = false;@@ -2104,6 +2121,7 @@         else if (pName.equalsIgnoreCase("PreciseDropCalculation")) PRECISE_DROP_CALCULATION = Boolean.parseBoolean(pValue);         else if (pName.equalsIgnoreCase("MultipleItemDrop")) MULTIPLE_ITEM_DROP = Boolean.parseBoolean(pValue);         else if (pName.equalsIgnoreCase("CoordSynchronize")) COORD_SYNCHRONIZE = Integer.parseInt(pValue);+        else if (pName.equalsIgnoreCase("MaxAmountBuy")) MULTISELL_MAX_AMOUNT = Integer.parseInt(pValue);         else if (pName.equalsIgnoreCase("DeleteCharAfterDays")) DELETE_DAYS = Integer.parseInt(pValue);          else if (pName.equalsIgnoreCase("AllowDiscardItem")) ALLOW_DISCARDITEM = Boolean.parseBoolean(pValue);@@ -2249,6 +2267,7 @@         else if (pName.equalsIgnoreCase("LifeCrystalNeeded")) LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(pValue);         else if (pName.equalsIgnoreCase("SpBookNeeded")) SP_BOOK_NEEDED = Boolean.parseBoolean(pValue);         else if (pName.equalsIgnoreCase("AutoLoot")) AUTO_LOOT = Boolean.parseBoolean(pValue);+        else if (pName.equalsIgnoreCase("AutoLootRaid")) AUTO_LOOT_RAID = Boolean.parseBoolean(pValue);         else if (pName.equalsIgnoreCase("AutoLootHerbs")) AUTO_LOOT_HERBS = Boolean.parseBoolean(pValue);          else if (pName.equalsIgnoreCase("AltKarmaPlayerCanBeKilledInPeaceZone")) ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(pValue);@@ -2298,7 +2317,14 @@         else if (pName.equalsIgnoreCase("TvTEventParticipationTime")) TVT_EVENT_PARTICIPATION_TIME = Integer.parseInt(pValue);         else if (pName.equalsIgnoreCase("TvTEventRunningTime")) TVT_EVENT_RUNNING_TIME = Integer.parseInt(pValue);         else if (pName.equalsIgnoreCase("TvTEventParticipationNpcId")) TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(pValue);-        ++        else if (pName.equalsIgnoreCase("TownWarItemId")) TW_ITEM_ID = Integer.parseInt(pValue);+        else if (pName.equalsIgnoreCase("TownWarItemAmount")) TW_ITEM_AMOUNT = Integer.parseInt(pValue);+        else if (pName.equalsIgnoreCase("AllowKarma")) TW_ALLOW_KARMA = Boolean.parseBoolean(pValue);+        else if (pName.equalsIgnoreCase("DisableGK")) TW_DISABLE_GK = Boolean.parseBoolean(pValue);+        else if (pName.equalsIgnoreCase("TWTownId")) TW_TOWN_ID = Integer.parseInt(pValue);+        else if (pName.equalsIgnoreCase("TWAllTowns")) TW_ALL_TOWNS = Boolean.parseBoolean(pValue);+        else if (pName.equalsIgnoreCase("SendRessOnDeath")) TW_RESS_ON_DIE = Boolean.parseBoolean(pValue);+         // L2JMOD Warehouse Sorting         else if (pName.equalsIgnoreCase("EnableWarehouseSortingClan")) L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.parseBoolean(pValue);         else if (pName.equalsIgnoreCase("EnableWarehouseSortingPrivate")) L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.parseBoolean(pValue);Index: java/config/l2jmods.properties===================================================================--- java/config/l2jmods.properties	(revision 2797)+++ java/config/l2jmods.properties	(working copy)@@ -161,4 +161,51 @@ #---------------------------------- EnableWarehouseSortingClan = False EnableWarehouseSortingPrivate = False-EnableWarehouseSortingFreight = False\ No newline at end of file+EnableWarehouseSortingFreight = False++#----------------------------------+#Town War+#----------------------------------+# //townwar_start - Starts town war in Giran+# //townwar_end - Ends townwar in Giran+# Town id+#2: // Talking Island+#3: // Elven village+#1: // Dark elf village+#4: // Orc village+#6: // Dwarven village+#7: // Gludio+#5: // Gludin+#8: // Dion+#9: // Giran+#10: // Oren+#12: // Aden+#11: // Hunters village+#9: // Giran Harbour+#15: // Heine+#14: // Rune+#13: // Goddard+#17: // Schuttgart+#16: // Floran+#20: //Kamael Village+TWTownId = 9++#Set all towns?+TWAllTowns = False++#Reward for each kill:++TownWarItemId = 57+TownWarItemAmount = 5000++# Give PKers karma during townwar?+AllowKarma = False++# Disable GK while in event?+DisableGK = True++# If yes it will send a ressurect ask on death.+# If no when you die youll be there dead until the event ends.+# Set to false if you want KOTH town.+SendRessOnDeath = false+ 
Adapted for interlude:

Code: Select all

Index: C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/Config.java===================================================================--- C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/Config.java	(revision 0)+++ C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/Config.java	(revision 0)@@ -511,6 +511,13 @@ 	public static int     DUEL_COORD_Z; /** Party dueling */ 	public static boolean ALLOW_DAGGERS_WEAR_HEAVY; /** Can daggers wear heavy armor? */ 	public static boolean ALLOW_ARCHERS_WEAR_HEAVY; /** Can archers wear heavy armor? */+    public static int		TW_TOWN_ID;+    public static boolean 	TW_ALL_TOWNS;+    public static int		TW_ITEM_ID;+    public static int		TW_ITEM_AMOUNT;+    public static boolean 	TW_ALLOW_KARMA;+    public static boolean 	TW_DISABLE_GK;+    public static boolean 	TW_RESS_ON_DIE;  	public static boolean CLAN_LEADER_COLOR_ENABLED; /** Clan leader name color */ 	public static int     CLAN_LEADER_COLOR; /** Clan leader name color */     public static int     CLAN_LEADER_COLOR_CLAN_LEVEL; /** Clan leader name color */@@ -704,6 +711,9 @@ 	public static boolean GM_NAME_COLOR_ENABLED; /** Enable colored name for GM ? */ 	public static int     ADMIN_NAME_COLOR; /** Color of admin name */ 	public static int     GM_NAME_COLOR; /** Color of GM name */+	public static boolean GM_TITLE_COLOR_ENABLED; /** TODO Gm color here */+	public static int	  ADMIN_TITLE_COLOR;+	public static int	  GM_TITLE_COLOR; 	public static boolean GM_HERO_AURA; /** Place an aura around the GM ? */ 	public static boolean GM_STARTUP_INVULNERABLE; /** Set the GM invulnerable at startup ? */ 	public static boolean GM_STARTUP_INVISIBLE; /** Set the GM invisible at startup ? */@@ -1400,7 +1410,14 @@ 				DUEL_COORD_Y = Integer.parseInt(ModSettings.getProperty("DuelCoordinateY", "46710")); 				DUEL_COORD_Z = Integer.parseInt(ModSettings.getProperty("DuelCoordinateZ", "-3413")); 				ALLOW_DAGGERS_WEAR_HEAVY = Boolean.parseBoolean(ModSettings.getProperty("AllowDaggersUseHeavy", "True"));-				ALLOW_ARCHERS_WEAR_HEAVY = Boolean.parseBoolean(ModSettings.getProperty("AllowArchersUseHeavy", "True"));+				ALLOW_ARCHERS_WEAR_HEAVY = Boolean.parseBoolean(ModSettings.getProperty("AllowArchersUseHeavy", "True"));	                +	            TW_TOWN_ID = Integer.parseInt(ModSettings.getProperty("TWTownId", "9"));	                +	            TW_ALL_TOWNS = Boolean.parseBoolean(ModSettings.getProperty("TWAllTowns", "False"));+	            TW_ITEM_ID = Integer.parseInt(ModSettings.getProperty("TownWarItemId", "57"));+	            TW_ITEM_AMOUNT = Integer.parseInt(ModSettings.getProperty("TownWarItemAmount", "5000"));+	            TW_ALLOW_KARMA = Boolean.parseBoolean(ModSettings.getProperty("AllowKarma", "False"));+	            TW_DISABLE_GK = Boolean.parseBoolean(ModSettings.getProperty("DisableGK", "True"));+	            TW_RESS_ON_DIE = Boolean.parseBoolean(ModSettings.getProperty("SendRessOnDeath", "False")); 				CLAN_LEADER_COLOR_ENABLED = Boolean.parseBoolean(ModSettings.getProperty("ClanLeaderNameColorEnabled", "True"));  				CLAN_LEADER_COLOR = Integer.decode("0x" + ModSettings.getProperty("ClanLeaderColor", "00FFFF"));  				CLAN_LEADER_COLOR_CLAN_LEVEL = Integer.parseInt(ModSettings.getProperty("ClanLeaderColorAtClanLevel", "1"));@@ -1663,6 +1680,9 @@ 				GM_NAME_COLOR_ENABLED = Boolean.parseBoolean(otherSettings.getProperty("GMNameColorEnabled", "False")); 				ADMIN_NAME_COLOR = Integer.decode("0x" + otherSettings.getProperty("AdminNameColor", "00FF00")); 				GM_NAME_COLOR = Integer.decode("0x"	+ otherSettings.getProperty("GMNameColor", "FFFF00"));+				GM_TITLE_COLOR_ENABLED = Boolean.parseBoolean(otherSettings.getProperty("GMTitleColorEnabled", "False"));+				ADMIN_TITLE_COLOR = Integer.decode("0x" + otherSettings.getProperty("AdminTitleColor", "00FFcc"));+				GM_TITLE_COLOR = Integer.decode("0x" + otherSettings.getProperty("GMTitleColor", "00FF00")); 				GM_HERO_AURA = Boolean.parseBoolean(otherSettings.getProperty("GMHeroAura", "True")); 				GM_STARTUP_INVULNERABLE = Boolean.parseBoolean(otherSettings.getProperty("GMStartupInvulnerable", "True")); 				GM_STARTUP_INVISIBLE = Boolean.parseBoolean(otherSettings.getProperty("GMStartupInvisible", "True"));@@ -2382,7 +2402,23 @@ 			MOD_GVE_AMMOUNT_ADENA_BY_PVP = Integer.parseInt(pValue);  		else if (pName.equalsIgnoreCase("ActiveAnimSS")) 	 		MOD_GVE_ACTIVE_ANIM_SS = Boolean.valueOf(pValue);-+		+		//Town War+        else if (pName.equalsIgnoreCase("TownWarItemId"))+        	TW_ITEM_ID = Integer.parseInt(pValue);+        else if (pName.equalsIgnoreCase("TownWarItemAmount"))+        	TW_ITEM_AMOUNT = Integer.parseInt(pValue);+        else if (pName.equalsIgnoreCase("AllowKarma"))+        	TW_ALLOW_KARMA = Boolean.parseBoolean(pValue);+        else if (pName.equalsIgnoreCase("DisableGK"))+        	TW_DISABLE_GK = Boolean.parseBoolean(pValue);+        else if (pName.equalsIgnoreCase("TWTownId"))+        	TW_TOWN_ID = Integer.parseInt(pValue);+        else if (pName.equalsIgnoreCase("TWAllTowns"))+        	TW_ALL_TOWNS = Boolean.parseBoolean(pValue);+        else if (pName.equalsIgnoreCase("SendRessOnDeath"))+        	TW_RESS_ON_DIE = Boolean.parseBoolean(pValue);	+		 		// PvP settings 		else if (pName.equalsIgnoreCase("MinKarma")) 			KARMA_MIN_KARMA = Integer.parseInt(pValue);Index: C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java===================================================================--- C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 0)+++ C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 0)@@ -173,6 +173,13 @@                 else if (activeChar.getAccessLevel() >= 75)                     activeChar.getAppearance().setNameColor(Config.GM_NAME_COLOR);             }+                if (Config.GM_TITLE_COLOR_ENABLED)+            	{+            	if (activeChar.getAccessLevel() >= 100)+                    activeChar.getAppearance().setTitleColor(Config.ADMIN_TITLE_COLOR);+            	else if (activeChar.getAccessLevel() >= 75)+                         activeChar.getAppearance().setTitleColor(Config.GM_TITLE_COLOR);+                    }         }          if (Config.DONATOR_NAME_COLOR_ENABLED)Index: C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java===================================================================--- C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 0)+++ C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 0)@@ -77,6 +77,7 @@ import net.sf.l2j.gameserver.instancemanager.ItemsOnGroundManager; import net.sf.l2j.gameserver.instancemanager.QuestManager; import net.sf.l2j.gameserver.instancemanager.SiegeManager;+import net.sf.l2j.gameserver.instancemanager.TownManager; import net.sf.l2j.gameserver.model.BlockList; import net.sf.l2j.gameserver.model.FishData; import net.sf.l2j.gameserver.model.ForceBuff;@@ -131,6 +132,7 @@ import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.model.quest.QuestState; import net.sf.l2j.gameserver.model.quest.State;+import net.sf.l2j.gameserver.model.zone.type.L2TownZone; import net.sf.l2j.gameserver.network.L2GameClient; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;@@ -4736,7 +4738,28 @@ 	 *  	 */ 	@Override-	public boolean doDie(L2Character killer) {+	public boolean doDie(L2Character killer) +	{+	if (Config.TW_RESS_ON_DIE)+	{+		int x1,y1,z1;+		x1 = getX();+		y1 = getY();+		z1 = getZ();+		L2TownZone Town;+		Town = TownManager.getTown(x1,y1,z1);+		if (Town != null && isinTownWar())+		{+			if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+			{+				reviveRequest(this, null, false);+			}+			else if (Config.TW_ALL_TOWNS)+			{+				reviveRequest(this, null, false);+			}+		}+	} 		// Kill the L2PcInstance 		if (!super.doDie(killer)) 			return false;@@ -5223,7 +5246,27 @@ 	 * Increase the pvp kills count and send the info to the player 	 *  	 */-	public void increasePvpKills() {+	public void increasePvpKills() +	{+      	int x,y,z;+    	x = getX();+      	y = getY();+      	z = getZ();+        L2TownZone Town;+      	Town = TownManager.getTown(x,y,z);+      	if (Town != null && isinTownWar())+      	{+      			if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+    		    	{+    		    		getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);+    		    		sendMessage("You received your prize for a town war kill!");+    		    	}+    	    		else if (Config.TW_ALL_TOWNS)+    	    		{+		    			getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);+		    			sendMessage("You received your prize for a town war kill!");+   	    		}+      	} 		// Add karma to attacker and increase its PK counter 		if ((CTF._started && _inEventCTF)) 			return;@@ -5325,9 +5368,43 @@ 			newKarma = Integer.MAX_VALUE - getKarma();  		// Add karma to attacker and increase its PK counter+        	int x,y,z;+    	x = getX();+      	y = getY();+      	z = getZ();+        L2TownZone Town;+      		Town = TownManager.getTown(x,y,z);+      	 		if (Config.DEFAULT_PK_SYSTEM) { 			setPkKills(getPkKills() + 1);-			setKarma(getKarma() + newKarma);+         if (Town != null && isinTownWar())+         { +	        //nothing+         }+         else if (Town != null && !isinTownWar())+         {+        	 setKarma(getKarma() + newKarma);+         }+         else if (Town == null)+         {+        	 setKarma(getKarma() + newKarma);+         }+      	+         +         if (Town != null && isinTownWar())+      	 {+      			if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+    		    	{+    		    		getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);+    		    		sendMessage("You received your prize for a town war kill!");+    		    	}+    	    		else if (Config.TW_ALL_TOWNS && Town.getTownId() != 0)+    	    		{+		    			getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);+		    			sendMessage("You received your prize for a town war kill!");+    	    		}+      	 }+ 		} 		if (Config.CUSTOM_PK_SYSTEM) { 			setPvpKills(getPvpKills() + 1);Index: C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/model/L2Character.java===================================================================--- C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/model/L2Character.java	(revision 0)+++ C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/model/L2Character.java	(revision 0)@@ -67,6 +67,7 @@ //import net.sf.l2j.gameserver.model.entity.TvT; import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.model.quest.QuestState;+import net.sf.l2j.gameserver.model.zone.type.L2TownZone; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.Attack;@@ -483,8 +484,31 @@ 	 * <li>Modify the position of the pet if necessary</li><BR><BR> 	 * 	 */+	    private boolean _inTownWar;+			public final boolean isinTownWar() { return _inTownWar; }+			public final void setInTownWar(boolean value) { _inTownWar = value; } 	public void teleToLocation(int x, int y, int z, boolean allowRandomOffset) 	{+		 if(Config.TW_DISABLE_GK)+		 {+			 int x1,y1,z1;+			 x1 = getX();+			 y1 = getY();+			 z1 = getZ();+			 L2TownZone Town;+			 Town = TownManager.getTown(x1,y1,z1);+			 if (Town != null && isinTownWar() )+			 {+	      			if (Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)+	    		    	{+	      					return;+	    		    	}+	    	    	else if (Config.TW_ALL_TOWNS)+	    	    		{+			    			return;+	    	    		}+			 }+		 } 		// Stop movement 		stopMove(null, false); 		abortAttack();Index: C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java===================================================================--- C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java	(revision 0)+++ C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/handler/AdminCommandHandler.java	(revision 0)@@ -80,6 +80,7 @@ import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminTarget; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminTeleport; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminTest;+import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminTownWar; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminTvTEngine; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminUnblockIp; import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminZone;@@ -164,6 +165,7 @@         registerAdminCommandHandler(new AdminLevel());         registerAdminCommandHandler(new AdminQuest());         registerAdminCommandHandler(new AdminZone());+        registerAdminCommandHandler(new AdminTownWar());         registerAdminCommandHandler(new AdminCTFEngine());         registerAdminCommandHandler(new AdminCursedWeapons());         registerAdminCommandHandler(new AdminGeodata());Index: C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/instancemanager/TownManager.java===================================================================--- C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/instancemanager/TownManager.java	(revision 0)+++ C:/Users/Xanthos/Documents/java/GameServer/java/net/sf/l2j/gameserver/instancemanager/TownManager.java	(revision 0)@@ -46,7 +46,7 @@      // =========================================================     // Data Field-    private FastList<L2TownZone> _towns;+    private static FastList<L2TownZone> _towns;      // =========================================================     // Constructor@@ -142,7 +142,7 @@         return false;     } -    public final L2TownZone getTown(int townId)+    public final static L2TownZone getTown(int townId)     {         for (L2TownZone temp : _towns)         	if (temp.getTownId() == townId) return temp;@@ -162,7 +162,6 @@         {         	if (temp instanceof L2TownZone)         		return (L2TownZone) temp;-        }-        return null;+        }    return null;     } }Index: C:/Users/Xanthos/Documents/java/GameServer/java/config/mod.properties===================================================================--- C:/Users/Xanthos/Documents/java/GameServer/java/config/mod.properties	(revision 0)+++ C:/Users/Xanthos/Documents/java/GameServer/java/config/mod.properties	(revision 0)@@ -596,4 +596,50 @@ OfflineSetNameColor = False  # Color of the name in offline mode (if OfflineSetNameColor = True)-OfflineNameColor = 808080\ No newline at end of file+OfflineNameColor = 808080++#----------------------------------+#Town War+#----------------------------------+# //townwar_start - Starts town war in Giran+# //townwar_end - Ends townwar in Giran+# Town id+#2: // Talking Island+#3: // Elven village+#1: // Dark elf village+#4: // Orc village+#6: // Dwarven village+#7: // Gludio+#5: // Gludin+#8: // Dion+#9: // Giran+#10: // Oren+#12: // Aden+#11: // Hunters village+#9: // Giran Harbour+#15: // Heine+#14: // Rune+#13: // Goddard+#17: // Schuttgart+#16: // Floran+#20: //Kamael Village+TWTownId = 9++#Set all towns?+TWAllTowns = False++#Reward for each kill:++TownWarItemId = 57+TownWarItemAmount = 5000++# Give PKers karma during townwar?+AllowKarma = False++# Disable GK while in event?+DisableGK = True++# If yes it will send a ressurect ask on death.+# If no when you die youll be there dead until the event ends.+# Set to false if you want KOTH town.+SendRessOnDeath = false\ No newline at end of fileIndex: C:/Users/Xanthos/Documents/java/GameServer/java/config/other.properties===================================================================--- C:/Users/Xanthos/Documents/java/GameServer/java/config/other.properties	(revision 0)+++ C:/Users/Xanthos/Documents/java/GameServer/java/config/other.properties	(revision 0)@@ -174,6 +174,17 @@ # (Must be in hex BGR format: eg. FFFF00 = Yellow) GMNameColor = FFFF00 +# Allow different title color for GM and Admin characters.+GMTitleColorEnabled = True++# Color to use for Admin titles, if enabled. (access level 100+).+# (Must be in hex BGR format: eg. 00FF00 = Green)+AdminTitleColor = FF0000++# Color to use for GM titles, if enabled. (access level 75+).+# (Must be in hex BGR format: eg. FFFF00 = Yellow)+GMTitleColor = FFFF00+ # Enable GMs to have the glowing aura of a Hero character. GMHeroAura = False  
Could somebody help me?Thx in advance.
Post Reply