Jump to content

Recommended Posts

Posted

No item consumption for some stuff heres a list:

-arrows,bolts

-soulshot spiritshots(for pets too)

-char change potions(hair face etc)

-escape scrolls(for blessed no!)

-fish shots

-recovery scrolls

-res scrolls(for blessed no!)

-healing drug,mana drug,mana potion,greater healing potion,healing potion

 

from these items you need only 1!

 

credits to me.

 

Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 144)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -6332,7 +6332,7 @@
         {
             synchronized(arrows)
             {
-                arrows.changeCountWithoutTrace(-1, this, null);
+                arrows.changeCountWithoutTrace(0, this, null);
                 arrows.setLastChange(L2ItemInstance.MODIFIED);

                 // could do also without saving, but let's save approx 1 of 10
@@ -6343,8 +6343,6 @@
         }
         else
         {
-            // Destroy entire item and save to database
-            _inventory.destroyItem("Consume", arrows, this, null);
             
             getInventory().unEquipItemInSlot(Inventory.PAPERDOLL_LHAND);
             if (bolts) 
Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShot.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShot.java	(revision 121)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShot.java	(working copy)
@@ -22,7 +22,6 @@
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
import net.sf.l2j.gameserver.network.SystemMessageId;
-import net.sf.l2j.gameserver.network.serverpackets.ExAutoSoulShot;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.item.L2Weapon;
@@ -78,7 +77,6 @@
			return;
		}

-		int itemId = 6645;
		int shotConsumption = 1;
		L2ItemInstance weaponInst = null;
		L2Weapon weaponItem = null;
@@ -126,24 +124,6 @@
			activePet.setChargedSoulShot(L2ItemInstance.CHARGED_SOULSHOT);
		}

-		// If the player doesn't have enough beast soulshot remaining, remove any auto soulshot task.
-		if (!activeOwner.destroyItemWithoutTrace("Consume", item.getObjectId(), shotConsumption, null, false))
-		{
-			if (activeOwner.getAutoSoulShot().containsKey(itemId))
-			{
-				activeOwner.removeAutoSoulShot(itemId);
-				activeOwner.sendPacket(new ExAutoSoulShot(itemId, 0));
-				
-				SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
-				sm.addString(item.getItem().getName());
-				activeOwner.sendPacket(sm);
-				return;
-			}
-			
-			activeOwner.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_SOULSHOTS));
-			return;
-		}
-		
		// Pet uses the power of spirit.
		activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT));

Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/CharChangePotions.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/CharChangePotions.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/CharChangePotions.java	(working copy)
@@ -112,9 +112,6 @@
		// Update the changed stat for the character in the DB.
		activeChar.store();

-		// Remove the item from inventory.
-		activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);
-		
		// Broadcast the changes to the char and all those nearby.
		UserInfo ui = new UserInfo(activeChar);
		activeChar.broadcastPacket(ui);
Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java	(working copy)
@@ -19,10 +19,8 @@
import net.sf.l2j.gameserver.model.actor.L2Playable;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.SystemMessageId;
-import net.sf.l2j.gameserver.network.serverpackets.ExAutoSoulShot;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
-import net.sf.l2j.gameserver.skills.Stats;
import net.sf.l2j.gameserver.templates.item.L2Item;
import net.sf.l2j.gameserver.templates.item.L2Weapon;
import net.sf.l2j.gameserver.util.Broadcast;
@@ -84,26 +82,6 @@
			if (weaponInst.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE)
				return;

