Jump to content

Recommended Posts

Posted

i made this nearly 5months ago so its pretty outdated sry for this :D

 

Index: trunk/L2Emu-Game/src/main/java/com/l2emu/gameserver/model/actor/instance/L2NpcBufferInstance.java
===================================================================
diff -u -N -r1311 -r1320
--- trunk/L2Emu-Game/src/main/java/com/l2emu/gameserver/model/actor/instance/L2NpcBufferInstance.java	(.../L2NpcBufferInstance.java)	(revision 1311)
+++ trunk/L2Emu-Game/src/main/java/com/l2emu/gameserver/model/actor/instance/L2NpcBufferInstance.java	(.../L2NpcBufferInstance.java)	(revision 1320)
@@ -22,6 +22,7 @@
import com.l2emu.gameserver.model.L2ItemInstance;
import com.l2emu.gameserver.model.L2Skill;
import com.l2emu.gameserver.model.actor.L2Npc;
+import com.l2emu.gameserver.model.actor.L2Summon;
import com.l2emu.gameserver.network.SystemMessageId;
import com.l2emu.gameserver.network.serverpackets.ActionFailed;
import com.l2emu.gameserver.network.serverpackets.NpcHtmlMessage;
@@ -122,6 +123,63 @@
			}
			showChatWindow(playerInstance, pageVal);
		}
+		else if (command.startsWith("PetBuff"))
+		{
+			L2Summon summonInstance = playerInstance.getPet();
+			
+			if (summonInstance == null)
+				return;
+			
+			String[] buffGroupArray = command.substring(5).split(" ");
+			for (String buffGroupList : buffGroupArray)
+			{
+				if (buffGroupList == null)
+				{
+					_log.warning("NPC Buffer Warning: npcId = " + npcId + " has no buffGroup set in the bypass for the buff selected.");
+					return;
+				}
+				int buffGroup = Integer.parseInt(buffGroupList);
+				int[] npcBuffGroupInfo = NpcBufferTable.getInstance().getSkillInfo(npcId, buffGroup);
+				if (npcBuffGroupInfo == null)
+				{
+					_log.warning("NPC Buffer Warning: npcId = " + npcId + " Location: " + getX() + ", " + getY() + ", " + getZ() + " Player: " + playerInstance.getName() + " has tried to use skill group (" + buffGroup + ") not assigned to the NPC Buffer!");
+					return;
+				}
+				int skillId = npcBuffGroupInfo[0];
+				int skillLevel = npcBuffGroupInfo[1];
+				int skillFeeId = npcBuffGroupInfo[2];
+				int skillFeeAmount = npcBuffGroupInfo[3];
+				if (skillFeeId != 0)
+				{
+					L2ItemInstance itemInstance = playerInstance.getInventory().getItemByItemId(skillFeeId);
+					if (itemInstance == null || (!itemInstance.isStackable() && playerInstance.getInventory().getInventoryItemCount(skillFeeId, -1) < skillFeeAmount))
+					{
+						SystemMessage sm = new SystemMessage(SystemMessageId.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL);
+						playerInstance.sendPacket(sm);
+						continue;
+					}
+					if (itemInstance.isStackable())
+					{
+						if (!playerInstance.destroyItemByItemId("Npc Buffer", skillFeeId, skillFeeAmount, playerInstance.getTarget(), true))
+						{
+							SystemMessage sm = new SystemMessage(SystemMessageId.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL);
+							playerInstance.sendPacket(sm);
+							continue;
+						}
+					}
+					else
+					{
+						for (int i = 0; i < skillFeeAmount; ++i)
+							playerInstance.destroyItemByItemId("Npc Buffer", skillFeeId, 1, playerInstance.getTarget(), true);
+					}
+				}
+				L2Skill skill;
+				skill = SkillTable.getInstance().getInfo(skillId, skillLevel);
+				if (skill != null)
+					skill.getEffects(playerInstance, summonInstance);
+			}
+			showChatWindow(playerInstance, pageVal);
+		}
		else if (command.startsWith("Heal"))
		{
			if (!playerInstance.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(playerInstance))

 

to use it use the PetBuff bypass.

 

credits to me.

Posted

Nice one, glad to see you back at sharing ^^

 

i never regret to share something i just not a sharing type and i share only few times but still i have the most own shared code so... :D

  • 2 weeks later...
  • 1 month 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.



  • Posts

    • Hi players ! Meet our project Lineage 2 Hiro Classic ! A low rate classic pvp oriented with many features. No pay to win, RB/AoE, group clan pvp castle etc ...  Dynamic rates, RB Xp 4x and soon massive update with auto farm ! Join now !  https://www.lineage2hiro.com/ Can't wait to see you online !
    • To all first time buyers we give a bonus + 10% of the order. 
    • 🔥 Looking for a powerful, clean, and player-friendly Auction House system for your Lineage 2 server? This fully-featured module is ready to plug into your project and provide your players with a modern, centralized marketplace!   💼 What is it? A complete Auction House system designed for fixed-price item sales between players. Forget about private stores and spammed zones—this system offers a smooth, secure, and offline-friendly way to buy and sell items across your server.   Photo Library: https://imgur.com/a/zLlUQbW   ✅ Main Features: 🔹 Fixed-Price Listings Only: Players list items at a set price. No bidding, no delays—just fast, clean trades. 🔹 Multi-Currency Support: Works with Adena, event coins, custom currencies—fully configurable. 🔹 Dynamic Interface: Players can filter items by name, type, and price. Easy-to-use HTML layout with smooth pagination. 🔹 Sell While Offline: Post items and receive payments even if you're not online—true passive trading. 🔹 Safety First: Full validation: no equipped/augmented/restricted items unless allowed. Prevents scams, mispricing, and listing errors. 🔹 Expiration Timer (Optional): Set listing time limits. Expired items go to warehouse/mail automatically. 🔹 Spam & Duplication Protection: Prevents multiple listings of identical items and unnecessary database load. 🔹 Performance Optimized: Clean, indexed SQL structure. No lag or bloating even with thousands of listings.   ⚙️ Plug & Play Clean Java code (compatible with aCis & derivatives). Easy setup with full instructions and sample configurations. Includes SQL, HTML files, and all Java classes – fully working out of the box.   💰 Pricing & Contact 📦 50 euro - One-time purchase with full support for setup & basic customization. 💬 Contact me here via PM or on Discord: @Luminous 🔐 Serious buyers only – source is clean, secure, and tested on live servers.     Give your server the next-level economy it deserves. No more chaotic trade zones. No more confusion. Just clean, efficient, server-wide trading.
    • We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX! Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
    • 166 pisses on their heads any day of the week though
  • Topics

×
×
  • Create New...