Jump to content

Question

Posted

Hello guys,

 

I have an problem. It's about Inventory. For example when it gets full 80/80 I can't pick anything anymore, even the items that i already have, for example adena.
It is ok that i can't pick up new items, but i would like to know is it possible to make stacks out of it ?  For example when my Inventory is full that I still can pick up adena and the items that i already have inside.

Recommended Posts

  • 0
Posted (edited)

I did that, and i showed you the problem that is eclipse showing. 

and i told you chance the item to target what you dont understand?

if (!target.isStackable() || _inventory.getItemByItemId(target.getItemId()) == null)
Edited by Reborn12
  • 0
Posted

 

and i told you chance the item to target what you dont understand?

if (!target.isStackable() || _inventory.getItemByItemId(target.getItemId()) == null)

Now the code is working perfectly. Eclipse is not showing any problems.... But i can't compile anymore.... for no reason....

I compiled last night perfectly fine.....

Wtf.... 62285822db.jpeg

  • 0
Posted (edited)

2k17 best serbidors incoming 

 

This nab reborn first check if the item is stackable and then check if the item is null ROLF

 

bravetobe plz tell us ur opinion about this.

Edited by Θα Σπασω Κουπες
  • 0
Posted

 

and i told you chance the item to target what you dont understand?

if (!target.isStackable() || _inventory.getItemByItemId(target.getItemId()) == null)

Ok Reborn, i did all what u said, and compiling finally worked after i did some researches on net.... it was because of Java path.... anyway.... 

the code worked, compiling worked..... but it still doesn't pick up  when inventory is full..... i want to make all items that already exist in inventory that they can be picked up......for example Adena.....

:( :/ 

  • 0
Posted
19 hours ago, wongerlt said:

show us how u put the code.

L2ItemInstance target = (L2ItemInstance) object;
		
		sendPacket(new StopMove(this));
		
		SystemMessage smsg = null;
		synchronized (target)
		{
			// Check if the target to pick up is visible
			if (!target.isVisible())
			{
				// Send a Server->Client packet ActionFailed to this L2PcInstance
				sendPacket(ActionFailed.STATIC_PACKET);
				return;
			}
			
			if (!target.getDropProtection().tryPickUp(this))
			{
				sendPacket(ActionFailed.STATIC_PACKET);
				smsg = SystemMessage.getSystemMessage(SystemMessageId.FAILED_TO_PICKUP_S1);
				smsg.addItemName(target);
				sendPacket(smsg);
				return;
			}
			
			if (((isInParty() && (getParty().getDistributionType() == PartyDistributionType.FINDERS_KEEPERS)) || !isInParty()) && !_inventory.validateCapacity(target))
			{
				sendPacket(ActionFailed.STATIC_PACKET);
				if (!target.isStackable() || (_inventory.getItemByItemId(target.getId()) == null))
				{
					sendPacket(SystemMessageId.SLOTS_FULL);
					return;
				}
				
				if (isInvisible() && !canOverrideCond(PcCondOverride.ITEM_CONDITIONS))
				{
					return;
				}

this thing here is inserted

if (!target.isStackable() || (_inventory.getItemByItemId(target.getId()) == null))
				{

 

Thanks.

  • 0
Posted
On 9/6/2017 at 9:22 PM, wongerlt said:

and it say that inv. is full at system message?

It picks up items when you are in party, but when you are alone not..... ://

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
Answer this question...

×   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...