Jump to content

Recommended Posts

Posted (edited)

CORE :

Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java    (revision 1)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java    (working copy)
@@ -20,18 +20,29 @@

 import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.BuffCommand;
+import net.sf.l2j.gameserver.datatables.SkillTable;

@@ -89,10 +100,218 @@
               
             else if (_command.startsWith("player_help "))
             {
                 playerHelp(activeChar, _command.substring(12));
             }
+            // start voiced .buff command
+            else if (_command.startsWith("buffCommandFight"))
+            {
+                BuffCommand.getFullBuff(activeChar, false);
+            }            
+            else if (_command.startsWith("buffCommandMage"))
+            {
+                BuffCommand.getFullBuff(activeChar, true);
+            }
+            else if (_command.startsWith("buffCommand") && BuffCommand.check(activeChar))
+            {
+                String idBuff = _command.substring(12);
+                int parseIdBuff = Integer.parseInt(idBuff);
+                SkillTable.getInstance().getInfo(parseIdBuff, SkillTable.getInstance().getMaxLevel(parseIdBuff)).getEffects(activeChar, activeChar);
+                BuffCommand.showHtml(activeChar);
+            }
+            else if (_command.startsWith("cancelBuffs") && BuffCommand.check(activeChar))
+            {
+                activeChar.stopAllEffectsExceptThoseThatLastThroughDeath();
+                BuffCommand.showHtml(activeChar);
+            }
+            // end voiced .buff command

Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/BuffCommand.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/BuffCommand.java    (revision 0)
+++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/BuffCommand.java    (working copy)
@@ -0,0 +1,59 @@
+package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.datatables.SkillTable;
+import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
+import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ *
+ * @author Bluur
+ *
+ */
+public class BuffCommand implements IVoicedCommandHandler
+{
+    private final String[] _voicedCommands =
+    {
+        "buff"
+    };
+    
+    @Override
+    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+    {    
+        if (check(activeChar)) //retorna                
+            showHtml(activeChar);    
+        
+        return true;
+    }
+    
+    public static void getFullBuff(L2PcInstance p, boolean isClassMage)
+    {
+        if (check(p))
+        {
+            if (isClassMage)
+            {
+                for (int b : Config.BUFF_COMMAND_MAGE_IDBUFFS)    
+                     SkillTable.getInstance().getInfo(b, SkillTable.getInstance().getMaxLevel(b)).getEffects(p, p);        
+            }
+            else
+            {
+                for (int b : Config.BUFF_COMMAND_FIGHT_IDBUFFS)    
+                     SkillTable.getInstance().getInfo(b, SkillTable.getInstance().getMaxLevel(b)).getEffects(p, p);        
+            }
+            p.sendMessage("[Buff Command]: Voce foi buffado!");
+        }        
+    }
+    
+    public static boolean check(L2PcInstance p)
+    {        
+        return p.isInsideZone(ZoneId.PEACE) && !p.isInCombat() && !p.isInOlympiadMode(); //restrições
+    }
+    
+    public static void showHtml(L2PcInstance player)
+    {      
+        NpcHtmlMessage html = new NpcHtmlMessage(0);    
+        html.setFile("data/html/mods/buffCommand.htm");
+        html.replace("%currentBuffs%", player.getBuffCount());
+        html.replace("%getMaxBuffs%", player.getMaxBuffCount());
+        player.sendPacket(html);
+    }
+    
+    @Override
+    public String[] getVoicedCommandList()
+    {
+        return _voicedCommands;
+    }
+}

\ No newline at end of file

Index: java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java    (revision 0)
+++ java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java    (working copy)
@@ -0,0 +1,94 @@

import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Online;
+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.BuffCommand;

    protected VoicedCommandHandler()
    {
        registerHandler(new Online());
+       registerHandler(new BuffCommand());

Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java    (revision 1)
+++ java/net/sf/l2j/Config.java    (working copy)
@@ -484,6 +484,11 @@

     public static boolean STORE_SKILL_COOLTIME;
     public static int BUFFS_MAX_AMOUNT;
  
+    /** Voiced buff command */
+    public static String LIST_BUFF_COMMAND;
+    public static int[] BUFF_COMMAND_FIGHT_IDBUFFS;
+    public static int[] BUFF_COMMAND_MAGE_IDBUFFS;
+    

            STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true);                                                            
+                
+            LIST_BUFF_COMMAND = players.getProperty("buffCommandFightBuffsID", "123,456");
+        
+            String[] buffCommand = LIST_BUFF_COMMAND.split(",");            
+            BUFF_COMMAND_FIGHT_IDBUFFS = new int[buffCommand.length];        
+            for (int i = 0; i < buffCommand.length; i++)
+                BUFF_COMMAND_FIGHT_IDBUFFS[i] = Integer.parseInt(buffCommand[i]);
+            
+            LIST_BUFF_COMMAND = players.getProperty("buffCommandMageBuffsID", "789,1011112");
+            
+            buffCommand = LIST_BUFF_COMMAND.split(",");            
+            BUFF_COMMAND_MAGE_IDBUFFS = new int[buffCommand.length];            
+            for (int i = 0; i < buffCommand.length; i++)
+                BUFF_COMMAND_MAGE_IDBUFFS[i] = Integer.parseInt(buffCommand[i]);