-			// Consume Soul shots if player has enough of them
-			int saSSCount = (int) activeChar.getStat().calcStat(Stats.SOULSHOT_COUNT, 0, null, null);
-			int SSCount = saSSCount == 0 ? weaponItem.getSoulShotCount() : saSSCount;
-			
-			if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), SSCount, null, false))
-			{
-				if (activeChar.getAutoSoulShot().containsKey(itemId))
-				{
-					activeChar.removeAutoSoulShot(itemId);
-					activeChar.sendPacket(new ExAutoSoulShot(itemId, 0));
-					
-					SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
-					sm.addString(item.getItem().getName());
-					activeChar.sendPacket(sm);
-				}
-				else
-					activeChar.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_SOULSHOTS));
-				return;
-			}
-			
			// Charge soul shot
			weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_SOULSHOT);
		}
Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfEscape.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfEscape.java	(revision 142)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfEscape.java	(working copy)
@@ -167,8 +167,11 @@
		int itemId = item.getItemId();
		int escapeSkill = (itemId == 1538 || itemId == 5858 || itemId == 5859 || itemId == 3958 || itemId == 10130) ? 2036 : 2013;

-		if (!activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false))
-			return;
+		if (itemId == 1538)
+		{
+			if (!activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false))
+				return;
+		}

		activeChar.disableAllSkills();

Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShot.java	(working copy)
@@ -19,7 +19,6 @@
import net.sf.l2j.gameserver.model.actor.L2Playable;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.SystemMessageId;
-import net.sf.l2j.gameserver.network.serverpackets.ExAutoSoulShot;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.item.L2Item;
@@ -80,23 +79,6 @@
			return;
		}

-		// Consume Spirit shot if player has enough of them
-		if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false))
-		{
-			if (activeChar.getAutoSoulShot().containsKey(itemId))
-			{
-				activeChar.removeAutoSoulShot(itemId);
-				activeChar.sendPacket(new ExAutoSoulShot(itemId, 0));
-				
-				SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
-				sm.addString(item.getItem().getName());
-				activeChar.sendPacket(sm);
-			}
-			else
-				activeChar.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_SPIRITSHOTS));
-			return;
-		}
-		
		// Charge Spirit shot
		weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_SPIRITSHOT);

Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShot.java	(working copy)
@@ -19,7 +19,6 @@
import net.sf.l2j.gameserver.model.actor.L2Playable;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.SystemMessageId;
-import net.sf.l2j.gameserver.network.serverpackets.ExAutoSoulShot;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.item.L2Item;
@@ -90,23 +89,6 @@
			return;
		}

-		// Consume Blessed SpiritShot if player has enough of them
-		if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false))
-		{
-			if (activeChar.getAutoSoulShot().containsKey(itemId))
-			{
-				activeChar.removeAutoSoulShot(itemId);
-				activeChar.sendPacket(new ExAutoSoulShot(itemId, 0));
-				
-				SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
-				sm.addString(item.getItem().getName());
-				activeChar.sendPacket(sm);
-			}
-			else
-				activeChar.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_SPIRITSHOTS));
-			return;
-		}
-		
		// Charge Blessed SpiritShot
		weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT);

Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/FishShots.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/FishShots.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/FishShots.java	(working copy)
@@ -85,7 +85,6 @@
		}

		weaponInst.setChargedFishshot(true);
-		activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
		L2Object oldTarget = activeChar.getTarget();
		activeChar.setTarget(activeChar);

Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/Scrolls.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/Scrolls.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/Scrolls.java	(working copy)
@@ -85,8 +85,6 @@

		if (itemId >= 8594 && itemId <= 8599) //Scrolls of recovery XML: 2286
		{
-			if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
-				return;
			activeChar.broadcastPacket(new MagicSkillUse(playable, playable, 2286, 1, 1, 0));
			activeChar.reduceDeathPenaltyBuffLevel();
			useScroll(activeChar, 2286, itemId - 8593);
Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShot.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShot.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShot.java	(working copy)
@@ -22,7 +22,6 @@
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
import net.sf.l2j.gameserver.network.SystemMessageId;
-import net.sf.l2j.gameserver.network.serverpackets.ExAutoSoulShot;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.item.L2Weapon;
@@ -135,23 +134,6 @@
				activePet.setChargedSpiritShot(L2ItemInstance.CHARGED_SPIRITSHOT);
		}

