Jump to content
  • 0

Hello Little help


Celebron

Question

How can add this in my server.

Index: data/scripts/handlers/MasterHandler.java

===================================================================

--- data/scripts/handlers/MasterHandler.java    (revision 7732)

+++ data/scripts/handlers/MasterHandler.java    (working copy)

@@ -245,6 +245,7 @@

import handlers.voicedcommandhandlers.Debug;

import handlers.voicedcommandhandlers.Lang;

import handlers.voicedcommandhandlers.TvTVoicedInfo;

+import handlers.voicedcommandhandlers.VisualArmor;

import handlers.voicedcommandhandlers.Wedding;

import handlers.voicedcommandhandlers.stats;

 

@@ -550,6 +551,8 @@

                        VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Lang());

                if (Config.L2JMOD_DEBUG_VOICE_COMMAND)

                        VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Debug());

+             

+              VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new VisualArmor());

                _log.config("Loaded " + VoicedCommandHandler.getInstance().size() + " VoicedHandlers");

        }

     

Index: data/scripts/handlers/voicedcommandhandlers/VisualArmor.java

===================================================================

--- data/scripts/handlers/voicedcommandhandlers/VisualArmor.java        (revision 0)

+++ data/scripts/handlers/voicedcommandhandlers/VisualArmor.java        (revision 0)

@@ -0,0 +1,65 @@

+/*

+ * 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 handlers.voicedcommandhandlers;

+

+import com.l2jserver.extensions.VisualArmorController;

+import com.l2jserver.gameserver.handler.IVoicedCommandHandler;

+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;

+import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate;

+

+public class VisualArmor implements IVoicedCommandHandler

+{

+      private static final String[] VOICED_COMMANDS =

+      {

+              "dressme", "dressMe", "DressMe", "cloakOn", "cloakOff"

+      };

+     

+     

+      public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)

+      {

+              if(command.contains("cloakOn"))

+              {

+                      activeChar.visualArmor.weaponLRHANDId =0;

+                      InventoryUpdate iu = new InventoryUpdate();

+              activeChar.sendPacket(iu);

+              activeChar.broadcastUserInfo();

+                      InventoryUpdate iu2 = new InventoryUpdate();

+                      activeChar.sendPacket(iu2);

+                      activeChar.broadcastUserInfo();

+                      activeChar.sendMessage("Cloak enabled.");

+              }

+              else if(command.contains("cloakOff"))

+              {

+                      activeChar.visualArmor.weaponLRHANDId =1;

+                      InventoryUpdate iu = new InventoryUpdate();

+              activeChar.sendPacket(iu);

+              activeChar.broadcastUserInfo();

+                      InventoryUpdate iu2 = new InventoryUpdate();

+                      activeChar.sendPacket(iu2);

+                      activeChar.broadcastUserInfo();

+                      activeChar.sendMessage("Cloak disabled.");

+              }

+              else

+                      VisualArmorController.dressMe(activeChar);

+             

+              return true;

+      }

+     

+     

+      public String[] getVoicedCommandList()

+      {

+              return VOICED_COMMANDS;

+      }

+}

\ No newline at end of file

 

 

Master Handler..

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

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

Guest
Answer this question...

×   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 forum users! A Telegram bot for conducting contests and automatically awarding prizes to characters is available for sale. Out of the box, it supports the following builds: Paun-Team, L2jEternity, Lucera2. Any other build can be added upon client request for free. Brief bot functionality: Multilingual support: ru, eng, ua Daily and scheduled contests with images Convenient prize and contest configuration Participation bonuses Automatic removal of contests after a specified time Channel subscription verification. Price: $70 Contact: https://t.me/se1dhe A few screenshots below  
    • You can't simply point fingers at others for your own shortcomings it's important to take responsibility and learn from your mistakes.     From here, i can see that you've given up because your servers weren't successful, and now you're blaming the community for your mistakes. You can't just say it's others fault when things go wrong you need to admit your own mistakes and try to do better next time.   peace
    • The same topic comes up time and time again. The "end" of L2 isn't due to the server administrators or the type of servers they create. It's largely because as adults, we struggle to find the time for economic and social stability. The reason I don't play L2 isn't that the servers are shit. On the contrary, many of them introduce fresh content in both PvE and PvP, bringing innovative ideas to a game that's 20 years old. The real barrier is lack of  time our life demands. I can't commit 6-7 hours daily just to make consistent  progress to keep up with the meta and not  to find myself lagging behind a week. This isn't only on l2 but with the  general idea of mmo. In the past five years, I've bought games like New World, Diablo 4, WoW, and Final Fantasy 14. But often, I find myself leveling up at my own  pace and mostly solo since my friends and I have different schedules. So, what do I end up doing when I feel like gaming? I typically boot up a MOBA or FPS, play for a couple of hours on Discord with whoever is available to play, then shut down my PC and call it a day.  Additionally, to stay on topic, I believe we're currently in an era where there are several stable projects for players to enjoy. Examples include Reborn, Classic Club, Talking Island, and Gold, just to name a few. As for the Aqua project, I've observed its launch and closure occur at a similar pace as those scam servers you've mentioned. 
    • WTB POWERLEVEL L2EVE 20-40 any price  
  • 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