Jump to content

[cube system help] I cannot do anything with items from special storage to cube window


Recommended Posts

  • Premium

Hello

Im using "UK_ENABLE_SPECIAL_STORAGE".
And i cannot move items from special storage to normal inventory, or even into cube window.
I saw a "one line code" for enable move items from special-inv to normal-inv, but i cant find it. :c
 

Gif about this: https://metin2.download/picture/2ch9DNSYcoua898Edc3ycMAkGUjnE38U/.gif

Edited by Metin2 Dev
Core X - External 2 Internal

Ulthar

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

you extend this function in cube.cpp?

 

void Cube_add_item (LPCHARACTER ch, int cube_index, int inven_index)



in my code:

 

#ifdef __SPECIAL_INVENTORY_SYSTEM__
	if (inven_index < 0 || INVENTORY_MAX_NUM +
		SKILL_BOOK_INVENTORY_MAX_NUM +
		UPGRADE_ITEMS_INVENTORY_MAX_NUM +
		STONE_INVENTORY_MAX_NUM +
		GIFT_BOX_INVENTORY_MAX_NUM +
		CHANGERS_INVENTORY_MAX_NUM <= inven_index)
		return;
#else
	if (inven_index < 0 || INVENTORY_MAX_NUM <= inven_index)
		return;
#endif

 

Edited by SamuraiHUN
  • Premium
3 minutes ago, SamuraiHUN said:

you extend this function in cube.cpp?

Szia!
Yes, i did it

 

#ifdef UK_ENABLE_SPECIAL_STORAGE
void Cube_add_item(LPCHARACTER ch, UINT cube_index, UINT inven_index, int inven_type)
#else
void Cube_add_item(LPCHARACTER ch, UINT cube_index, UINT inven_index)
#endif

 

Ulthar

  • 3 years later...
  • Active Member

You need to extend this definition like this:
 

	def __OnSelectEmptySlot(self, selectedSlotPos):

		isAttached = mouseModule.mouseController.isAttached()
		if isAttached:
			attachedSlotType = mouseModule.mouseController.GetAttachedType()
			attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
			mouseModule.mouseController.DeattachObject()
			
			###if player.SLOT_TYPE_INVENTORY != attachedSlotType:
			if (player.SLOT_TYPE_INVENTORY != attachedSlotType and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedSlotType and player.SLOT_TYPE_SKILL_BOOK_INVENTORY != attachedSlotType and player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY != attachedSlotType and player.SLOT_TYPE_STONE_INVENTORY != attachedSlotType and player.SLOT_TYPE_BOX_INVENTORY != attachedSlotType and player.SLOT_TYPE_EFSUN_INVENTORY != attachedSlotType and player.SLOT_TYPE_CICEK_INVENTORY != attachedSlotType):
				return
			

			for slotPos, invenPos in self.cubeItemInfo.items():
				if invenPos == attachedSlotPos:
					del self.cubeItemInfo[slotPos]

			self.cubeItemInfo[selectedSlotPos] = attachedSlotPos
			net.SendChatPacket("/cube add %d %d" % (selectedSlotPos, attachedSlotPos))

			self.Refresh()

 

Buy a new system? 
My systems:  https://payhip.com/Pisti95

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.