Jump to content

Recommended Posts

Posted

.makeaa / .aa
These commands convert all your seal stones ( green, red, blue ) in Ancient Adena. Nothing special at all, but it might be useful for someone.
Tested and working in L2J High Five Chronicle.


 

Spoiler

diff --git a/Data Side/game/data/scripts/handlers/MasterHandler.java b/Data Side/game/data/scripts/handlers/MasterHandler.java
--- 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.MakeAncientAdena;
 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),
+            MakeAncientAdena.class,
         },
         {
diff --git a/Data Side/game/data/scripts/handlers/voicedcommandhandlers/MakeAncientAdena.java b/Data Side/game/data/scripts/handlers/voicedcommandhandlers/MakeAncientAdena.java
new file mode 100644
+++ b/Data Side/game/data/scripts/handlers/voicedcommandhandlers/MakeAncientAdena.java    
@@ -0,0 +1,86 @@
+/*
+ * 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.items.instance.L2ItemInstance;
+
+/**
+ * Voiced command to exchange all Seal Stones to Ancient Adena.<br>
+ * Created for Share Competition 2018.
+ * @author Benman from MaxCheaters.com
+ */
+public class MakeAncientAdena implements IVoicedCommandHandler
+{
+    private static final int ANCIENT_ADENA = 5575;
+    private static final int BLUE_SEAL_STONE = 6360;
+    private static final int GREEN_SEAL_STONE = 6361;
+    private static final int RED_SEAL_STONE = 6362;
+    private static final String[] commands =
+    {
+        "aa",
+        "makeaa",
+    };
+    
+    @Override
+    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
+    {
+        if (command.equalsIgnoreCase("aa") || command.equalsIgnoreCase("makeaa"))
+        {
+            L2ItemInstance redStones = activeChar.getInventory().getItemByItemId(RED_SEAL_STONE);
+            L2ItemInstance greenStones = activeChar.getInventory().getItemByItemId(GREEN_SEAL_STONE);
+            L2ItemInstance blueStones = activeChar.getInventory().getItemByItemId(BLUE_SEAL_STONE);
+            int count = 0;
+            int aa = 0;
+            if (redStones != null && activeChar.destroyItem("MakeAA", redStones, null, true))
+            {
+                count += redStones.getCount();
+                aa += redStones.getCount() * 10;
+            }
+            if (greenStones != null && activeChar.destroyItem("MakeAA", greenStones, null, true))
+            {
+                count += greenStones.getCount();
+                aa += greenStones.getCount() * 5;
+            }
+            if (blueStones != null && activeChar.destroyItem("MakeAA", blueStones, null, true))
+            {
+                count += blueStones.getCount();
+                aa += blueStones.getCount() * 3;
+            }
+            if (count == 0)
+            {
+                activeChar.sendMessage("You do not have any seal stones to exchange.");
+                return false;
+            }
+            activeChar.addItem("MakeAA", ANCIENT_ADENA, aa, activeChar, true);
+            activeChar.sendMessage("You have successfully exchanged " + count + " seal stones!");
+        }
+        return true;
+    }
+    
+    @Override
+    public String[] getVoicedCommandList()
+    {
+        return commands;
+    }
+}


 

  • Thanks 2
Posted

It can be exploited, you MUST first destroy the item and only if that succeeds you can continue with the new item generation.

 

do this:
 

+            if (redStones != null && activeChar.destroyItem("MakeAA", redStones, null, true))
+            {
+                count += redStones.getCount();
+                aa += redStones.getCount() * 10;
+            }

 

  • Thanks 1
Posted
1 hour ago, xxdem said:

It can be exploited, you MUST first destroy the item and only if that succeeds you can continue with the new item generation.

 

do this:
 


+            if (redStones != null && activeChar.destroyItem("MakeAA", redStones, null, true))
+            {
+                count += redStones.getCount();
+                aa += redStones.getCount() * 10;
+            }

 

Ok thank you. Its better with that way.

Posted
6 hours ago, Solomun said:

Simple and nice  :) Thanks for share.

Yes small and useful as i told.

 

 

6 hours ago, melron said:

far better than the classic multisell for exchanges good job.

Its something different. Thanks melron :)

  • 1 month later...
Posted

 

2 hours ago, motrizer said:

dont give me AA D;

 

 

Maybe your destroyItem returns false, but destroys the item. Try to compare l2jserver destoryItem with the one is in your pack.

Posted (edited)

Edit: in aCis  destroyItem method changes the count of the iteminstance.

 

 

try to use this code and let me know if its working

public class MakeAncientAdena implements IVoicedCommandHandler
{
	
	private static final String[] _voicedCommands =
	{
		"aa",
		"makeaa"
	};
	private static final int ANCIENT_ADENA = 5575;
	private static final int BLUE_SEAL_STONE = 6360;
	private static final int GREEN_SEAL_STONE = 6361;
	private static final int RED_SEAL_STONE = 6362;
	
	@Override
	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
	{
		if (command.equalsIgnoreCase("aa") || command.equalsIgnoreCase("makeaa"))
		{
			final L2ItemInstance redStones = activeChar.getInventory().getItemByItemId(RED_SEAL_STONE);
			final L2ItemInstance greenStones = activeChar.getInventory().getItemByItemId(GREEN_SEAL_STONE);
			final L2ItemInstance blueStones = activeChar.getInventory().getItemByItemId(BLUE_SEAL_STONE);
			
			int redStonesCount = 0;
			int blueStonesCount = 0;
			int greenStonesCount = 0;
			
			int count = 0;
			int aa = 0;
			
			if (redStones != null)
			{
				redStonesCount += redStones.getCount();
				if (activeChar.destroyItem("MakeAA", redStones, null, true))
				{
					count += redStonesCount;
					aa += redStonesCount * 10;
				}
			}
			if (greenStones != null)
			{
				greenStonesCount += greenStones.getCount();
				if (activeChar.destroyItem("MakeAA", greenStones, null, true))
				{
					count += greenStonesCount;
					aa += greenStonesCount * 5;
				}
			}
			if (blueStones != null)
			{
				blueStonesCount += blueStones.getCount();
				if (activeChar.destroyItem("MakeAA", blueStones, null, true))
				{
					count += blueStonesCount;
					aa += blueStonesCount * 3;
				}
			}
			if (count == 0)
			{
				activeChar.sendMessage("You do not have any seal stones to exchange.");
				return false;
			}
			activeChar.addItem("MakeAA", ANCIENT_ADENA, aa, activeChar, true);
			activeChar.sendMessage("You have successfully exchanged " + count + " seal stones!");
		}
		return true;
	}
	
	@Override
	public String[] getVoicedCommandList()
	{
		return _voicedCommands;
	}
}

 

Edited by melron
Posted
2 minutes ago, melron said:

if you are using aCis Its because destroyItem method changes the count of the iteminstance.

 

try to use this code and let me know if its working

 

 

How does he use aCis since his screenshot is from high five client re? :P

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.



  • Posts

    • hello everyone! I am wanting to save the files (Ini. - Data - ) of the EP5 Client: Salvation... But they generate the error "corrupt files"... I tried several versions of L2FileEditor without good results. I need help! Thank you!
    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
    • small update: dc robe set sold   wts adena 1kk = 1.5$ 
    • 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
  • Topics

×
×
  • Create New...