Jump to content

Recommended Posts

Posted

.7rb
This command shows you up which Raid Bosses you have killed in Dragon Valley Area and which you haven't. The quest is called ''Legendary Tales'' .It looks like the pictures below.
Tested and Working L2j High Five Chronicle!


fog94i.jpg

2eatlzp.jpg

 

Spoiler

 

diff --git a/Data Side/game/data/scripts/handlers/MasterHandler.java b/Data Side/game/data/scripts/handlers/MasterHandler.java
index e6dde0ef..dc81df32 100644
--- a/Data Side/game/data/scripts/handlers/MasterHandler.java    
+++ b/Data Side/game/data/scripts/handlers/MasterHandler.java    
@@ -284,6 +284,7 @@ import handlers.voicedcommandhandlers.Debug;
 import handlers.voicedcommandhandlers.Lang;
 import handlers.voicedcommandhandlers.StatsVCmd;
 import handlers.voicedcommandhandlers.CombineTalismans;
+import handlers.voicedcommandhandlers.SevenRB;
 import handlers.voicedcommandhandlers.MultiLang;
 import handlers.voicedcommandhandlers.Wedding;
 
@@ -548,6 +549,7 @@ public class MasterHandler
             (Config.L2JMOD_DEBUG_VOICE_COMMAND ? Debug.class : null),
             (Config.L2JMOD_ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null),
