LeNnT 5 Posted June 8, 2015 Share Posted June 8, 2015 Using 4 inventory, the activate slot effect goes bugged just update in uiinventory.py: def RefreshBagSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndItem.SetItemSlot for i in xrange(player.INVENTORY_PAGE_SIZE*4): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) itemCount = getItemCount(slotNumber) if 0 == itemCount: self.wndItem.ClearSlot(i) continue elif 1 == itemCount: itemCount = 0 itemVnum = getItemVNum(slotNumber) setItemVNum(i, itemVnum, itemCount) if constInfo.IS_AUTO_POTION(itemVnum): metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)] if slotNumber >= player.INVENTORY_PAGE_SIZE: slotNumber -= player.INVENTORY_PAGE_SIZE isActivated = 0 != metinSocket[0] if isActivated: self.wndItem.ActivateSlot(i) potionType = 0; if constInfo.IS_AUTO_POTION_HP(itemVnum): potionType = player.AUTO_POTION_TYPE_HP elif constInfo.IS_AUTO_POTION_SP(itemVnum): potionType = player.AUTO_POTION_TYPE_SP usedAmount = int(metinSocket[1]) totalAmount = int(metinSocket[2]) player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i)) else: self.wndItem.DeactivateSlot(i) self.wndItem.RefreshSlot() if self.wndBelt: self.wndBelt.RefreshSlot() Link to comment Share on other sites More sharing options...
Juppsy 4 Posted July 15, 2015 Share Posted July 15, 2015 (edited) Hidden Content I just have one problem, I can't upgrade items that are on 3rd & 4th Inventory. Any idea? Can you tell me how do you fix it? (photo) #Edit: Problem solved. Problem was at def SetInventoryPage(self, page). Edited July 16, 2015 by Juppsy Solved Link to comment Share on other sites More sharing options...
yagokurt 84 Posted July 23, 2015 Share Posted July 23, 2015 (edited) Do you guys expect problem with the ruby dragon soul too? After this slot i cant move the stone, all other slots are just useless. And the same happen on "Afilado". Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
leo2993 21 Posted September 1, 2015 Share Posted September 1, 2015 (edited) where i found beltinventory.py? he don't locate in locale_xx :s #EDIT: SOLVED Edited September 11, 2015 by leo2993 Link to comment Share on other sites More sharing options...
leo2993 21 Posted September 2, 2015 Share Posted September 2, 2015 Thankyou very much!!! #Edit : i finally finish and good work Link to comment Share on other sites More sharing options...
leo2993 21 Posted September 11, 2015 Share Posted September 11, 2015 (edited) No you have to edit the function for getting the next free slot. Its not just making higher slots. Not that easy Atm it will only make the right inventory ending at slots max num / 2 -> at the end of 2nd page Sorry, can you explain more? I don't understant. Please #EDIT: SOLVED Work Fine! Edited September 11, 2015 by leo2993 Link to comment Share on other sites More sharing options...
Mhyst. 2 Posted September 11, 2015 Share Posted September 11, 2015 (edited) Do you guys expect problem with the ruby dragon soul too? After this slot i cant move the stone, all other slots are just useless. And the same happen on "Afilado". Maybe because of the total number of inventory slots? Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Finch 16 Posted November 6, 2015 Share Posted November 6, 2015 I have 5 InventorySlots they all work without problems, but now i compile my .exe new because i had delete the protection. And now weared Items not seen more, where is the problem, dont edit inventorywindow, ..... and so on, only compile new .exe ? Link to comment Share on other sites More sharing options...
raihan3 20 Posted November 14, 2015 Share Posted November 14, 2015 The python part is: uiinventory.py find this: self.inventoryTab.append(self.GetChild("Inventory_Tab_02")) and add down this: self.inventoryTab.append(self.GetChild("Inventory_Tab_03")) self.inventoryTab.append(self.GetChild("Inventory_Tab_04")) after that find this: self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg)) and add down this: self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg)) self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg)) find this: self.inventoryTab[0].Down() and add down this: self.inventoryPageIndex = 0 now lets go to edit the SetInventoryPage function replace the SetInventoryPage function with this: def SetInventoryPage(self, page): self.inventoryTab[self.inventoryPageIndex].SetUp() self.inventoryPageIndex = page self.RefreshBagSlotWindow() file locale/xx/ui/inventorywindow.py: change EQUIPMENT_START_INDEX = 90 to EQUIPMENT_START_INDEX = 180 after that replace the Inventory_Tab_01 and Inventory_Tab_02 with this: This is the hidden content, please Sign In or Sign Up 1114 11:39:05558 :: networkModule.py(line:194) SetSelectCharacterPhasesystem.py(line:130) __pack_importsystem.py(line:110) _process_resultintroSelect.py(line:28) ?system.py(line:130) __pack_importsystem.py(line:110) _process_resultinterfaceModule.py(line:14) ?system.py(line:130) __pack_import networkModule.SetSelectCharacterPhase - exceptions.SyntaxError:invalid syntax (line 148) 1114 11:39:05558 :: ============================================================================================================1114 11:39:05558 :: Abort!!!! 1 1 Link to comment Share on other sites More sharing options...
Former Staff Shisui 490 Posted November 14, 2015 Former Staff Share Posted November 14, 2015 uiinventory.py find this: self.inventoryTab.append(self.GetChild("Inventory_Tab_02")) and add down this: self.inventoryTab.append(self.GetChild("Inventory_Tab_03")) self.inventoryTab.append(self.GetChild("Inventory_Tab_04")) after that find this: self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg)) and add down this: self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg)) self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg)) find this: self.inventoryTab[0].Down() and add down this: self.inventoryPageIndex = 0 now lets go to edit the SetInventoryPage function replace the SetInventoryPage function with this: def SetInventoryPage(self, page): self.inventoryTab[self.inventoryPageIndex].SetUp() self.inventoryPageIndex = page self.RefreshBagSlotWindow() file locale/xx/ui/inventorywindow.py: change EQUIPMENT_START_INDEX = 90 to EQUIPMENT_START_INDEX = 180 after that replace the Inventory_Tab_01 and Inventory_Tab_02 with this: This is the hidden content, please Sign In or Sign Up 1114 11:39:05558 :: networkModule.py(line:194) SetSelectCharacterPhasesystem.py(line:130) __pack_importsystem.py(line:110) _process_resultintroSelect.py(line:28) ?system.py(line:130) __pack_importsystem.py(line:110) _process_resultinterfaceModule.py(line:14) ?system.py(line:130) __pack_import networkModule.SetSelectCharacterPhase - exceptions.SyntaxError:invalid syntax (line 148) 1114 11:39:05558 :: ============================================================================================================1114 11:39:05558 :: Abort!!!! Wrong tabulations. 1 1 Link to comment Share on other sites More sharing options...
raihan3 20 Posted November 14, 2015 Share Posted November 14, 2015 then how i add 4 inventory Link to comment Share on other sites More sharing options...
WhoIsNice 6 Posted December 17, 2015 Share Posted December 17, 2015 Thank you so much! +1 :) Link to comment Share on other sites More sharing options...
loyein 18 Posted January 2, 2016 Share Posted January 2, 2016 Work without any problem, thanks. Link to comment Share on other sites More sharing options...
Marko 51 Posted March 28, 2016 Share Posted March 28, 2016 Anyone have the inventorywindow.py with the 4 small tabs? (Like Gameforge server) Link to comment Share on other sites More sharing options...
Premium EnKor 42 Posted August 3, 2016 Premium Share Posted August 3, 2016 i install this tutorial more then 20 times. And i cant refine itens in 3 ,4 or 5 inventory. i trie with 3, with 4 and 5 inventory. Never refine. All work fine trades and etc... but cant refine! Why??? if pc.get_sex() == true and npc.get_sex() == false then npc.purge() end Link to comment Share on other sites More sharing options...
Premium Galet 509 Posted August 4, 2016 Premium Share Posted August 4, 2016 2 hours ago, EnKor said: i install this tutorial more then 20 times. And i cant refine itens in 3 ,4 or 5 inventory. i trie with 3, with 4 and 5 inventory. Never refine. All work fine trades and etc... but cant refine! Why??? I had a similar bug, there's a check in input_main if I remeber well, but i'm not sure Link to comment Share on other sites More sharing options...
Premium EnKor 42 Posted August 4, 2016 Premium Share Posted August 4, 2016 can u please help me and tell me what i need to find? and change? if pc.get_sex() == true and npc.get_sex() == false then npc.purge() end Link to comment Share on other sites More sharing options...
Legor 0 Posted August 24, 2016 Share Posted August 24, 2016 This code is wrong.... static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 2); INVENTORY_MAX_NUM / 5 / 2 = 18... It should be 9, because inventory pages are 5x9...... static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 4); //Where 4 is the number of pages.. This is COMPLETELY wrong..... Because the second, third and fourth for iterate ever the same page for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid3.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize()); } for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid4.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize()); } It should be: for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM / 4 * 2; ++i) //GRID 2 { if (!(item = victim->GetInventoryItem(i))) continue; s_grid2.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize()); } for (i = INVENTORY_MAX_NUM / 4 * 2; i < INVENTORY_MAX_NUM / 4 * 3; ++i) //GRID 3 { if (!(item = victim->GetInventoryItem(i))) continue; s_grid3.Put(i - INVENTORY_MAX_NUM / 4 * 2, 1, item->GetSize()); } for (i = INVENTORY_MAX_NUM / 4 * 3; i < INVENTORY_MAX_NUM; ++i) // GRID 4 { if (!(item = victim->GetInventoryItem(i))) continue; s_grid4.Put(i - INVENTORY_MAX_NUM / 4 * 3, 1, item->GetSize()); } And finally there are no implementation in the next source code to count the void spaces for 3° and 4° pages.. Link to comment Share on other sites More sharing options...
kieranFMT2 301 Posted September 2, 2016 Share Posted September 2, 2016 can s1 help me with this error? Spoiler 0902 14:54:43929 :: AttributeError 0902 14:54:43929 :: : 0902 14:54:43929 :: 'InventoryWindow' object has no attribute 'inventoryPageIndex' 0902 14:54:43929 :: Link to comment Share on other sites More sharing options...
diosmx9 2 Posted September 2, 2016 Share Posted September 2, 2016 (edited) 32 minutes ago, kieranFMT2 said: can s1 help me with this error? Reveal hidden contents 0902 14:54:43929 :: AttributeError 0902 14:54:43929 :: : 0902 14:54:43929 :: 'InventoryWindow' object has no attribute 'inventoryPageIndex' 0902 14:54:43929 :: Replacing the function test for this: where says for i in xrange(2): the number 2 is the amount of inventory you have def SetInventoryPage(self, page): self.inventoryPageIndex = page for i in xrange(2): if i != self.inventoryPageIndex: self.inventoryTab.SetUp() self.inventoryTab[self.inventoryPageIndex].Down() self.RefreshBagSlotWindow() reviews the tabs https://metin2.download/picture/ifT2c5LhHe2T058T4sMfBwwsyyz8rhvb/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
thespeedy 20 Posted September 4, 2016 Share Posted September 4, 2016 can one make this in #define? Link to comment Share on other sites More sharing options...
daradevil124 370 Posted March 5, 2017 Share Posted March 5, 2017 (edited) Works perfectly via MartPwnS proper function. Spoiler Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
iShadoW 3 Posted March 29, 2017 Share Posted March 29, 2017 On 6/8/2015 at 1:46 PM, LeNnT said: def RefreshBagSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndItem.SetItemSlot for i in xrange(player.INVENTORY_PAGE_SIZE*4): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) itemCount = getItemCount(slotNumber) if 0 == itemCount: self.wndItem.ClearSlot(i) continue elif 1 == itemCount: itemCount = 0 itemVnum = getItemVNum(slotNumber) setItemVNum(i, itemVnum, itemCount) if constInfo.IS_AUTO_POTION(itemVnum): metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)] if slotNumber >= player.INVENTORY_PAGE_SIZE: slotNumber -= player.INVENTORY_PAGE_SIZE isActivated = 0 != metinSocket[0] if isActivated: self.wndItem.ActivateSlot(i) potionType = 0; if constInfo.IS_AUTO_POTION_HP(itemVnum): potionType = player.AUTO_POTION_TYPE_HP elif constInfo.IS_AUTO_POTION_SP(itemVnum): potionType = player.AUTO_POTION_TYPE_SP usedAmount = int(metinSocket[1]) totalAmount = int(metinSocket[2]) player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i)) else: self.wndItem.DeactivateSlot(i) self.wndItem.RefreshSlot() if self.wndBelt: self.wndBelt.RefreshSlot() i still have the problem with active slot it moves very fast Link to comment Share on other sites More sharing options...
Luffy 9 Posted June 25, 2017 Share Posted June 25, 2017 Error while trying to add the 4 inventories Syserr 0625 00:48:21675 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR 0625 00:49:32170 :: Failed to load script file : locale/pt/ui/InventoryWindow.py 0625 00:49:32197 :: ui.py(line:2763) LoadScriptFile system.py(line:192) execfile system.py(line:161) Run system.py(line:177) __LoadTextFile__ LoadScriptFile!!!!!!!!!!!!!! - <type 'exceptions.SyntaxError'>:invalid syntax (locale/pt/ui/InventoryWindow.py, line 303) 0625 00:49:32197 :: ============================================================================================================ 0625 00:49:32197 :: Abort!!!! 0625 00:49:32198 :: uiInventory.py(line:293) __LoadWindow ui.py(line:2780) LoadScriptFile exception.py(line:36) Abort InventoryWindow.LoadWindow.LoadObject - <type 'exceptions.SystemExit'>: 0625 00:49:32198 :: ============================================================================================================ 0625 00:49:32198 :: Abort!!!! My inventorywindow.py import uiScriptLocale import item EQUIPMENT_START_INDEX = 180 window = { "name" : "InventoryWindow", ## 600 - (width + ¿À¸¥ÂÊÀ¸·Î ºÎÅÍ ¶ç¿ì±â 24 px) "x" : SCREEN_WIDTH - 176, "y" : SCREEN_HEIGHT - 37 - 565, "style" : ("movable", "float",), "width" : 176, "height" : 565, "children" : ( ## Inventory, Equipment Slots { "name" : "board", "type" : "board", "style" : ("attach",), "x" : 0, "y" : 0, "width" : 176, "height" : 565, "children" : ( ## Title { "name" : "TitleBar", "type" : "titlebar", "style" : ("attach",), "x" : 8, "y" : 7, "width" : 161, "color" : "yellow", "children" : ( { "name":"TitleName", "type":"text", "x":77, "y":3, "text":uiScriptLocale.INVENTORY_TITLE, "text_horizontal_align":"center" }, ), }, ## Equipment Slot { "name" : "Equipment_Base", "type" : "image", "x" : 10, "y" : 33, "image" : "d:/ymir work/ui/equipment_bg_with_ring.tga", "children" : ( { "name" : "EquipmentSlot", "type" : "slot", "x" : 3, "y" : 3, "width" : 150, "height" : 182, "slot" : ( {"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64}, {"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96}, {"index":EQUIPMENT_START_INDEX+5, "x":114, "y":67, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+6, "x":114, "y":35, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+7, "x":2, "y":145, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+8, "x":75, "y":145, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+9, "x":114, "y":2, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32}, ## »õ ¹ÝÁö1 {"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32}, ## »õ ¹ÝÁö2 {"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32}, ## »õ º§Æ® {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, ), }, ## Dragon Soul Button { "name" : "DSSButton", "type" : "button", "x" : 114, "y" : 107, "tooltip_text" : uiScriptLocale.TASKBAR_DRAGON_SOUL, "default_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_01.tga", "over_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_02.tga", "down_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_03.tga", }, ## MallButton { "name" : "MallButton", "type" : "button", "x" : 118, "y" : 148, "tooltip_text" : uiScriptLocale.MALL_TITLE, "default_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_01.tga", "over_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_02.tga", "down_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_03.tga", }, ## CostumeButton { "name" : "CostumeButton", "type" : "button", "x" : 78, "y" : 5, "tooltip_text" : uiScriptLocale.COSTUME_TITLE, "default_image" : "d:/ymir work/ui/game/costume_button_01.tga", "over_image" : "d:/ymir work/ui/game/costume_button_02.tga", "down_image" : "d:/ymir work/ui/game/costume_button_03.tga", }, { "name" : "Equipment_Tab_01", "type" : "radio_button", "x" : 86, "y" : 161, "default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub", "children" : ( { "name" : "Equipment_Tab_01_Print", "type" : "text", "x" : 0, "y" : 0, "all_align" : "center", "text" : "I", }, ), }, { "name" : "Equipment_Tab_02", "type" : "radio_button", "x" : 86 + 32, "y" : 161, "default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub", "children" : ( { "name" : "Equipment_Tab_02_Print", "type" : "text", "x" : 0, "y" : 0, "all_align" : "center", "text" : "II", }, ), }, ), }, { "name" : "Inventory_Tab_01", "type" : "radio_button", "x" : 10, "y" : 33 + 189, "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_1, "children" : ( { "name" : "Inventory_Tab_01_Print", "type" : "text", "x" : 0, "y" : 0, "all_align" : "center", "text" : "I", }, ), }, { "name" : "Inventory_Tab_02", "type" : "radio_button", "x" : 10 + 78, "y" : 33 + 189, "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2, "children" : ( { "name" : "Inventory_Tab_02_Print", "type" : "text", "x" : 0, "y" : 0, "all_align" : "center", "text" : "II", }, ), }, { "name" : "Inventory_Tab_03", "type" : "radio_button", "x" : 10, "y" : 33 + 210, "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2, "children" : ( { "name" : "Inventory_Tab_03_Print", "type" : "text", "x" : 0, "y" : 0, "all_align" : "center", "text" : "III", }, ), }, { "name" : "Inventory_Tab_04", "type" : "radio_button", "x" : 10 + 78, "y" : 33 + 210, "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2, "children" : ( { "name" : "Inventory_Tab_04_Print", "type" : "text", "x" : 0, "y" : 0, "all_align" : "center", "text" : "IV", }, ), } ## Item Slot { "name" : "ItemSlot", "type" : "grid_table", "x" : 8, "y" : 246, "start_index" : 0, "x_count" : 5, "y_count" : 9, "x_step" : 32, "y_step" : 32, "image" : "d:/ymir work/ui/public/Slot_Base.sub" }, ## Print { "name":"Money_Slot", "type":"button", "x":8, "y":28, "horizontal_align":"center", "vertical_align":"bottom", "default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub", "children" : ( { "name":"Money_Icon", "type":"image", "x":-18, "y":2, "image":"d:/ymir work/ui/game/windows/money_icon.sub", }, { "name" : "Money", "type" : "text", "x" : 3, "y" : 3, "horizontal_align" : "right", "text_horizontal_align" : "right", "text" : "123456789", }, ), }, ), }, ), } If I have to send the files Wow System.py UiInventory.py Exception.py just talk Sorry, my english is google translate “To be humble with superiors is duty, with equals is courtesy, with inferiors is nobility.” Benjamin Franklin Por favor, desative seu AdBlock quando usar meus links de download. Please, disable your AdBlock when use my download links. Me AdBlock On: Adblock Off: Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2424 Posted September 2, 2017 Developer Share Posted September 2, 2017 You have wrote an wrong check for empty inventory space (exchange.cpp)... Spoiler for (i = 0; i < INVENTORY_MAX_NUM / 4; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid1.Put(i, 1, item->GetSize()); } for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid2.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize()); } for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid3.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize()); } for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid4.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize()); } Delete all for cicle and replace it with this cicle for(i = 0 ; i < INVENTORY_MAX_NUM ; i++) { if (! (item = victim->GetInventoryItem (i))) { continue; } if(i < INVENTORY_MAX_NUM/4) { s_grid1.Put(i , 1 , item->GetSize() ); } else if( i < (INVENTORY_MAX_NUM/4) * 2) ) { s_grid2.Put(i - INVENTORY_MAX_NUM/4 , 1 , item->GetSize() ); } else if( i < (INVENTORY_MAX_NUM/4 ) * 3 ) { s_grid3.Put(i - (INVENTORY_MAX_NUM/4*2) , 1 , item->GetSize() ); } else { s_grid4.Put(i - (INVENTORY_MAX_NUM/4*3) , 1 , item->GetSize() ); } } not tested but i think it works fine.. Bye Bye My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Recommended Posts