Index: config/players.properties
===================================================================
--- config/players.properties    (revision 1)
+++ config/players.properties    (working copy)
@@ -288,4 +288,14 @@

StoreSkillCooltime = True
+
+#=============================================================
+#                    Voiced .buff Command  by Bluur
+#=============================================================
+
+# List of ID buffs - FIGHT -
+buffCommandFightBuffsID = 1204,1040,1035,1045,1062,1048,1036,1303,1085,1059,1078,264,267,268,304,349,273,276,365,1363
+
+# List of ID buffs - MAGE -
+buffCommandMageBuffsID = 1204,1068,1040,1035,1036,1045,1086,1077,1240,1242,264,267,268,269,304,364,271,274,275,1363

DATA :

<html><title>buff Command</title><body><center>

<br>
Slots de Buffs: <font color=LEVEL>%currentBuffs%</font> / %getMaxBuffs%
<br>
<table width=280>
<tr>
<td align=center><a action="bypass -h buffCommand 1040">Shield</a></td>
<td align=center><a action="bypass -h buffCommand 1062">Berserker</a></td>
<td align=center><a action="bypass -h buffCommand 271">Warrior</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1068">Might</a></td>
<td align=center><a action="bypass -h buffCommand 269">Hunter</a></td>
<td align=center><a action="bypass -h buffCommand 272">Inspiration</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1035">Mental Shield</a></td>

<td align=center><a action="bypass -h buffCommand 304">Vitality</a></td>
<td align=center><a action="bypass -h buffCommand 1355">P Of Water</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1077">Focus</a></td>
<td align=center><a action="bypass -h buffCommand 268">Wind</a></td>
<td align=center><a action="bypass -h buffCommand 1356">P Of Fire</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1078">Concentration</a></td>
<td align=center><a action="bypass -h buffCommand 265">Life</a></td>
<td align=center><a action="bypass -h buffCommand 1357">P Of Wind</a></td>
</tr>

<tr>
<td align=center><a action="bypass -h buffCommand 1085">Acumen</a></td>
<td align=center><a action="bypass -h buffCommand 363">Meditation</a></td>
<td align=center><a action="bypass -h buffCommand 1363">C Of Victory</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1036">Magic Barrier</a></td>
<td align=center><a action="bypass -h buffCommand 267">Warding</a></td>
<td align=center><a action="bypass -h buffCommand 1413">C Of Magnus'</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1045">Blessed Body</a></td>
<td align=center><a action="bypass -h buffCommand 270">Invocation</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1048">Blessed Soul</a></td>
<td align=center><a action="bypass -h buffCommand 266">Water</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1086">Haste</a></td>
<td align=center><a action="bypass -h buffCommand 264">Earth</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1204">Wind Walk</a></td>
<td align=center><a action="bypass -h buffCommand 277">Light</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1240">Guidance</a></td>
<td align=center><a action="bypass -h buffCommand 275">Fury</a></td>
<td align=center><a action="bypass -h cancelBuffs"><font color=LEVEL>Cancel Buffs</font></a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1303">Wild Magic</a></td>
<td align=center><a action="bypass -h buffCommand 274">Fire</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1059">Empower</a></td>
<td align=center><a action="bypass -h buffCommand 273">Mystic</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1087">Agility</a></td>
<td align=center><a action="bypass -h buffCommand 276">D Concentration</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1268">Vampiric Rage</a></td>
<td align=center><a action="bypass -h buffCommand 365">Siren's</a></td>
</tr>
<tr>
<tr><td align=center><a action="bypass -h buffCommand 1242">Dead Whisper</a></td>
</tr>
</table>    

<br>
<center>
<table width=260>
<tr>
<td align=center><img src=icon.skill0214 width=32 height=32></td>
<td align=center><img src=icon.skill0430 width=32 height=32></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommandMage"><font color=3399CC>Mage Buff</a></td>
<td align=center><a action="bypass -h buffCommandFight">Fight Buff</font></a></td>
</tr>
</table>
</center>
</body></html>
Edited by valentin
  • 2 months later...
  • 4 weeks later...
Posted (edited)

2015-2016 still people share .help voice commands.

 

*walks away*

 

Ps. valentin is that you in your photo profil? If yes you're ugly <3

Edited by AccessDenied
Posted

 

CORE :

Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java    (revision 1)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java    (working copy)
@@ -20,18 +20,29 @@

 import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.BuffCommand;