-		if (!activeOwner.destroyItemWithoutTrace("Consume", item.getObjectId(), shotConsumption, null, false))
-		{
-			if (activeOwner.getAutoSoulShot().containsKey(itemId))
-			{
-				activeOwner.removeAutoSoulShot(itemId);
-				activeOwner.sendPacket(new ExAutoSoulShot(itemId, 0));
-				
-				SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
-				sm.addString(item.getItem().getName());
-				activeOwner.sendPacket(sm);
-				return;
-			}
-			
-			activeOwner.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_SPIRITSHOTS));
-			return;
-		}
-		
		// Pet uses the power of spirit.
		activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT));

Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfResurrection.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfResurrection.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/ScrollOfResurrection.java	(working copy)
@@ -140,8 +140,6 @@

				if (condGood)
				{
-					if (!activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false))
-						return;

					int skillId = 0;
					int skillLevel = 1;
@@ -153,6 +151,8 @@
							break; // Scroll of Resurrection
						case 3936:
							skillId = 2049;
+							if (!activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false))
+								return;
							break; // Blessed Scroll of Resurrection
						case 3959:
							skillId = 2062;
Index: D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/Potions.java
===================================================================
--- D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/Potions.java	(revision 117)
+++ D:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/Potions.java	(working copy)
@@ -128,20 +128,20 @@
			case 725: // healing_drug, xml: 2002
				if (!isEffectReplaceable(playable, L2EffectType.HEAL_OVER_TIME, itemId))
					return;
-				res = usePotion(playable, 2002, 1);
+				usePotion(playable, 2002, 1);
				break;
			case 726: // custom mana drug, xml: 9007
				if (Config.L2JMOD_ENABLE_MANA_POTIONS_SUPPORT)
-					res = usePotion(activeChar, 9007, 1);
+					usePotion(activeChar, 9007, 1);
				break;
			case 727: // _healing_potion, xml: 2032
				if (!isEffectReplaceable(playable, L2EffectType.HEAL_OVER_TIME, itemId))
					return;
-				res = usePotion(playable, 2032, 1);
+				usePotion(playable, 2032, 1);
				break;
			case 728: // custom mana potion, xml: 9008
				if (Config.L2JMOD_ENABLE_MANA_POTIONS_SUPPORT)
-					res = usePotion(activeChar, 9008, 1);
+					usePotion(activeChar, 9008, 1);
				break;
			case 733: // Endeavor Potion, xml: 2010
				res = usePotion(playable, 2010, 1);
@@ -175,7 +175,7 @@
			case 1539: // greater_healing_potion, xml: 2037
				if (!isEffectReplaceable(playable, L2EffectType.HEAL_OVER_TIME, itemId))
					return;
-				res = usePotion(playable, 2037, 1);
+				usePotion(playable, 2037, 1);
				break;
			case 1540: // quick_healing_potion, xml: 2038
				if (!isEffectReplaceable(playable, L2EffectType.HEAL_OVER_TIME, itemId))

Posted