+            SevenRB.class,
         },
         {
diff --git a/Data Side/game/data/scripts/handlers/voicedcommandhandlers/SevenRB.java b/Data Side/game/data/scripts/handlers/voicedcommandhandlers/SevenRB.java
--- /dev/null
+++ b/Data Side/game/data/scripts/handlers/voicedcommandhandlers/SevenRB.java    
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2004-2016 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack 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.
+ *
+ * L2J DataPack 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.gameserver.handler.IVoicedCommandHandler;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * Voiced command to show the player which raids have been killed<br>
+ * during Legendary Tales quest (7rb).<br>
+ * <br>
+ * Created for Share Competition 2018.
+ * @author Benman from MaxCheaters.com
+ */
+public class SevenRB implements IVoicedCommandHandler
+{
+    private static final String QUEST_NAME = "Q00254_LegendaryTales";
+    private static final String SERVER_NAME = "(Server Name)";
+    private static final String[] commands =
+    {
+        "7rb",
+    };
+    
+    @Override
+    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
+    {
+        if (command.equalsIgnoreCase("7rb"))
+        {
+            QuestState st = activeChar.getQuestState(QUEST_NAME);
+            NpcHtmlMessage m = new NpcHtmlMessage();
+            m.setHtml(buildHtml(st));
+            activeChar.sendPacket(m);
+        }
+        return true;
+    }
+    
+    private static final String buildHtml(QuestState st)
+    {
+        StringBuilder sb = new StringBuilder();
+        sb.append("<html><head>");
+        sb.append("<title>Lineage II " + SERVER_NAME + "</title>");
+        sb.append("</head>");
+        sb.append("<body><br>");
+        sb.append("<br>7 Rb Quest (Legendary Tales) status:<br>");
+        if (st == null)
+        {
+            sb.append("Quest is not started yet. Please visit Glimore in dragon valley in order to start it.");
+            sb.append("<br>");
+        }
+        else
+        {
+            if (st.isCond(1))
+            {
+                for (Bosses boss : Bosses.class.getEnumConstants())
+                {
+                    sb.append(boss.getName() + ": ");
+                    sb.append(checkMask(st, boss) ? "<font color=\"00FF00\">Killed.</font>" : "<font color=\"FF0000\">Not killed.</font>");
+                    sb.append("<br>");
+                }
+            }
+            else
+            {
+                sb.append("Legendary Tales quest is completed.");
+                sb.append("<br>");
+            }
+        }
+        sb.append("</body></html>");
+        return sb.toString();
+    }
+    
+    private static boolean checkMask(QuestState qs, Bosses boss)
+    {
+        int pos = boss.getMask();
+        return ((qs.getInt("raids") & pos) == pos);
+    }
+    
+    @Override
+    public String[] getVoicedCommandList()
+    {
+        return commands;
+    }
+    
+    public static enum Bosses
+    {
+        EMERALD_HORN("Emerald Horn"),
+        DUST_RIDER("Dust Rider"),
+        BLEEDING_FLY("Bleeding Fly"),
+        BLACK_DAGGER("Blackdagger Wing"),
+        SHADOW_SUMMONER("Shadow Summoner"),
+        SPIKE_SLASHER("Spike Slasher"),
+        MUSCLE_BOMBER("Muscle Bomber");
+        
+        private final String name;
+        private final int _mask;
+        
+        private Bosses(String name)
+        {
+            this.name = name;
+            _mask = 1 << ordinal();
+        }
+        
+        public int getMask()
+        {
+            return _mask;
+        }
+        
+        public String getName()
+        {
+            return name;
+        }
+    }
+}

 

 

 

  • Thanks 1
Posted
5 hours ago, Rengo said:

nice share mate

 

1 hour ago, Solomun said:

Nice idea aswell benman. Thanks for sharing these...

Thank you too both!

  • 2 years later...
Posted
package handlers.voicedcommandhandlers;

import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;

public class SevenRB implements IVoicedCommandHandler
{
	private static final String QUEST_NAME = "Q00254_LegendaryTales";
	  private static final String SERVER_NAME = "(NAME)";
	  private static final String[] commands =
		  {
				  "7rb",
		  };
	  
	  @Override
	  public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
	  {
		  if (command.equalsIgnoreCase("7rb"))
		  {
			  QuestState st = activeChar.getQuestState(QUEST_NAME);
			  NpcHtmlMessage m = new NpcHtmlMessage();
			  m.setHtml(buildHtml(st));
			  activeChar.sendPacket(m);
		  }
		  return true;
	  }
	  
	  private static final String buildHtml(QuestState st)
	  { 
		  StringBuilder sb = new StringBuilder();
		  sb.append("<html><head>");
		  sb.append("<title>" + SERVER_NAME + "</title>");
		  sb.append("</head>");
		  sb.append("<body><br>");
		  sb.append("<br>7Rb Quest (Legendary Tales) status:<br>");
		  if (st == null)
		  {
			  sb.append("Quest is not started yet. Please visit Glimore in dragon valley in order to start it.");
			  sb.append("<br>");
		  }
		  else
		  {
			  if (st.isCond(1))
			  {
				  for (Bosses boss : Bosses.class.getEnumConstants())
				  {
					  sb.append(boss.getName() + ": ");
					  sb.append(checkMask(st, boss) ? "<font color=\"00FF00\">Killed.</font>" : "<font color=\"FF0000\">Not killed.</font>");
					  sb.append("<br>");
				  }
			  }
			  else
			  {
				  sb.append("Legendary Tales quest is completed.");
				  sb.append("<br>");
			  }
		  }
		  sb.append("</body></html>");
		  return sb.toString();
	  }
	  
	  private static boolean checkMask(QuestState qs, Bosses boss)
	  {
		  int pos = boss.getMask();
		  return ((qs.getInt("raids") & pos) == pos);
	  }
	  @Override
	  public String[] getVoicedCommandList()
	  {
		  return commands;
	  }
	  
	  public static enum Bosses
	  {
		  EMERALD_HORN("Emerald Horn"),
		  DUST_RIDER("Dust Rider"),
		  BLEEDING_FLY("Bleeding Fly"),
		  BLACK_DAGGER("Blackdagger Wing"),
		  SHADOW_SUMMONER("Shadow Summoner"),
		  SPIKE_SLASHER("Spike Slasher"),
		  MUSCLE_BOMBER("Muscle Bomber");
		  
		  private final String name;
		  private final int _mask;
		  
		  private Bosses(String name)
		  {
			  this.name = name;
			  _mask = 1 << ordinal();
		  }
		  
		  public int getMask()
		  {
			  return _mask;
		  }
		  
		  public String getName()
		  {
			  return name;
		  }
	  }
}

Sorry but i needed to make it look right xD

  • Haha 1
  • 10 months later...
  • 4 months later...
Posted
On 11/7/2021 at 12:20 AM, barao45 said:

Do you know if its required another think to implements this voice comander?. im using L2jSunrise.

When i enter .7rb its nothing happen.

package handlers.voicedcommandhandlers;

import l2r.gameserver.handler.IVoicedCommandHandler;
import l2r.gameserver.model.actor.instance.L2PcInstance;
import l2r.gameserver.model.quest.QuestState;
import l2r.gameserver.network.serverpackets.NpcHtmlMessage;

/**
 * @author -Invoke
 */

public class CommandRaid implements IVoicedCommandHandler
{
    private static final String QUEST_NAME = "Q00254_LegendaryTales";
    private static final String SERVER_NAME = "7RB Quest";
    private static final String[] COMMANDS =
    {
        "7rb",
    };
    
    @Override
    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
    {
        if (command.equalsIgnoreCase("7rb"))
        {
            QuestState state = activeChar.getQuestState(QUEST_NAME);
            NpcHtmlMessage html = new NpcHtmlMessage();
            html.setHtml(buildHtml(state));
            activeChar.sendPacket(html);
        }
        return true;
    }
    
    private static final String buildHtml(QuestState st)
    {
        StringBuilder sb = new StringBuilder();
        sb.append("<html noscrollbar><head>");
        sb.append("<title>" + SERVER_NAME + "</title>");
        sb.append("</head>");
        sb.append("<body><br>");
        sb.append("<br>7 Rb Quest (Legendary Tales) status:<br>");
        if (st == null)
        {
            sb.append("Quest not found. Please visit Glimore in Dragon Valley in order to begin the quest.");
            sb.append("<br>");
        }
        else
        {
            if (st.isCond(1))
            {
                for (Bosses boss : Bosses.class.getEnumConstants())
                {
                    sb.append(boss.getName() + ": ");
                    sb.append(checkMask(st, boss) ? "<font color=\"00FF00\">Killed.</font>" : "<font color=\"FF0000\">Not killed.</font>");
                    sb.append("<br>");
                }
            }
            else
            {
                sb.append("Legendary Tales quest is completed.");
                sb.append("<br>");
            }
        }
        sb.append("</body></html>
On 11/7/2021 at 12:20 AM, barao45 said:

Do you know if its required another think to implements this voice comander?. im using L2jSunrise.

When i enter .7rb its nothing happen.

Make here "L2J_SunriseProject_Data\dist\game\data\scripts\handlers\voicedcommandhandlers\CommandRaid.java"
Paste the code above

Add it here "L2J_SunriseProject_Data\dist\game\data\scripts\handlers\MasterHandler.java"

"import handlers.voicedcommandhandlers.CommandRaid;"

and compile.

It should work from all chars using the .7rb command

12.02.2021-22.42.58

 

  • 9 months later...
Posted
On 1/1/2021 at 6:52 AM, JackCerutti said:
package handlers.voicedcommandhandlers;

import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;

public class SevenRB implements IVoicedCommandHandler
{
	private static final String QUEST_NAME = "Q00254_LegendaryTales";
	  private static final String SERVER_NAME = "(NAME)";
	  private static final String[] commands =
		  {
				  "7rb",
		  };
	  
	  @Override
	  public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
	  {
		  if (command.equalsIgnoreCase("7rb"))
		  {
			  QuestState st = activeChar.getQuestState(QUEST_NAME);
			  NpcHtmlMessage m = new NpcHtmlMessage();
			  m.setHtml(buildHtml(st));
			  activeChar.sendPacket(m);
		  }
		  return true;
	  }
	  
	  private static final String buildHtml(QuestState st)
	  { 
		  StringBuilder sb = new StringBuilder();
		  sb.append("<html><head>");
		  sb.append("<title>" + SERVER_NAME + "</title>");
		  sb.append("</head>");
		  sb.append("<body><br>");
		  sb.append("<br>7Rb Quest (Legendary Tales) status:<br>");
		  if (st == null)
		  {
			  sb.append("Quest is not started yet. Please visit Glimore in dragon valley in order to start it.");
			  sb.append("<br>");
		  }
		  else
		  {
			  if (st.isCond(1))
			  {
				  for (Bosses boss : Bosses.class.getEnumConstants())
				  {
					  sb.append(boss.getName() + ": ");
					  sb.append(checkMask(st, boss) ? "<font color=\"00FF00\">Killed.</font>" : "<font color=\"FF0000\">Not killed.</font>");
					  sb.append("<br>");
				  }
			  }
			  else
			  {
				  sb.append("Legendary Tales quest is completed.");
				  sb.append("<br>");
			  }
		  }
		  sb.append("</body></html>");
		  return sb.toString();
	  }
	  
	  private static boolean checkMask(QuestState qs, Bosses boss)
	  {
		  int pos = boss.getMask();
		  return ((qs.getInt("raids") & pos) == pos);
	  }
	  @Override
	  public String[] getVoicedCommandList()
	  {
		  return commands;
	  }
	  
	  public static enum Bosses
	  {
		  EMERALD_HORN("Emerald Horn"),
		  DUST_RIDER("Dust Rider"),
		  BLEEDING_FLY("Bleeding Fly"),
		  BLACK_DAGGER("Blackdagger Wing"),
		  SHADOW_SUMMONER("Shadow Summoner"),
		  SPIKE_SLASHER("Spike Slasher"),
		  MUSCLE_BOMBER("Muscle Bomber");
		  
		  private final String name;
		  private final int _mask;
		  
		  private Bosses(String name)
		  {
			  this.name = name;
			  _mask = 1 << ordinal();
		  }
		  
		  public int getMask()
		  {
			  return _mask;
		  }
		  
		  public String getName()
		  {
			  return name;
		  }
	  }
}

Sorry but i needed to make it look right xD

I can't use these commands for Fandc pack. do you have? or share please.

  • 1 month later...
Posted

Hello. Please guys, if you could help.  I am trying to implement .7rb command for sunrise but i get this error :

WARNING in C:\L2 Server\game\data\scripts\handlers\MasterHandler.java (at line 313)
        import handlers.voicedcommandhandlers.CommandRaid;
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import handlers.voicedcommandhandlers.CommandRaid is never used
WARNING in C:\L2 Server\game\data\scripts\handlers\voicedcommandhandlers\CommandRaid.java (at line 16)
        private static final String[] COMMANDS =
                                      ^^^^^^^^
The value of the field CommandRaid.COMMANDS is not used
----------
ERROR in C:\L2 Server\game\data\scripts\handlers\voicedcommandhandlers\CommandRaid.java (at line 76)
        return commands;
               ^^^^^^^^
commands cannot be resolved to a variable

 

I got the first code with the 2nd code fix, for Sunrise.

Thank you

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • NFT gifts on Telegram are already here! Buy Stars at SOCNET — the black background can be yours today! Purchase existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium, and react to messages in channels! Low prices, many payment methods, and other cool and unique features! Try it today — SOCNET STARS BOT Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and beneficial purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." — you need to post it in our forum thread! 3. Get $1 for your first SMM Panel trial: just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • NFT gifts on Telegram are already here! Buy Stars at SOCNET — the black background can be yours today! Purchase existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium, and react to messages in channels! Low prices, many payment methods, and other cool and unique features! Try it today — SOCNET STARS BOT Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and beneficial purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." — you need to post it in our forum thread! 3. Get $1 for your first SMM Panel trial: just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • NFT gifts on Telegram are already here! Buy Stars at SOCNET — the black background can be yours today! Purchase existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium, and react to messages in channels! Low prices, many payment methods, and other cool and unique features! Try it today — SOCNET STARS BOT Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and beneficial purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." — you need to post it in our forum thread! 3. Get $1 for your first SMM Panel trial: just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Wts adena 1kk = 10$  discord - GODDARDSHOP 
    • Thanks for the feedback! We’ve actually rented their infrastructure to ensure a high-quality gaming experience (We couldn't find any better files out there). Developer @FixerRay will also be there to assist us 🙂
  • 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