+import net.sf.l2j.gameserver.datatables.SkillTable;

@@ -89,10 +100,218 @@
               
             else if (_command.startsWith("player_help "))
             {
                 playerHelp(activeChar, _command.substring(12));
             }
+            // start voiced .buff command
+            else if (_command.startsWith("buffCommandFight"))
+            {
+                BuffCommand.getFullBuff(activeChar, false);
+            }            
+            else if (_command.startsWith("buffCommandMage"))
+            {
+                BuffCommand.getFullBuff(activeChar, true);
+            }
+            else if (_command.startsWith("buffCommand") && BuffCommand.check(activeChar))
+            {
+                String idBuff = _command.substring(12);
+                int parseIdBuff = Integer.parseInt(idBuff);
+                SkillTable.getInstance().getInfo(parseIdBuff, SkillTable.getInstance().getMaxLevel(parseIdBuff)).getEffects(activeChar, activeChar);
+                BuffCommand.showHtml(activeChar);
+            }
+            else if (_command.startsWith("cancelBuffs") && BuffCommand.check(activeChar))
+            {
+                activeChar.stopAllEffectsExceptThoseThatLastThroughDeath();
+                BuffCommand.showHtml(activeChar);
+            }
+            // end voiced .buff command

Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/BuffCommand.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/BuffCommand.java    (revision 0)
+++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/BuffCommand.java    (working copy)
@@ -0,0 +1,59 @@
+package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.datatables.SkillTable;
+import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
+import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ *
+ * @author Bluur
+ *
+ */
+public class BuffCommand implements IVoicedCommandHandler
+{
+    private final String[] _voicedCommands =
+    {
+        "buff"
+    };
+    
+    @Override
+    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+    {    
+        if (check(activeChar)) //retorna                
+            showHtml(activeChar);    
+        
+        return true;
+    }
+    
+    public static void getFullBuff(L2PcInstance p, boolean isClassMage)
+    {
+        if (check(p))
+        {
+            if (isClassMage)
+            {
+                for (int b : Config.BUFF_COMMAND_MAGE_IDBUFFS)    
+                     SkillTable.getInstance().getInfo(b, SkillTable.getInstance().getMaxLevel(b)).getEffects(p, p);        
+            }
+            else
+            {
+                for (int b : Config.BUFF_COMMAND_FIGHT_IDBUFFS)    
+                     SkillTable.getInstance().getInfo(b, SkillTable.getInstance().getMaxLevel(b)).getEffects(p, p);        
+            }
+            p.sendMessage("[Buff Command]: Voce foi buffado!");
+        }        
+    }
+    
+    public static boolean check(L2PcInstance p)
+    {        
+        return p.isInsideZone(ZoneId.PEACE) && !p.isInCombat() && !p.isInOlympiadMode(); //restrições
+    }
+    
+    public static void showHtml(L2PcInstance player)
+    {      
+        NpcHtmlMessage html = new NpcHtmlMessage(0);    
+        html.setFile("data/html/mods/buffCommand.htm");
+        html.replace("%currentBuffs%", player.getBuffCount());
+        html.replace("%getMaxBuffs%", player.getMaxBuffCount());
+        player.sendPacket(html);
+    }
+    
+    @Override
+    public String[] getVoicedCommandList()
+    {
+        return _voicedCommands;
+    }
+}

\ No newline at end of file

Index: java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java    (revision 0)
+++ java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java    (working copy)
@@ -0,0 +1,94 @@

import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Online;
+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.BuffCommand;

    protected VoicedCommandHandler()
    {
        registerHandler(new Online());
+       registerHandler(new BuffCommand());

Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java    (revision 1)
+++ java/net/sf/l2j/Config.java    (working copy)
@@ -484,6 +484,11 @@

     public static boolean STORE_SKILL_COOLTIME;
     public static int BUFFS_MAX_AMOUNT;
  
+    /** Voiced buff command */
+    public static String LIST_BUFF_COMMAND;
+    public static int[] BUFF_COMMAND_FIGHT_IDBUFFS;
+    public static int[] BUFF_COMMAND_MAGE_IDBUFFS;
+    

            STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true);                                                            
+                
+            LIST_BUFF_COMMAND = players.getProperty("buffCommandFightBuffsID", "123,456");
+        
+            String[] buffCommand = LIST_BUFF_COMMAND.split(",");            
+            BUFF_COMMAND_FIGHT_IDBUFFS = new int[buffCommand.length];        
+            for (int i = 0; i < buffCommand.length; i++)
+                BUFF_COMMAND_FIGHT_IDBUFFS[i] = Integer.parseInt(buffCommand[i]);
+            
+            LIST_BUFF_COMMAND = players.getProperty("buffCommandMageBuffsID", "789,1011112");
+            
+            buffCommand = LIST_BUFF_COMMAND.split(",");            
+            BUFF_COMMAND_MAGE_IDBUFFS = new int[buffCommand.length];            
+            for (int i = 0; i < buffCommand.length; i++)
+                BUFF_COMMAND_MAGE_IDBUFFS[i] = Integer.parseInt(buffCommand[i]);