Very good idea , thanx for that . I have seen a lot of asking people on L2J forum :) Great share again thanx

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

    • Do you want stability? Lagless and bugless game? Instant support? Daily PVP? Long-Term playing? You are in the right place, time to start! Lineage2 X70 Interlude NEW Season 2025 February 8th 13:00 UTC+2 Greece/Lithuania: 13:00 UTC+2 Poland/Norway: 12:00 UTC+1 United Kingdom: 11:00 UTC+0 Brazil/Argentina: 8:00 UTC-3 Opening Bonus First 100 players after third class changing will automaticly get Premium Coin award in their inventory. All new players spawn in town of Gludio! All players start from 25 LvL with starter pack (adenas and equipment)! RATES XP: x70 | SP: x70 Party XP/ SP: x1.2 Adenas drop rate: x30 Drop Items: x25 | Spoil: x25 Drop SealStones rate: x1.2 Drop Manor rate: x1 Drop Quest rate: x5 | Reward rates: x2 (NOT FOR ALL) Raid Boss Drop: x10 Raid Boss Adenas Drop: x3 Grand Boss Drop: x1 Grand Boss Adenas Drop: x2 Information NPC Buffer 32 Buffs | 4 Debuffs PET Buffer for all classes [Except Necromancer] Scheme buffer: 3 Profiles. Buffs time: 2 Hours | Summons buffs - 60min. Global Gatekeeper. GM SHOP till weapon / armor / jewel B grade. Caradine letter 3rd part in GM Shop. Offline shop: SELL , PRIVATE CREATION , PACKAGE SALE from 35 LvL ! Mana potions: 500MP/2s. Spawn Protection: 20 Seconds. EVENTS Manager [TVT/DM]. Max Clients for one PC: 5 Rift | 4S Players: 3 Maximum inventory slots: 240 Maximum inventory slots for Dwarf: 250 Custom drop list: - Raid Boss Horus, Ember, Brakki, Nakondas: 1 VIP COIN (25%) | Korim (50%). - Raid Boss Apepi, Shacram, Atraiban, Korim: 1 BEWS (25%). - Raid Boss Glaki, Olkuth: 1-2 BEAS (40%). - Raid Boss Golkonda, Galaxia: 1-3 BEAS (60%). - Raid Boss Shyeed: 1-3 BEWS (30%) | 1-7 BEAS (40%) | 1-5 TOP LS 76 (50%). - Raid Boss Shuriel: 1-7 TOP LS 76 (50%) | 1-4 BEAS (60%). - Raid Boss Ashakiel: 1-2 BEWS (30%) | 1-7 TOP LS 76 (50%) | 1-4 BEAS (75%). - Raid Boss Antharas Priest Cloe: 1-3 BEWS (30%) | 1-7 TOP LS 76 (70%). ------------------------------------------------ - Hestia: Demon Splinters / Forgotten Blande (10%). - Ember: Arcana Mace / Draconic Bow (10%). - Galaxia: Angel Slayer / Heaven's Divider (10%). 1. Baium Lair and TOI 13/14 are PVP zones. 2. Valakas PVP zone near NPC "Klein" and inside Valakas room. 3. Antharas Lair and near "Heart Of Warding" are PVP zones. 4. Frintezza PVP zone is in first Imperial Tomb room. 5. Queen Ant PVP zone after the bridge and near Boss. 6. Zaken ship deck and rooms - PVP area. How to connect STEP BY STEP: 1. Install clear Lineage2 Interlude client 2. Download our patch, delete old system folder and add our 3. Delete, turn off anti virus or add our system folder to anti virus exceptions 4. Run l2.exe from Lineage2/system 5. Enter data on login window and enjoy the game! * You have to remove, turn off or use exceptions of antivirus because of our security protection. It is not a virus. * If you have connection issues with Windows 8 or 10, press right mouse button on l2.exe icon, press Properties, choose compatibility and unmark compatibility mode. Take your friends, clan, alliance, enemys, sharp your swords, clean your armors and meet your destiny at 2025 February 8th 13:00 UTC+2! WWW.L2BLAZE.NET INTERLUDE Empire X70 New Season: 2025 February 8th 13:00 UTC+2! WEBSITE: http://WWW.L2BLAZE.NET
    • Hello all,  i use L2jAcis 409 and i have problem with oly cycle, everyday is a different oly cycle and oly won't finish at the end of the month...almost 50 cycles and no end. I see oly matches in db but no points and after a day pass with /olympiadstat no points... Any help welcome, thank you.
    • Bump NEW USER IN TELEGRAM AND DISCORD IS "mileanum"  NEW USER IN TELEGRAM AND DISCORD IS "mileanum"  NEW USER IN TELEGRAM AND DISCORD IS "mileanum" NEW USER IN TELEGRAM AND DISCORD IS "mileanum" 
  • Topics

×
×
  • Create New...