netmarlis 8 Posted June 8, 2017 Share Posted June 8, 2017 The point is that I can wear the belt, but you can not see it on its slot. She give me bonus but i can see it in the slot , also the inventory belt box is not working... Can anyone give me a hint ? thx 5 1 Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 You need to have the correct belt slot index in inventorywindow.py and make it refresh in RefreshEquipSlotWindow (uiinventory.py). That's what I have: inventorywindow.py { "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}, {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, #belt slot ), }, RefreshEquipSlotWindow (uiinventory.py) def RefreshEquipSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndEquip.SetItemSlot for i in xrange(player.EQUIPMENT_PAGE_COUNT): slotNumber = player.EQUIPMENT_SLOT_START + i itemCount = getItemCount(slotNumber) if itemCount <= 1: itemCount = 0 setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount) if app.ENABLE_NEW_EQUIPMENT_SYSTEM: for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT): slotNumber = player.NEW_EQUIPMENT_SLOT_START + i itemCount = getItemCount(slotNumber) if itemCount <= 1: itemCount = 0 setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount) print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber) Check what you are missing. Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) 9 minutes ago, Den said: You need to have the correct belt slot index in inventorywindow.py and make it refresh in RefreshEquipSlotWindow (uiinventory.py). That's what I have: inventorywindow.py { "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}, {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, #belt slot ), }, RefreshEquipSlotWindow (uiinventory.py) def RefreshEquipSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndEquip.SetItemSlot for i in xrange(player.EQUIPMENT_PAGE_COUNT): slotNumber = player.EQUIPMENT_SLOT_START + i itemCount = getItemCount(slotNumber) if itemCount <= 1: itemCount = 0 setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount) if app.ENABLE_NEW_EQUIPMENT_SYSTEM: for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT): slotNumber = player.NEW_EQUIPMENT_SLOT_START + i itemCount = getItemCount(slotNumber) if itemCount <= 1: itemCount = 0 setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount) print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber) Check what you are missing. inventorywindow.py https://metin2.download/picture/Cc63jycx53LPLJoggs7o3UZQnTDtz5Sk/.png uiinventory.py https://metin2.download/picture/d7lo30hUytaldi3vjuqzzWI645YTG0to/.png All the same Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 (edited) 5 minutes ago, netmarlis said: inventorywindow.py https://metin2.download/picture/QR1MQHvr08X2wFf8TStaeKEQK7dM7uYH/.png uiinventory.py https://metin2.download/picture/BnBThB73o6p2q3bVsnI4VYEMnhY7Nnkz/.png All the same Hm... Check in your binary source if item.EQUIPMENT_BELT equals WEAR_BELT + 180 on server source side. Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 2 minutes ago, Den said: Hm... Check in your binary source if item.EQUIPMENT_BELT equals WEAR_BELT + 180 on server source side. Can you explain in more detail Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 Just now, netmarlis said: Can you explain in more detail common/length.h in server source: enum EWearPositions -> WEAR_BELT My WEAR_BELT is 23. GameType.h in binary source: const DWORD c_Equipment_Belt = c_New_Equipment_Start + 2; //should equal server WEAR_BELT + 180, c_New_Equipment_Start equals 201 so 201+2=203 Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) 13 minutes ago, Den said: common/length.h in server source: enum EWearPositions -> WEAR_BELT My WEAR_BELT is 23. GameType.h in binary source: const DWORD c_Equipment_Belt = c_New_Equipment_Start + 2; //should equal server WEAR_BELT + 180, c_New_Equipment_Start equals 201 so 201+2=203 common/length.h https://metin2.download/picture/nR821M5klLmY2Myv97GVG71Vs0Z82s52/.png GameType.h https://metin2.download/picture/kzVBMr09gWjs9HkylZbPYQ5sMqVNH8Ag/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 (edited) 7 minutes ago, netmarlis said: common/length.h https://metin2.download/picture/l04D7iH0Ej5UD69DbHQQt1a0IYgBIt2m/.png GameType.h https://metin2.download/picture/14DveDn5L3jC2r27JtgO8X5ybmuOB1gB/.png Look, you've inserted WEAR_COSTUME_ACCE before so now WEAR_BELT is 24 not 23. Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 5 minutes ago, Den said: Look, you've inserted WEAR_COSTUME_ACCE before so now WEAR_BELT is 24 not 23. What exactly do i have to do Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 Just now, netmarlis said: What exactly do i have to do The easiest way without touching the sashes is: uiinventory.py (add setItemVNum(204, getItemVNum(204), itemCount)): https://pastebin.com/eXspW58d inventorywindow.py: Instead of {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, write {"index":204, "x":39, "y":106, "width":32, "height":32}, Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) 6 minutes ago, Den said: The easiest way without touching the sashes is: uiinventory.py (add setItemVNum(204, getItemVNum(204), itemCount)): https://pastebin.com/eXspW58d inventorywindow.py: Instead of {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, write {"index":204, "x":39, "y":106, "width":32, "height":32}, uiinventory.py : https://metin2.download/picture/4ayNM5d0oQNn3G3s1j9Q1Y2o8Ediz3Bm/.png inventorywindow.py : https://metin2.download/picture/9t42Ne40TbqFJL8u349nCM6TPE1y6pQj/.png syserr.txt error : 0609 01:01:07877 :: networkModule.py(line:200) SetSelectCharacterPhase system.py(line:134) __pack_import system.py(line:110) _process_result introSelect.py(line:18) <module> system.py(line:134) __pack_import networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiInventory.py, line 751) 0609 01:01:07877 :: ============================================================================================================ 0609 01:01:07878 :: Abort!!!! Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 (edited) 4 minutes ago, netmarlis said: uiinventory.py : https://metin2.download/picture/hBbOEO7WFF8whWNCXq6pQMB1O2MSKfW4/.png inventorywindow.py : https://metin2.download/picture/uti2NCJFS6zp78TtviGrmine3v3Bb7cX/.png syserr.txt error : 0609 01:01:07877 :: networkModule.py(line:200) SetSelectCharacterPhase system.py(line:134) __pack_import system.py(line:110) _process_result introSelect.py(line:18) <module> system.py(line:134) __pack_import networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiInventory.py, line 751) 0609 01:01:07877 :: ============================================================================================================ 0609 01:01:07878 :: Abort!!!! Tabulations and spaces are really important in python. You must be using them properly like that: https://metin2.download/picture/2h45kxpGABk8OMqn482Rl0XicMcEVKqL/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) 10 minutes ago, Den said: Tabulations and spaces are really important in python. You must be using them properly like that: https://metin2.download/picture/2h45kxpGABk8OMqn482Rl0XicMcEVKqL/.png https://metin2.download/picture/yOSnX7L7DzF3Cyq5REiQI9AV9aScBc5L/.png The problem is still continuing :) Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 (edited) 2 minutes ago, netmarlis said: https://metin2.download/picture/5GyX7E1yvy09yPwuwGEM9G9jw0wG7016/.png The problem is still continuing :) Ah, try to set itemCount to 0: setItemVNum(204, getItemVNum(204), 0) #setting belt Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) 2 minutes ago, Den said: Ah, try to set itemCount to 0: setItemVNum(204, getItemVNum(204), 0) #setting belt https://metin2.download/picture/twjG929Y3qT54H5QZDz0S7omdmtq7EWZ/.png Still the same https://metin2.download/picture/s7oZcO0fE858Ug64fvv5WeXZ7lg2Koek/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 (edited) 1 minute ago, netmarlis said: https://metin2.download/picture/zlmKdd2HQm9SyFt23U50X7pSSfZ7W30W/.png Still the same https://metin2.download/picture/Gb2t2zgEHpD5dWi6900ACh15gJFMxI5o/.png Anything in syserr? Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) Just now, Den said: Anything in syserr? https://metin2.download/picture/wWBnqgFw3PO53T7awSNyF0hvNzQ3BQAn/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 (edited) Just now, netmarlis said: https://metin2.download/picture/sPg326Mpb35IS8ekg5FXt0wEl83UTd82/.png Maybe you've edited wrong inventorywindow.py? I have one in uiscript and one in locale/ui. That confused me once so maybe check it. Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) 1 minute ago, Den said: Maybe you've edited wrong inventorywindow.py? I have one in uiscript and one in locale/ui. That confused me once so maybe check it. root = inventorywindow.py https://metin2.download/picture/Q0AgqAMu9MO1cYwDUmOPn5k0Bg5hU9mG/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 (edited) 2 minutes ago, netmarlis said: root = inventorywindow.py https://metin2.download/picture/HlKVCPMI2D5f60HXhyE1MSRPu9j2yMdy/.png locale_xx/xx/ui/inventorywindow.py? Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 8, 2017 Author Share Posted June 8, 2017 (edited) 2 minutes ago, Den said: locale_xx/xx/ui/inventorywindow.py? locale/ui = inventorywindow.py https://metin2.download/picture/Bp4xTUmh1X4GHIr224HE0X0Qm59PDi3z/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Den 46 Posted June 8, 2017 Share Posted June 8, 2017 (edited) 52 minutes ago, netmarlis said: locale/ui = inventorywindow.py https://metin2.download/picture/Bd709umtaAtOQz9RO8LP4jpSbmhO4mTs/.png In uiinventory.py, function def SelectEmptySlot(self, selectedSlotPos), on the top write like this: def SelectEmptySlot(self, selectedSlotPos): chat.AppendChat(chat.CHAT_TYPE_INFO, "select empty slot %d" % selectedSlotPos) if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1: return Then click on belt slot in game and show what you've got on chat. Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 9, 2017 Author Share Posted June 9, 2017 (edited) game syserlog : Jun 9 03:15:00.913284 :: vivoxy: USE_ITEM Keten Kemer +9 (inven 1, cell: 2) Jun 9 03:15:02.72945 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 2) Jun 9 03:15:02.833393 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0) Jun 9 03:15:03.511677 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 0) Jun 9 03:15:04.273109 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0) https://metin2.download/picture/zlmKdd2HQm9SyFt23U50X7pSSfZ7W30W/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Den 46 Posted June 9, 2017 Share Posted June 9, 2017 (edited) 4 minutes ago, netmarlis said: game syserlog : Jun 9 03:15:00.913284 :: vivoxy: USE_ITEM Keten Kemer +9 (inven 1, cell: 2) Jun 9 03:15:02.72945 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 2) Jun 9 03:15:02.833393 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0) Jun 9 03:15:03.511677 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 0) Jun 9 03:15:04.273109 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0) https://metin2.download/picture/zlmKdd2HQm9SyFt23U50X7pSSfZ7W30W/.png But after you click on empty belt slot game chat is showing nothing? Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
netmarlis 8 Posted June 9, 2017 Author Share Posted June 9, 2017 (edited) 1 minute ago, Den said: But after you click on empty belt slot game chat is showing nothing? no :) https://metin2.download/picture/7qYV7Z55w6Oq32uqb76cbC3h6m2ZVFPH/.png 7 minutes ago, Den said: But after you click on empty belt slot game chat is showing nothing? https://metin2.download/picture/9l98PZ4PukJX9CGZeYvH7Tre4aQ31qnl/.png Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 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