Index: config/players.properties
===================================================================
--- config/players.properties    (revision 1)
+++ config/players.properties    (working copy)
@@ -288,4 +288,14 @@

StoreSkillCooltime = True
+
+#=============================================================
+#                    Voiced .buff Command  by Bluur
+#=============================================================
+
+# List of ID buffs - FIGHT -
+buffCommandFightBuffsID = 1204,1040,1035,1045,1062,1048,1036,1303,1085,1059,1078,264,267,268,304,349,273,276,365,1363
+
+# List of ID buffs - MAGE -
+buffCommandMageBuffsID = 1204,1068,1040,1035,1036,1045,1086,1077,1240,1242,264,267,268,269,304,364,271,274,275,1363

DATA :

<html><title>buff Command</title><body><center>

<br>
Slots de Buffs: <font color=LEVEL>%currentBuffs%</font> / %getMaxBuffs%
<br>
<table width=280>
<tr>
<td align=center><a action="bypass -h buffCommand 1040">Shield</a></td>
<td align=center><a action="bypass -h buffCommand 1062">Berserker</a></td>
<td align=center><a action="bypass -h buffCommand 271">Warrior</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1068">Might</a></td>
<td align=center><a action="bypass -h buffCommand 269">Hunter</a></td>
<td align=center><a action="bypass -h buffCommand 272">Inspiration</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1035">Mental Shield</a></td>

<td align=center><a action="bypass -h buffCommand 304">Vitality</a></td>
<td align=center><a action="bypass -h buffCommand 1355">P Of Water</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1077">Focus</a></td>
<td align=center><a action="bypass -h buffCommand 268">Wind</a></td>
<td align=center><a action="bypass -h buffCommand 1356">P Of Fire</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1078">Concentration</a></td>
<td align=center><a action="bypass -h buffCommand 265">Life</a></td>
<td align=center><a action="bypass -h buffCommand 1357">P Of Wind</a></td>
</tr>

<tr>
<td align=center><a action="bypass -h buffCommand 1085">Acumen</a></td>
<td align=center><a action="bypass -h buffCommand 363">Meditation</a></td>
<td align=center><a action="bypass -h buffCommand 1363">C Of Victory</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1036">Magic Barrier</a></td>
<td align=center><a action="bypass -h buffCommand 267">Warding</a></td>
<td align=center><a action="bypass -h buffCommand 1413">C Of Magnus'</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1045">Blessed Body</a></td>
<td align=center><a action="bypass -h buffCommand 270">Invocation</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1048">Blessed Soul</a></td>
<td align=center><a action="bypass -h buffCommand 266">Water</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1086">Haste</a></td>
<td align=center><a action="bypass -h buffCommand 264">Earth</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1204">Wind Walk</a></td>
<td align=center><a action="bypass -h buffCommand 277">Light</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1240">Guidance</a></td>
<td align=center><a action="bypass -h buffCommand 275">Fury</a></td>
<td align=center><a action="bypass -h cancelBuffs"><font color=LEVEL>Cancel Buffs</font></a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1303">Wild Magic</a></td>
<td align=center><a action="bypass -h buffCommand 274">Fire</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1059">Empower</a></td>
<td align=center><a action="bypass -h buffCommand 273">Mystic</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1087">Agility</a></td>
<td align=center><a action="bypass -h buffCommand 276">D Concentration</a></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommand 1268">Vampiric Rage</a></td>
<td align=center><a action="bypass -h buffCommand 365">Siren's</a></td>
</tr>
<tr>
<tr><td align=center><a action="bypass -h buffCommand 1242">Dead Whisper</a></td>
</tr>
</table>    

<br>
<center>
<table width=260>
<tr>
<td align=center><img src=icon.skill0214 width=32 height=32></td>
<td align=center><img src=icon.skill0430 width=32 height=32></td>
</tr>
<tr>
<td align=center><a action="bypass -h buffCommandMage"><font color=3399CC>Mage Buff</a></td>
<td align=center><a action="bypass -h buffCommandFight">Fight Buff</font></a></td>
</tr>
</table>
</center>

would have to adapt to acis 350?

  • 4 weeks later...
Posted (edited)

Ty for your share ..

Olympiad or TvT restrictions? Or you can .buff anywhere?

 

_EDITED: Found it.

return p.isInsideZone(ZoneId.PEACE) && !p.isInCombat() && !p.isInOlympiadMode();
Edited by Irelia#1
  • 3 weeks later...

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.



×
×
  • Create New...