Jump to content

[Share] Join Oly With Command (.joinoly)


Recommended Posts

Hello,hope to find it usefull

 

.joinoly and you are register

 

 

 

Index: L2jFrozen_GameServer\head-src\com\l2jfrozen\Config.java
===================================================================
--- head-src\com\l2jfrozen\Config.java	(revision 931)
+++ head-src\com\l2jfrozen\Config.java	(working copy)

@@ -2385,1 +2385,5 @@
public static String PVP2_CUSTOM_MESSAGE;
+	public static boolean OLYMPIAD_JOIN_COMMAND;
+
//============================================================
public static void loadL2JFrozenConfig()

@@ -2512,1 +2512,13 @@
		PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
+	        OLYMPIAD_JOIN_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("EnableJoinOlympiadCommand", "True"));
(/No newline at the end of the line)

Index: L2jFrozen_GameServer\head-src\com\l2jfrozen\gameserver\handler\voicedcommandhandlers\JoinOly.java
===================================================================
+++ head-src\com\l2jfrozen\gameserver\handler\voicedcommandhandlers\JoinOly.java (working copy)
+package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
+
+import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad;
+import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+
+public class JoinOly implements IVoicedCommandHandler
+{
+	
+	  private static final String[] VOICED_COMMANDS = { "joinoly" , "leaveoly" };
+
+
+public boolean useVoicedCommand(String command, L2PcInstance activeChar,String target)
+{
+    if (command.equalsIgnoreCase("joinoly"))
+    {
+     if (!activeChar.isInOlympiadMode() )
+     {
+    	 Olympiad.getInstance().registerNoble(activeChar, true);
+    	 return true;
+   }
+    	 else if (!activeChar.isNoble() || activeChar.isDead() || activeChar.isFestivalParticipant() || activeChar.atEvent
+    		 || activeChar.isSubClassActive() || activeChar.isInDuel() || activeChar.isAlikeDead()
+    		 || activeChar.getPvpFlag() > 0 || activeChar.getKarma() > 0 || activeChar.isInCombat() || activeChar.inObserverMode())     
+    {
+    activeChar.sendMessage("Your Status Doesnt Allow You To Join Olympiad!");
+    return false;
+         }
+     }
+   
+    if (command.equalsIgnoreCase("leaveoly"))
+     {
+    	 if (activeChar.isInOlympiadMode())
+    	 {
+    		 Olympiad.getInstance().unRegisterNoble(activeChar);
+    		 return true;
+    	 }
+    	 else if (activeChar.isAlikeDead() || activeChar.isInCombat()
+    			 || activeChar.inObserverMode() || !activeChar.isInOlympiadMode())
+        		 {
+        	 activeChar.sendMessage("You Can't Leave Olympiad while Participating somewhere.");
+        	 return false;
+         }
+     }
+    
+    
+    return true;
+}
+
+	public String[] getVoicedCommandList()
+	{
+    	return VOICED_COMMANDS;
+	}
+}
+
(/No newline at the end of the line)

Index: L2jFrozen_GameServer\head-src\com\l2jfrozen\gameserver\handler\VoicedCommandHandler.java
===================================================================
--- head-src\com\l2jfrozen\gameserver\handler\VoicedCommandHandler.java	(revision 570)
+++ head-src\com\l2jfrozen\gameserver\handler\VoicedCommandHandler.java	(working copy)

@@ -75,1 +75,9 @@
if(Config.BANKING_SYSTEM_ENABLED)
	{
		registerVoicedCommandHandler(new BankingCmd());
	}
+
+		if(Config.OLYMPIAD_JOIN_COMMAND)
+		{
+			registerVoicedCommandHandler(new JoinOly());
+		}
	if(Config.CTF_COMMAND)
(/No newline at the end of the line)

Index: L2jFrozen_GameServer\config\functions\l2jfrozen.ppt
===================================================================
--- config\functions\l2jfrozen.ppt	(revision 912)
+++ config\functions\l2jfrozen.ppt	(working copy)

@@ -282,1 +282,1 @@
ProtectorSkillId = 1170
# Skill Level used for npc
ProtectorSkillLevel = 13
ProtectorSkillTime = 600
# Npc Protector Message
ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
+
+#-------------------------------------
+# Join and Leave Olympiad by Command -
+#-------------------------------------
+# Default: True
+EnableJoinOlympiadCommand = True

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

    • Greetings, dear friends! We want to take a moment to express our gratitude to each and every one of you who has been part of our community. Your passion, dedication, and enthusiasm for our server make it all worthwhile. We know that sometimes arguments and discussions can get a little heated. We know you demand the best, and you only evoke those emotions because you expect the best. It’s the passion for wanting the best server that’s making this happen. Just know we’ll try our best! We understand that perfection is a journey, not a destination, and we’ve had our ups and downs. But your continuous feedback and support is very helpful to us, it’s what keeps up going. We want you to know that we’re committed to doing our absolute best, every day. We will listen to your feedback, your suggestions, and your concerns. We value them because they help us improve. We’ll do our best in addressing them. Please keep it coming, we’ll continue working on the server, making it better every day. As we move forward, we promise to keep trying, to keep listening, and to keep working to make this server and its community the best it can be. We’re excited about the upcoming Beta server in just a few days, we can’t wait to share it with you! So, thank you for being part of this community, and thank you for believing in us. If you have any feedback for us, please let us know. We’re in this together, and together, we’ll achieve greatness. Please keep sharing your feedback with us. Your input is invaluable and guides us towards creating a Lineage 2 experience that we can all be proud of. Thank you again!
    • I updated it as soon as I posted my comment though 😅    
    • any good updates on interface?
    • Added new Updates/Fixes: 25-09-2023.   Free update for free and premium members.   Added: Enchant Armor Effect System V1, +6,+7,+8 etc. you can edit the effects from system-eu -> FullArmorEnchantEffectData.dat.   How is working? you need to enchant your full set armor example to +6 to take the effect armor stats etc.   You download the Classic Mode update from here : Armor Enchant Effect for Classic: https://esl2.org/pts_classic_updates/Update Armor EnchantEffect For Classic Mode.rar   You download the Live Mode update from here : Armor Enchant Effect for Live: https://esl2.org/pts_classic_updates/Update Armor EnchantEffect For Live Mode.rar   if you find any problems report -> bugs here: https://discord.gg/AcbHDJUz5Q    
    • In the often-confusing landscape of online gaming, it's such a relief to stumble upon a gem that captures the essence of what a great gaming experience should be. The moment you enter this portal, you're greeted by a captivating user interface that immediately sets the tone for what's to come. But what truly sets this platform apart from its competition is not just its visually pleasing design; it's the robust array of gaming options on offer. No need to scroll endlessly through mediocre choices. Instead, you'll find a well-curated collection of games that cater to a broad range of preferences. And when you navigate to https://slotscity.com/, you'll also discover that the website runs smoothly on various devices, which is always a plus. The usability is fantastic. Not to be overlooked are the little details, like the intuitive menu and speedy load times, which altogether contribute to an outstanding user experience.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock