Cripplez 40 Posted September 18, 2019 Share Posted September 18, 2019 Hi, i'm trying to make the metin stones stackable. If i pick up the stone from the ground it stacks normally on the other stone I have in my inventory, but if I split them and then i try to stack I receive the error that i can't use the stone on this item, like it would be a necklace, bracelet etc.. Do you know what should I change to fix this? Thank you Link to comment Share on other sites More sharing options...
Zombie 2 Posted March 25, 2020 Share Posted March 25, 2020 #bump Link to comment Share on other sites More sharing options...
Honorable Member Solution Mali 41760 Posted March 25, 2020 Honorable Member Solution Share Posted March 25, 2020 1.Make item stackable from proto 2.uiinventory.py: Find in def __DropSrcItemToDestItemInInventory(self, srcItemVID, srcItemSlotPos, dstItemSlotPos): elif item.IsMetin(srcItemVID): self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos) Change: elif item.IsMetin(srcItemVID) and not item.IsMetin(player.GetItemIndex(dstItemSlotPos)): self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos) 3.char_item.cpp Find in case ITEM_METIN: ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (METIN)"); Change: item->SetCount(item->GetCount() - 1); 7 Link to comment Share on other sites More sharing options...
Cripplez 40 Posted March 25, 2020 Author Share Posted March 25, 2020 (edited) 2 hours ago, Mali61 said: 1.Make item stackable from proto 2.uiinventory.py: Find in def __DropSrcItemToDestItemInInventory(self, srcItemVID, srcItemSlotPos, dstItemSlotPos): elif item.IsMetin(srcItemVID): self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos) Change: elif item.IsMetin(srcItemVID) and not item.IsMetin(player.GetItemIndex(dstItemSlotPos)): self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos) 3.char_item.cpp Find in case ITEM_METIN: ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (METIN)"); Change: item->SetCount(item->GetCount() - 1); Thank you, all works perfect. Just one last thing, how can i make that when i try to stack a stone with another stone with the same vnum the background is yellow instead of red? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Mali 41760 Posted March 25, 2020 Honorable Member Share Posted March 25, 2020 Find in uiinventory.py - def __CanUseSrcItemToDstItem(self, srcItemVNum, srcSlotPos, dstSlotPos): elif item.IsMetin(srcItemVNum): if player.ATTACH_METIN_OK == player.CanAttachMetin(srcItemVNum, dstSlotPos): return True Change: elif item.IsMetin(srcItemVNum): if player.ATTACH_METIN_OK == player.CanAttachMetin(srcItemVNum, dstSlotPos) or (item.IsMetin(player.GetItemIndex(dstSlotPos)) and player.GetItemIndex(dstSlotPos) == srcItemVNum): return True 8 Link to comment Share on other sites More sharing options...
Cripplez 40 Posted March 25, 2020 Author Share Posted March 25, 2020 Solved. I can't edit the first post and mark it as "solved". 1 Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 14, 2020 Share Posted August 14, 2020 how did you solve the problem for the background red? Link to comment Share on other sites More sharing options...
Cripplez 40 Posted August 14, 2020 Author Share Posted August 14, 2020 2 hours ago, Tallywa said: how did you solve the problem for the background red? All the fix are in the first 2 reply by Mali61 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now