Jump to content

[SHARE][V4]Town War event


Vago

Recommended Posts

hiddd for 50 posts for now, vago can change it

 

Im sorry but I dont want my stuff hidden in any way. Thats why I posted it here...for everyone to have it

Wth!?

 

-beep-ING AWESOME!

 

When You Manage To Make It Fully Working ( Cause I See It's In Beta )

 

You'll Have +1 From Me..

 

Btw , Continue Sharing Java Stuff You Help a Lot. And That's Good :)

 

This is the v1 release. I forgot to change title

 

 

I repeat...Please test it as much as you can and give me as much info and ideas as you can. This is the only way to make it better

Link to comment
Share on other sites

well i start to use it.

-Compiled

-server started

-the start_war announce incorrect(it said normal too)

-no error msg

-bug in the grand boss manager instance i dont know its for everybody but everytime when i start the event its +12 reloaded grandboss instance.

 

more soon when i have more time

Link to comment
Share on other sites

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

19: //Primeval Isle

20: //Kamael Village

21: //South of Wastelands Camp

22: //Fantasy Island

 

List of the towns that can be used in that event(use only the Id)

Link to comment
Share on other sites

You can use it like

 

TownManager.getTown(1).setParameter("isPeaceZone", "true");

TownManager.getTown(5).setParameter("isPeaceZone", "true");      

TownManager.getTown(9).setParameter("isPeaceZone", "true");

 

But dont forget to change the announce too also to set them back to peace zone when event is over :p

Link to comment
Share on other sites

You can use it like

 

TownManager.getTown(1).setParameter("isPeaceZone", "true");

TownManager.getTown(5).setParameter("isPeaceZone", "true");      

TownManager.getTown(9).setParameter("isPeaceZone", "true");

 

But dont forget to change the announce too also to set them back to peace zone when event is over :p

Ok, thank you. Waiting for Cobra to adapt this for L2JFree :P I hope he'll release it ^__^

Link to comment
Share on other sites

Well will be great if you add at config like ZoneTownId what i mean .. the admin can chose every time what town he want to be battle zone ...!!

 

Like ZoneTownId= 9 this is for giran you have done .. any way .. here the code

 

Index: C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/config/l2jmods.properties
===================================================================
--- C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/config/l2jmods.properties	(revision 2739)
+++ C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/config/l2jmods.properties	(working copy)
@@ -161,4 +161,48 @@
#----------------------------------
EnableWarehouseSortingClan = False
EnableWarehouseSortingPrivate = False
-EnableWarehouseSortingFreight = False
\ No newline at end of file
+EnableWarehouseSortingFreight = False
+
+# unsummon pet of ctf participants on event start?
+CTFOnStartUnsummonPet=true
+
+#----------------------------------
+#Town War
+#----------------------------------
+# //townwar_start - Starts town war in Giran
+# //townwar_end - Ends townwar in Giran
+#REWARD FOR EACH KILL:
+
+TownWarItemId = 57
+TownWarItemAmount = 5000
+
+# Give PKers karma during townwar?
+AllowKarma = False
+
+#----------------------------------
+#Town Id
+#----------------------------------
+# You Can Choose The Id Of Town
+#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
+#19: //Primeval Isle
+#20: //Kamael Village
+#21: //South of Wastelands Camp
+#22: //Fantasy Island
+ZoneTownId= 9
Index: C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/net/sf/l2j/Config.java
===================================================================
--- C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/net/sf/l2j/Config.java	(revision 2739)
+++ C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/net/sf/l2j/Config.java	(working copy)
@@ -563,6 +563,9 @@
     /** ************************************************** **/
	/** L2JMods Settings -End                              **/
@@ -949,8 +952,10 @@
     public static int     FAST_CONNECTION_LIMIT;
     public static int     NORMAL_CONNECTION_TIME;
     public static int     FAST_CONNECTION_TIME;
-    public static int     MAX_CONNECTION_PER_IP;  
+    public static int     MAX_CONNECTION_PER_IP;

+	public static int ZONE_TOWN_ID;  
+
     /**
      * This class initializes all global variables for configuration.<br>
      * If key doesn't appear in properties file, a default value is setting on by this class.
@@ -1781,6 +1786,12 @@
+	                ZONE_TOWN_ID                            = Integer.parseInt(L2JModSettings.getProperty("ZoneTownId", "9"));

	                if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
	                {
@@ -2321,6 +2332,12 @@
         else if (pName.equalsIgnoreCase("EnableWarehouseSortingClan")) L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("EnableWarehouseSortingPrivate")) L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("EnableWarehouseSortingFreight")) L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT = Boolean.parseBoolean(pValue);
+       else if (pName.equalsIgnoreCase("ZoneTownId")) ZONE_TOWN_ID = Integer.parseInt(pValue);

         // PvP settings
         else if (pName.equalsIgnoreCase("MinKarma")) KARMA_MIN_KARMA = Integer.parseInt(pValue);
Index: C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTownWar.java
===================================================================
--- C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTownWar.java
+++ C:/Documents and Settings/Cobra/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminTownWar.java
+/*
+* 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 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.model.L2Character;
+import net.sf.l2j.gameserver.model.L2Object;
+import net.sf.l2j.gameserver.model.L2World;
+import net.sf.l2j.gameserver.model.L2WorldRegion;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.zone.L2ZoneType;
+import net.sf.l2j.gameserver.instancemanager.*;
+
+public class AdminTownWar implements IAdminCommandHandler
+{
+   private static final String[] ADMIN_COMMANDS =
+   {
+      "admin_townwar_start",
+      "admin_townwar_end"
+   };
+   private L2WorldRegion _worldRegion;
+    private L2Object _activeObject;
+    public final L2Object getActiveObject()
+    {
+        return _activeObject;
+    }
+   public boolean useAdminCommand(String command, L2PcInstance activeChar)
+   {
+      if (command.startsWith("admin_townwar_start"))
+      {
+            TownManager.getTown(Config.ZONE_TOWN_ID).setParameter("isPeaceZone", "false");
+            ZoneManager.load();
+            
+            Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
+            {
+               for (L2PcInstance onlinePlayer : pls)
+                  if (onlinePlayer.isOnline() == 1 && onlinePlayer.isInsidePeaceZone(onlinePlayer))
+                     {
+                     onlinePlayer.revalidateZone(true);
+                     onlinePlayer.setInTownWar(true);
+                     }
+            }
+               Announcements.getInstance().announceToAll("Giran Castle Town has been set war zone by " + activeChar.getName() + ".");
+      }
+      if (command.startsWith("admin_townwar_end"))
+      {
+            TownManager.getTown(Config.ZONE_TOWN_ID).setParameter("isPeaceZone", "true");
+            ZoneManager.load();
+            
+            Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
+            {
+               for (L2PcInstance onlinePlayer : pls)
+                  if (onlinePlayer.isOnline() == 1 && !onlinePlayer.isInsidePeaceZone(onlinePlayer))
+                     {
+                     onlinePlayer.revalidateZone(true);
+                     onlinePlayer.setInTownWar(false);
+                     }
+            }
+            Announcements.getInstance().announceToAll("Giran Castle Town has been set back to normal by " + activeChar.getName() + ".");
+      }
+      return true;
+   }
+   
+   
+   
+   public String[] getAdminCommandList()
+   {
+      return ADMIN_COMMANDS;
+   }
+}
+

 

Again good job :) ... for l2jfree it have some bugs ... but i'm wokring on it ..  wen will be ready without any problem i'll share it!

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



  • Posts

    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt  
    • Server Rates: » Xp 500x. » Sp 500x. » Aden 500x. » Drop 1x. » PartyXp 2x. » PartySp 2x. » Starting character level -61. Enchant rates: » Safe enchant +4. » Blessed and simple scrolls max enchant (+16). » Crystal scrolls max enchant (+20). » Simple enchant scrolls chance – 65%. » Blessed enchant scrolls chance – 100%. » Crystal enchant scrolls chance – 50% Augmentations: » Mid life stone skill chance – 5%. » High life stone skill chance – 10%. » Top life stone skill chance – 20%. » Augments 1+1 Unique features: » Main town – Giran » Automatic-Manual Potions. » Working 2 castle sieges. (Giran-Aden) » SPS cancel lasts 10 seconds and than buffs come back. » Stackable scrolls, lifestones, book of giants. » Unique pvp zone » More then 11 active raid bosses. » Wedding system. » Unique farming areas. » Npc skill enchanter. » Full npc buffer with auto buff. » Max count of buffs – 55. » Max subclasses – 4. » Free and no quest class change. » Free and no quest sub class. » Raid boss drop nobless item. » No weight limit. » Unique protection anti-hwy armor for archers/daggers etc. » Ingame password change. » Top pvp/pk/online ranks NPC. » Unique monsters & NPC. » Interlude retail skills. » Server up-time [24/7] [99]%. » Perfect class balance (all class can kill all class depending on players skill and setup knowledge,gear,augmentations). » Announcements on double kills triple kills etc. » Announcements on Grand Boss death , with the name of the killer as well as clan name of the player. » Information Npc in game with all servers infromations. Custom server gear : 1). Titanium Armor Lv.1 2). Epic Armor Lv.2 3). Epic Weapons-Kamikaze-Black S grade (Same Stats) 4). Demonic-Angelic Wings-Baium Hair-Custom Accessories (SameStats) 5). Custom Fighter/Mage tattoo Lv1-Lv2-Lv3 6). Shirt (STR,CON,INT +1) 7). Custom Shields Server Commands: .tvtjoin .tvtleave – Join or leave tvt event. .ctfjoin .ctfleave – Join or leave ctf event. .dmjoin .dmleave – Join of leave dm event. .online – current online players count. .repair – repairs stuck character in world. .menu – opens online menu panel. .exit – PVP zone exit in case you are bullied. .changepassword - Opens online menu then u can change ur password in game. .farm - Enable/disable autofarm Event system: » TVT event » CTF event » DM event » Tournament Event » Party Zone » Unique event shop. Olympiad game: » Retail olympiad game. » Competition period [1] week. » Olympiad start time [18:00] end [00:00] GMT+2. » New Heroes every Sunday.
    • Tomorrow grand opening lests go 🙂 
    • New season of Warfire X150 has been postponed to September 28th.
  • Topics

×
×
  • Create New...