Shang 369 Posted July 1, 2016 Share Posted July 1, 2016 1 minute ago, MrLibya said: open your eyes and slotNumber in self.listUnusableSlot: Look at your shit code bro. If the slotnumber isn't in the list and the slot have to be usable? If you delete this: and slotNumber in self.listUnusableSlot: you'll see working anyway. Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted July 1, 2016 Author Premium Share Posted July 1, 2016 1 hour ago, Shang said: Look at your shit code bro. If the slotnumber isn't in the list and the slot have to be usable? If you delete this: and slotNumber in self.listUnusableSlot: you'll see working anyway. yes I know it's going to work , but if u do that u will use the deactive function for all slot's ! If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
ImBacK 8 Posted July 4, 2016 Share Posted July 4, 2016 This is full part for system Spoiler #????? Client bin: In EterPythonLib\PythonSlotWindow.cpp: Function OnRender: This: if (IS_SET(rSlot.dwState, SLOT_STATE_DISABLE)) { CPythonGraphic::Instance().SetDiffuseColor(1.0f, 0.0f, 0.0f, 0.3f); CPythonGraphic::Instance().RenderBar2d(m_rect.left + rSlot.ixPosition, m_rect.top + rSlot.iyPosition, m_rect.left + rSlot.ixPosition + rSlot.ixCellSize, m_rect.top + rSlot.iyPosition + rSlot.iyCellSize); } To: if (IS_SET(rSlot.dwState, SLOT_STATE_DISABLE)) { CPythonGraphic::Instance().SetDiffuseColor(1.0f, 0.0f, 0.0f, 0.3f); CPythonGraphic::Instance().RenderBar2d( m_rect.left + rSlot.ixPosition, m_rect.top + rSlot.iyPosition, m_rect.left + rSlot.ixPosition + rSlot.byxPlacedItemSize * ITEM_WIDTH, m_rect.top + rSlot.iyPosition + rSlot.byyPlacedItemSize * ITEM_HEIGHT); } IF YOU DONT HAVE THIS PyModule_AddIntConstant(poModule, "ANTIFLAG_SAFEBOX", CItemData::ITEM_ANTIFLAG_SAFEBOX); In UserInterface/PythonItemModule.cpp add it under PyModule_AddIntConstant(poModule, "ANTIFLAG_MYSHOP", CItemData::ITEM_ANTIFLAG_MYSHOP); Roots: In constinfo.py add this: avilable = 0 In uiinventory replace this functions: def RefreshBagSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndItem.SetItemSlot for i in xrange(player.INVENTORY_PAGE_SIZE): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) itemCount = getItemCount(slotNumber) # itemCount == 0이면 소켓을 비운다. if 0 == itemCount: self.wndItem.ClearSlot(i) continue elif 1 == itemCount: itemCount = 0 itemVnum = getItemVNum(slotNumber) setItemVNum(i, itemVnum, itemCount) if constInfo.avilable > 0 and constInfo.avilable < 4: self.RefreshBagSlotWindowOnAvilable() ## 자동물약 (HP: #72723 ~ #72726, SP: #72727 ~ #72730) 특수처리 - 아이템인데도 슬롯에 활성화/비활성화 표시를 위한 작업임 - [hyo] if constInfo.IS_AUTO_POTION(itemVnum): # metinSocket - [0] : 활성화 여부, [1] : 사용한 양, [2] : 최대 용량 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(slotNumber) 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(slotNumber) self.wndItem.RefreshSlot() def RefreshStatus(self): import systemSetting money = player.GetElk() self.wndMoney.SetText(localeInfo.NumberToMoneyString(money)) if constInfo.avilable == 4: self.RefreshBagSlotWindow() constInfo.avilable = 0 And add under it this functions: def RefreshBagSlotWindowOnAvilable(self): getItemVNum=player.GetItemIndex for i in xrange(player.INVENTORY_PAGE_SIZE): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) itemVnum = getItemVNum(slotNumber) if constInfo.avilable == 1: if 0 != itemVnum: item.SelectItem(itemVnum) if item.IsAntiFlag(item.ANTIFLAG_GIVE): self.wndItem.DisableSlot(i) if constInfo.avilable == 2: if 0 != itemVnum: item.SelectItem(itemVnum) if item.IsAntiFlag(item.ANTIFLAG_SAFEBOX): self.wndItem.DisableSlot(i) if constInfo.avilable == 3: if 0 != itemVnum: item.SelectItem(itemVnum) if item.IsAntiFlag(item.ANTIFLAG_MYSHOP): self.wndItem.DisableSlot(i) self.wndItem.RefreshSlot() if self.wndBelt: self.wndBelt.RefreshSlot() def CheckAvilableExchange(self): constInfo.avilable = 1 self.RefreshBagSlotWindowOnAvilable() self.RefreshBagSlotWindow() def CheckAvilableSafebox(self): constInfo.avilable = 2 self.RefreshBagSlotWindowOnAvilable() def CheckAvilableShop(self): constInfo.avilable = 3 self.RefreshBagSlotWindowOnAvilable() def DisturbCheckAvilable(self): constInfo.avilable = 0 self.RefreshBagSlotWindow() In interfacemodule.py In function: def OpenPrivateShopBuilder(self): Under: self.ClosePrivateShopInputNameDialog() Add this: self.wndInventory.CheckAvilableShop() Replace this functions: def StartExchange(self): self.dlgExchange.OpenDialog() self.dlgExchange.Refresh() self.wndInventory.CheckAvilableExchange() def EndExchange(self): self.dlgExchange.CloseDialog() self.wndInventory.DisturbCheckAvilable() def OpenSafeboxWindow(self, size): self.dlgPassword.CloseDialog() self.wndSafebox.ShowWindow(size) self.wndInventory.CheckAvilableSafebox() def CommandCloseSafebox(self): self.wndSafebox.CommandCloseSafebox() self.wndInventory.DisturbCheckAvilable() Open uiprivateshopbuilder.py Under this: import grp Add this: import constInfo And replace that function: def OnClose(self): constInfo.avilable = 4 self.Close() Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19680 Posted July 4, 2016 Honorable Member Share Posted July 4, 2016 Hahahah, no. Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted July 4, 2016 Author Premium Share Posted July 4, 2016 3 hours ago, ImBacK said: This is full part for system Reveal hidden contents #????? Client bin: In EterPythonLib\PythonSlotWindow.cpp: Function OnRender: This: if (IS_SET(rSlot.dwState, SLOT_STATE_DISABLE)) { CPythonGraphic::Instance().SetDiffuseColor(1.0f, 0.0f, 0.0f, 0.3f); CPythonGraphic::Instance().RenderBar2d(m_rect.left + rSlot.ixPosition, m_rect.top + rSlot.iyPosition, m_rect.left + rSlot.ixPosition + rSlot.ixCellSize, m_rect.top + rSlot.iyPosition + rSlot.iyCellSize); } To: if (IS_SET(rSlot.dwState, SLOT_STATE_DISABLE)) { CPythonGraphic::Instance().SetDiffuseColor(1.0f, 0.0f, 0.0f, 0.3f); CPythonGraphic::Instance().RenderBar2d( m_rect.left + rSlot.ixPosition, m_rect.top + rSlot.iyPosition, m_rect.left + rSlot.ixPosition + rSlot.byxPlacedItemSize * ITEM_WIDTH, m_rect.top + rSlot.iyPosition + rSlot.byyPlacedItemSize * ITEM_HEIGHT); } IF YOU DONT HAVE THIS PyModule_AddIntConstant(poModule, "ANTIFLAG_SAFEBOX", CItemData::ITEM_ANTIFLAG_SAFEBOX); In UserInterface/PythonItemModule.cpp add it under PyModule_AddIntConstant(poModule, "ANTIFLAG_MYSHOP", CItemData::ITEM_ANTIFLAG_MYSHOP); Roots: In constinfo.py add this: avilable = 0 In uiinventory replace this functions: def RefreshBagSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndItem.SetItemSlot for i in xrange(player.INVENTORY_PAGE_SIZE): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) itemCount = getItemCount(slotNumber) # itemCount == 0이면 소켓을 비운다. if 0 == itemCount: self.wndItem.ClearSlot(i) continue elif 1 == itemCount: itemCount = 0 itemVnum = getItemVNum(slotNumber) setItemVNum(i, itemVnum, itemCount) if constInfo.avilable > 0 and constInfo.avilable < 4: self.RefreshBagSlotWindowOnAvilable() ## 자동물약 (HP: #72723 ~ #72726, SP: #72727 ~ #72730) 특수처리 - 아이템인데도 슬롯에 활성화/비활성화 표시를 위한 작업임 - [hyo] if constInfo.IS_AUTO_POTION(itemVnum): # metinSocket - [0] : 활성화 여부, [1] : 사용한 양, [2] : 최대 용량 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(slotNumber) 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(slotNumber) self.wndItem.RefreshSlot() def RefreshStatus(self): import systemSetting money = player.GetElk() self.wndMoney.SetText(localeInfo.NumberToMoneyString(money)) if constInfo.avilable == 4: self.RefreshBagSlotWindow() constInfo.avilable = 0 And add under it this functions: def RefreshBagSlotWindowOnAvilable(self): getItemVNum=player.GetItemIndex for i in xrange(player.INVENTORY_PAGE_SIZE): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) itemVnum = getItemVNum(slotNumber) if constInfo.avilable == 1: if 0 != itemVnum: item.SelectItem(itemVnum) if item.IsAntiFlag(item.ANTIFLAG_GIVE): self.wndItem.DisableSlot(i) if constInfo.avilable == 2: if 0 != itemVnum: item.SelectItem(itemVnum) if item.IsAntiFlag(item.ANTIFLAG_SAFEBOX): self.wndItem.DisableSlot(i) if constInfo.avilable == 3: if 0 != itemVnum: item.SelectItem(itemVnum) if item.IsAntiFlag(item.ANTIFLAG_MYSHOP): self.wndItem.DisableSlot(i) self.wndItem.RefreshSlot() if self.wndBelt: self.wndBelt.RefreshSlot() def CheckAvilableExchange(self): constInfo.avilable = 1 self.RefreshBagSlotWindowOnAvilable() self.RefreshBagSlotWindow() def CheckAvilableSafebox(self): constInfo.avilable = 2 self.RefreshBagSlotWindowOnAvilable() def CheckAvilableShop(self): constInfo.avilable = 3 self.RefreshBagSlotWindowOnAvilable() def DisturbCheckAvilable(self): constInfo.avilable = 0 self.RefreshBagSlotWindow() In interfacemodule.py In function: def OpenPrivateShopBuilder(self): Under: self.ClosePrivateShopInputNameDialog() Add this: self.wndInventory.CheckAvilableShop() Replace this functions: def StartExchange(self): self.dlgExchange.OpenDialog() self.dlgExchange.Refresh() self.wndInventory.CheckAvilableExchange() def EndExchange(self): self.dlgExchange.CloseDialog() self.wndInventory.DisturbCheckAvilable() def OpenSafeboxWindow(self, size): self.dlgPassword.CloseDialog() self.wndSafebox.ShowWindow(size) self.wndInventory.CheckAvilableSafebox() def CommandCloseSafebox(self): self.wndSafebox.CommandCloseSafebox() self.wndInventory.DisturbCheckAvilable() Open uiprivateshopbuilder.py Under this: import grp Add this: import constInfo And replace that function: def OnClose(self): constInfo.avilable = 4 self.Close() wtf ahah , just stop it u killing the python 1 If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
VegaS 1087 Posted July 4, 2016 Share Posted July 4, 2016 57 minutes ago, MrLibya said: wtf ahah , just stop it u killing the python Is not from him this *code* :)) Is from this guy shit, fcking shit sell -->> https://metin2dev.org/board/index.php?/topic/7935-selluntratable-items-shown-searching-items-in-shops/ 1 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted July 15, 2016 Active Member Share Posted July 15, 2016 Hey guys Gr8 tut friend thank you and thanks to all the guys who commented and made it work. So I tried to create other python functions in uiInventory.py out of the functions you gave because I want this effect for ANTIFLAG_SELL, ANTIFLAG_MYSHOP and ANTIFLAG_SAVE but without any success... Here is my def: Spoiler import shop import safebox def RefreshBagSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndItem.SetItemSlot for i in xrange(player.INVENTORY_PAGE_SIZE): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) itemCount = getItemCount(slotNumber) # itemCount == 0이면 소켓을 비운다. if 0 == itemCount: self.wndItem.ClearSlot(i) continue elif 1 == itemCount: itemCount = 0 itemVnum = getItemVNum(slotNumber) setItemVNum(i, itemVnum, itemCount) if exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE): self.wndItem.SetUnusableSlot(i) self.listUnusableSlot.append(i) elif not exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE) and slotNumber in self.listUnusableSlot: self.wndItem.SetUsableSlot(i) self.listUnusableSlot.remove(i) if shop.isShopping() and item.IsAntiFlag(item.ANTIFLAG_SELL): self.wndItem.SetUnusableSlot(i) self.listUnusableSlot.append(i) elif not shop.isShopping() and item.IsAntiFlag(item.ANTIFLAG_SELL) and slotNumber in self.listUnusableSlot: self.wndItem.SetUsableSlot(i) self.listUnusableSlot.remove(i) if shop.isPrivateShop() and item.IsAntiFlag(item.ANTIFLAG_MYSHOP): self.wndItem.SetUnusableSlot(i) self.listUnusableSlot.append(i) elif not shop.isPrivateShop() and item.IsAntiFlag(item.ANTIFLAG_MYSHOP) and slotNumber in self.listUnusableSlot: self.wndItem.SetUsableSlot(i) self.listUnusableSlot.remove(i) if safebox.ItemInstanceVector() and item.IsAntiFlag(item.ANTIFLAG_SAVE): self.wndItem.SetUnusableSlot(i) self.listUnusableSlot.append(i) elif not safebox.ItemInstanceVector() and item.IsAntiFlag(item.ANTIFLAG_SAVE) and slotNumber in self.listUnusableSlot: self.wndItem.SetUsableSlot(i) self.listUnusableSlot.remove(i) And here is my syserr: Spoiler 0715 03:47:19619 :: Traceback (most recent call last): 0715 03:47:19619 :: File "networkModule.py", line 247, in SetGamePhase 0715 03:47:19620 :: File "game.py", line 101, in __init__ 0715 03:47:19620 :: File "interfaceModule.py", line 289, in MakeInterface 0715 03:47:19620 :: File "interfaceModule.py", line 173, in __MakeWindows 0715 03:47:19620 :: File "uiInventory.py", line 263, in __init__ 0715 03:47:19620 :: File "uiInventory.py", line 404, in __LoadWindow 0715 03:47:19620 :: File "uiInventory.py", line 471, in SetInventoryPage 0715 03:47:19620 :: File "uiInventory.py", line 574, in RefreshBagSlotWindow 0715 03:47:19620 :: NameError 0715 03:47:19620 :: : 0715 03:47:19620 :: global name 'safebox' is not defined 0715 03:47:19620 :: Thank you in advance Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted July 17, 2016 Active Member Share Posted July 17, 2016 #KUSH Link to comment Share on other sites More sharing options...
Premium TAUMP 839 Posted July 18, 2016 Premium Share Posted July 18, 2016 20 hours ago, Mind Rapist said: #KUSH define safebox? Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted July 18, 2016 Active Member Share Posted July 18, 2016 3 hours ago, .T4Ump said: define safebox? Well I don't know what else to do I compared the way exchange was working on this from the source and I did the same for shop and safebox... And I imported safebox, shop... Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 21, 2016 Active Member Share Posted August 21, 2016 On 1/7/2016 at 11:09 PM, MrLibya said: player.IsOpenPrivateShop() and item.IsAntiFlag(item.ANTIFLAG_MYSHOP It's actually Spoiler uiPrivateShopBuilder.g_isBuildingPrivateShop() and item.IsAntiFlag(item.ANTIFLAG_MYSHOP) and I've tried it but when I close the private shop the effect is still on. When I move an item to another slot the effect goes off but it should go off imediately after closing private shop building state. Can someone help please? Link to comment Share on other sites More sharing options...
safademirel 289 Posted August 21, 2016 Share Posted August 21, 2016 (edited) 26 minutes ago, Mind Rapist said: It's actually Hide contents uiPrivateShopBuilder.g_isBuildingPrivateShop() and item.IsAntiFlag(item.ANTIFLAG_MYSHOP) and I've tried it but when I close the private shop the effect is still on. When I move an item to another slot the effect goes off but it should go off imediately after closing private shop building state. Can someone help please? PythonShop.cpp search PyObject * shopGetTabCount(PyObject * poSelf, PyObject * poArgs) { return Py_BuildValue("i", CPythonShop::instance().GetTabCount()); } add PyObject * shopRefreshSafa(PyObject * poSelf, PyObject * poArgs) { CPythonNetworkStream::Instance().__RefreshInventoryWindow(); return Py_BuildNone(); } search { "GetTabCoinType", shopGetTabCoinType, METH_VARARGS }, add { "RefreshInventorySafa", shopRefreshSafa, METH_VARARGS }, PythonNetworkStream.h change __RefreshInventoryWindow() and REFRESH_WINDOW_TYPE to public uiprivateshopbuilder.py find def Open(self, title,days): add shop.RefreshInventorySafa() find def OnClose(self): add shop.RefreshInventorySafa() Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 21, 2016 Active Member Share Posted August 21, 2016 (edited) 18 minutes ago, safademirel said: PythonShop.cpp search PyObject * shopGetTabCount(PyObject * poSelf, PyObject * poArgs) { return Py_BuildValue("i", CPythonShop::instance().GetTabCount()); } add PyObject * shopRefreshSafa(PyObject * poSelf, PyObject * poArgs) { CPythonNetworkStream::Instance().__RefreshInventoryWindow(); return Py_BuildNone(); } search { "GetTabCoinType", shopGetTabCoinType, METH_VARARGS }, add { "RefreshInventorySafa", shopRefreshSafa, METH_VARARGS }, PythonNetworkStream.h change __RefreshInventoryWindow() and REFRESH_WINDOW_TYPE to public uiprivateshopbuilder.py find def Open(self, title,days): add shop.RefreshInventorySafa() find def OnClose(self): add shop.RefreshInventorySafa() Hey dude thanks so much but I got this Spoiler 0821 13:33:59155 :: Traceback (most recent call last): 0821 13:33:59155 :: File "ui.py", line 87, in __call__ 0821 13:33:59155 :: File "ui.py", line 69, in __call__ 0821 13:33:59155 :: File "interfaceModule.py", line 1281, in OpenPrivateShopBuilder 0821 13:33:59155 :: File "uiPrivateShopBuilder.py", line 183, in Open 0821 13:33:59155 :: AttributeError 0821 13:33:59155 :: : 0821 13:33:59155 :: 'PrivateShopBuilder' object has no attribute 'RefreshInventorySafa' 0821 13:33:59155 :: 0821 13:33:59156 :: Traceback (most recent call last): 0821 13:33:59156 :: File "ui.py", line 87, in __call__ 0821 13:33:59156 :: File "ui.py", line 69, in __call__ 0821 13:33:59156 :: File "interfaceModule.py", line 1281, in OpenPrivateShopBuilder 0821 13:33:59156 :: File "uiPrivateShopBuilder.py", line 183, in Open 0821 13:33:59156 :: AttributeError 0821 13:33:59156 :: : 0821 13:33:59156 :: 'PrivateShopBuilder' object has no attribute 'RefreshInventorySafa' 0821 13:33:59156 :: Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
safademirel 289 Posted August 21, 2016 Share Posted August 21, 2016 12 minutes ago, Mind Rapist said: Hey dude thanks so much but I got this Hide contents 0821 13:33:59155 :: Traceback (most recent call last): 0821 13:33:59155 :: File "ui.py", line 87, in __call__ 0821 13:33:59155 :: File "ui.py", line 69, in __call__ 0821 13:33:59155 :: File "interfaceModule.py", line 1281, in OpenPrivateShopBuilder 0821 13:33:59155 :: File "uiPrivateShopBuilder.py", line 183, in Open 0821 13:33:59155 :: AttributeError 0821 13:33:59155 :: : 0821 13:33:59155 :: 'PrivateShopBuilder' object has no attribute 'RefreshInventorySafa' 0821 13:33:59155 :: 0821 13:33:59156 :: Traceback (most recent call last): 0821 13:33:59156 :: File "ui.py", line 87, in __call__ 0821 13:33:59156 :: File "ui.py", line 69, in __call__ 0821 13:33:59156 :: File "interfaceModule.py", line 1281, in OpenPrivateShopBuilder 0821 13:33:59156 :: File "uiPrivateShopBuilder.py", line 183, in Open 0821 13:33:59156 :: AttributeError 0821 13:33:59156 :: : 0821 13:33:59156 :: 'PrivateShopBuilder' object has no attribute 'RefreshInventorySafa' 0821 13:33:59156 :: can you show me your uiPrivateShopBuilder.py Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 21, 2016 Active Member Share Posted August 21, 2016 @safademirel Here Spoiler import ui import snd import shop import mouseModule import player import chr import net import uiCommon import localeInfo import chat import item import systemSetting #김준호 import player #김준호 import app g_isBuildingPrivateShop = FALSE g_itemPriceDict={} g_privateShopAdvertisementBoardDict={} def Clear(): global g_itemPriceDict global g_isBuildingPrivateShop g_itemPriceDict={} g_isBuildingPrivateShop = FALSE def IsPrivateShopItemPriceList(): global g_itemPriceDict if g_itemPriceDict: return TRUE else: return FALSE def IsBuildingPrivateShop(): global g_isBuildingPrivateShop if player.IsOpenPrivateShop() or g_isBuildingPrivateShop: return TRUE else: return FALSE def SetPrivateShopItemPrice(itemVNum, itemPrice): global g_itemPriceDict g_itemPriceDict[int(itemVNum)]=itemPrice def GetPrivateShopItemPrice(itemVNum): try: global g_itemPriceDict return g_itemPriceDict[itemVNum] except KeyError: return 0 def UpdateADBoard(): for key in g_privateShopAdvertisementBoardDict.keys(): g_privateShopAdvertisementBoardDict[key].Show() def DeleteADBoard(vid): if not g_privateShopAdvertisementBoardDict.has_key(vid): return del g_privateShopAdvertisementBoardDict[vid] class PrivateShopAdvertisementBoard(ui.ThinBoard): def __init__(self): ui.ThinBoard.__init__(self, "UI_BOTTOM") self.vid = None self.__MakeTextLine() def __del__(self): ui.ThinBoard.__del__(self) def __MakeTextLine(self): self.textLine = ui.TextLine() self.textLine.SetParent(self) self.textLine.SetWindowHorizontalAlignCenter() self.textLine.SetWindowVerticalAlignCenter() self.textLine.SetHorizontalAlignCenter() self.textLine.SetVerticalAlignCenter() self.textLine.Show() def Open(self, vid, text): self.vid = vid self.textLine.SetText(text) self.textLine.UpdateRect() self.SetSize(len(text)*6 + 10*2, 20) self.Show() g_privateShopAdvertisementBoardDict[vid] = self def OnMouseLeftButtonUp(self): if not self.vid: return net.SendOnClickPacket(self.vid) return TRUE def OnUpdate(self): if not self.vid: return if systemSetting.IsShowSalesText(): self.Show() x, y = chr.GetProjectPosition(self.vid, 220) self.SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2) else: for key in g_privateShopAdvertisementBoardDict.keys(): if player.GetMainCharacterIndex() == key: #상점풍선을 안보이게 감추는 경우에도, 플레이어 자신의 상점 풍선은 보이도록 함. by 김준호 g_privateShopAdvertisementBoardDict[key].Show() x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220) g_privateShopAdvertisementBoardDict[key].SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2) else: g_privateShopAdvertisementBoardDict[key].Hide() class PrivateShopBuilder(ui.ScriptWindow): def __init__(self): #print "NEW MAKE_PRIVATE_SHOP_WINDOW ----------------------------------------------------------------" ui.ScriptWindow.__init__(self) self.__LoadWindow() self.itemStock = {} self.tooltipItem = None self.priceInputBoard = None self.title = "" def __del__(self): #print "------------------------------------------------------------- DELETE MAKE_PRIVATE_SHOP_WINDOW" ui.ScriptWindow.__del__(self) def __LoadWindow(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/PrivateShopBuilder.py") except: import exception exception.Abort("PrivateShopBuilderWindow.LoadWindow.LoadObject") try: GetObject = self.GetChild self.nameLine = GetObject("NameLine") self.itemSlot = GetObject("ItemSlot") self.btnOk = GetObject("OkButton") self.btnClose = GetObject("CloseButton") self.titleBar = GetObject("TitleBar") except: import exception exception.Abort("PrivateShopBuilderWindow.LoadWindow.BindObject") self.btnOk.SetEvent(ui.__mem_func__(self.OnOk)) self.btnClose.SetEvent(ui.__mem_func__(self.OnClose)) self.titleBar.SetCloseEvent(ui.__mem_func__(self.OnClose)) self.itemSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.OnSelectEmptySlot)) self.itemSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.OnSelectItemSlot)) self.itemSlot.SetOverInItemEvent(ui.__mem_func__(self.OnOverInItem)) self.itemSlot.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem)) def Destroy(self): self.ClearDictionary() self.nameLine = None self.itemSlot = None self.btnOk = None self.btnClose = None self.titleBar = None self.priceInputBoard = None def Open(self, title): self.title = title if len(title) > 25: title = title[:22] + "..." self.itemStock = {} shop.ClearPrivateShopStock() self.nameLine.SetText(title) self.SetCenterPosition() self.Refresh() self.Show() self.RefreshInventorySafa() global g_isBuildingPrivateShop g_isBuildingPrivateShop = TRUE def Close(self): global g_isBuildingPrivateShop g_isBuildingPrivateShop = FALSE self.title = "" self.itemStock = {} shop.ClearPrivateShopStock() self.Hide() def SetItemToolTip(self, tooltipItem): self.tooltipItem = tooltipItem def Refresh(self): getitemVNum=player.GetItemIndex getItemCount=player.GetItemCount setitemVNum=self.itemSlot.SetItemSlot delItem=self.itemSlot.ClearSlot for i in xrange(shop.SHOP_SLOT_COUNT): if not self.itemStock.has_key(i): delItem(i) continue pos = self.itemStock itemCount = getItemCount(*pos) if itemCount <= 1: itemCount = 0 setitemVNum(i, getitemVNum(*pos), itemCount) self.itemSlot.RefreshSlot() 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 and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedSlotType: return attachedInvenType = player.SlotTypeToInvenType(attachedSlotType) itemVNum = player.GetItemIndex(attachedInvenType, attachedSlotPos) item.SelectItem(itemVNum) if item.IsAntiFlag(item.ANTIFLAG_GIVE) or item.IsAntiFlag(item.ANTIFLAG_MYSHOP): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.PRIVATE_SHOP_CANNOT_SELL_ITEM) return priceInputBoard = uiCommon.MoneyInputDialog() priceInputBoard.SetTitle(localeInfo.PRIVATE_SHOP_INPUT_PRICE_DIALOG_TITLE) priceInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputPrice)) priceInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputPrice)) priceInputBoard.Open() itemPrice=GetPrivateShopItemPrice(itemVNum) if itemPrice>0: priceInputBoard.SetValue(itemPrice) self.priceInputBoard = priceInputBoard self.priceInputBoard.itemVNum = itemVNum self.priceInputBoard.sourceWindowType = attachedInvenType self.priceInputBoard.sourceSlotPos = attachedSlotPos self.priceInputBoard.targetSlotPos = selectedSlotPos def OnSelectItemSlot(self, selectedSlotPos): isAttached = mouseModule.mouseController.isAttached() if isAttached: snd.PlaySound("sound/ui/loginfail.wav") mouseModule.mouseController.DeattachObject() else: if not selectedSlotPos in self.itemStock: return invenType, invenPos = self.itemStock[selectedSlotPos] shop.DelPrivateShopItemStock(invenType, invenPos) snd.PlaySound("sound/ui/drop.wav") del self.itemStock[selectedSlotPos] self.Refresh() def AcceptInputPrice(self): if not self.priceInputBoard: return TRUE text = self.priceInputBoard.GetText() if not text: return TRUE if not text.isdigit(): return TRUE if long(text) <= 0: return TRUE attachedInvenType = self.priceInputBoard.sourceWindowType sourceSlotPos = self.priceInputBoard.sourceSlotPos targetSlotPos = self.priceInputBoard.targetSlotPos for privatePos, (itemWindowType, itemSlotIndex) in self.itemStock.items(): if itemWindowType == attachedInvenType and itemSlotIndex == sourceSlotPos: shop.DelPrivateShopItemStock(itemWindowType, itemSlotIndex) del self.itemStock[privatePos] price = int(self.priceInputBoard.GetText()) if IsPrivateShopItemPriceList(): SetPrivateShopItemPrice(self.priceInputBoard.itemVNum, price) shop.AddPrivateShopItemStock(attachedInvenType, sourceSlotPos, targetSlotPos, price) self.itemStock[targetSlotPos] = (attachedInvenType, sourceSlotPos) snd.PlaySound("sound/ui/drop.wav") self.Refresh() ##### self.priceInputBoard = None return TRUE def CancelInputPrice(self): self.priceInputBoard = None return TRUE def OnOk(self): if not self.title: return if 0 == len(self.itemStock): return shop.BuildPrivateShop(self.title) self.Close() def OnClose(self): self.RefreshInventorySafa() self.Close() def OnPressEscapeKey(self): self.Close() return TRUE def OnOverInItem(self, slotIndex): if self.tooltipItem: if self.itemStock.has_key(slotIndex): self.tooltipItem.SetPrivateShopBuilderItem(*self.itemStock[slotIndex] + (slotIndex,)) def OnOverOutItem(self): if self.tooltipItem: self.tooltipItem.HideToolTip() Thanks Link to comment Share on other sites More sharing options...
safademirel 289 Posted August 21, 2016 Share Posted August 21, 2016 13 minutes ago, Mind Rapist said: @safademirel Here Hide contents import ui import snd import shop import mouseModule import player import chr import net import uiCommon import localeInfo import chat import item import systemSetting #김준호 import player #김준호 import app g_isBuildingPrivateShop = FALSE g_itemPriceDict={} g_privateShopAdvertisementBoardDict={} def Clear(): global g_itemPriceDict global g_isBuildingPrivateShop g_itemPriceDict={} g_isBuildingPrivateShop = FALSE def IsPrivateShopItemPriceList(): global g_itemPriceDict if g_itemPriceDict: return TRUE else: return FALSE def IsBuildingPrivateShop(): global g_isBuildingPrivateShop if player.IsOpenPrivateShop() or g_isBuildingPrivateShop: return TRUE else: return FALSE def SetPrivateShopItemPrice(itemVNum, itemPrice): global g_itemPriceDict g_itemPriceDict[int(itemVNum)]=itemPrice def GetPrivateShopItemPrice(itemVNum): try: global g_itemPriceDict return g_itemPriceDict[itemVNum] except KeyError: return 0 def UpdateADBoard(): for key in g_privateShopAdvertisementBoardDict.keys(): g_privateShopAdvertisementBoardDict[key].Show() def DeleteADBoard(vid): if not g_privateShopAdvertisementBoardDict.has_key(vid): return del g_privateShopAdvertisementBoardDict[vid] class PrivateShopAdvertisementBoard(ui.ThinBoard): def __init__(self): ui.ThinBoard.__init__(self, "UI_BOTTOM") self.vid = None self.__MakeTextLine() def __del__(self): ui.ThinBoard.__del__(self) def __MakeTextLine(self): self.textLine = ui.TextLine() self.textLine.SetParent(self) self.textLine.SetWindowHorizontalAlignCenter() self.textLine.SetWindowVerticalAlignCenter() self.textLine.SetHorizontalAlignCenter() self.textLine.SetVerticalAlignCenter() self.textLine.Show() def Open(self, vid, text): self.vid = vid self.textLine.SetText(text) self.textLine.UpdateRect() self.SetSize(len(text)*6 + 10*2, 20) self.Show() g_privateShopAdvertisementBoardDict[vid] = self def OnMouseLeftButtonUp(self): if not self.vid: return net.SendOnClickPacket(self.vid) return TRUE def OnUpdate(self): if not self.vid: return if systemSetting.IsShowSalesText(): self.Show() x, y = chr.GetProjectPosition(self.vid, 220) self.SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2) else: for key in g_privateShopAdvertisementBoardDict.keys(): if player.GetMainCharacterIndex() == key: #상점풍선을 안보이게 감추는 경우에도, 플레이어 자신의 상점 풍선은 보이도록 함. by 김준호 g_privateShopAdvertisementBoardDict[key].Show() x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220) g_privateShopAdvertisementBoardDict[key].SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2) else: g_privateShopAdvertisementBoardDict[key].Hide() class PrivateShopBuilder(ui.ScriptWindow): def __init__(self): #print "NEW MAKE_PRIVATE_SHOP_WINDOW ----------------------------------------------------------------" ui.ScriptWindow.__init__(self) self.__LoadWindow() self.itemStock = {} self.tooltipItem = None self.priceInputBoard = None self.title = "" def __del__(self): #print "------------------------------------------------------------- DELETE MAKE_PRIVATE_SHOP_WINDOW" ui.ScriptWindow.__del__(self) def __LoadWindow(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/PrivateShopBuilder.py") except: import exception exception.Abort("PrivateShopBuilderWindow.LoadWindow.LoadObject") try: GetObject = self.GetChild self.nameLine = GetObject("NameLine") self.itemSlot = GetObject("ItemSlot") self.btnOk = GetObject("OkButton") self.btnClose = GetObject("CloseButton") self.titleBar = GetObject("TitleBar") except: import exception exception.Abort("PrivateShopBuilderWindow.LoadWindow.BindObject") self.btnOk.SetEvent(ui.__mem_func__(self.OnOk)) self.btnClose.SetEvent(ui.__mem_func__(self.OnClose)) self.titleBar.SetCloseEvent(ui.__mem_func__(self.OnClose)) self.itemSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.OnSelectEmptySlot)) self.itemSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.OnSelectItemSlot)) self.itemSlot.SetOverInItemEvent(ui.__mem_func__(self.OnOverInItem)) self.itemSlot.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem)) def Destroy(self): self.ClearDictionary() self.nameLine = None self.itemSlot = None self.btnOk = None self.btnClose = None self.titleBar = None self.priceInputBoard = None def Open(self, title): self.title = title if len(title) > 25: title = title[:22] + "..." self.itemStock = {} shop.ClearPrivateShopStock() self.nameLine.SetText(title) self.SetCenterPosition() self.Refresh() self.Show() self.RefreshInventorySafa() global g_isBuildingPrivateShop g_isBuildingPrivateShop = TRUE def Close(self): global g_isBuildingPrivateShop g_isBuildingPrivateShop = FALSE self.title = "" self.itemStock = {} shop.ClearPrivateShopStock() self.Hide() def SetItemToolTip(self, tooltipItem): self.tooltipItem = tooltipItem def Refresh(self): getitemVNum=player.GetItemIndex getItemCount=player.GetItemCount setitemVNum=self.itemSlot.SetItemSlot delItem=self.itemSlot.ClearSlot for i in xrange(shop.SHOP_SLOT_COUNT): if not self.itemStock.has_key(i): delItem(i) continue pos = self.itemStock itemCount = getItemCount(*pos) if itemCount <= 1: itemCount = 0 setitemVNum(i, getitemVNum(*pos), itemCount) self.itemSlot.RefreshSlot() 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 and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedSlotType: return attachedInvenType = player.SlotTypeToInvenType(attachedSlotType) itemVNum = player.GetItemIndex(attachedInvenType, attachedSlotPos) item.SelectItem(itemVNum) if item.IsAntiFlag(item.ANTIFLAG_GIVE) or item.IsAntiFlag(item.ANTIFLAG_MYSHOP): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.PRIVATE_SHOP_CANNOT_SELL_ITEM) return priceInputBoard = uiCommon.MoneyInputDialog() priceInputBoard.SetTitle(localeInfo.PRIVATE_SHOP_INPUT_PRICE_DIALOG_TITLE) priceInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputPrice)) priceInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputPrice)) priceInputBoard.Open() itemPrice=GetPrivateShopItemPrice(itemVNum) if itemPrice>0: priceInputBoard.SetValue(itemPrice) self.priceInputBoard = priceInputBoard self.priceInputBoard.itemVNum = itemVNum self.priceInputBoard.sourceWindowType = attachedInvenType self.priceInputBoard.sourceSlotPos = attachedSlotPos self.priceInputBoard.targetSlotPos = selectedSlotPos def OnSelectItemSlot(self, selectedSlotPos): isAttached = mouseModule.mouseController.isAttached() if isAttached: snd.PlaySound("sound/ui/loginfail.wav") mouseModule.mouseController.DeattachObject() else: if not selectedSlotPos in self.itemStock: return invenType, invenPos = self.itemStock[selectedSlotPos] shop.DelPrivateShopItemStock(invenType, invenPos) snd.PlaySound("sound/ui/drop.wav") del self.itemStock[selectedSlotPos] self.Refresh() def AcceptInputPrice(self): if not self.priceInputBoard: return TRUE text = self.priceInputBoard.GetText() if not text: return TRUE if not text.isdigit(): return TRUE if long(text) <= 0: return TRUE attachedInvenType = self.priceInputBoard.sourceWindowType sourceSlotPos = self.priceInputBoard.sourceSlotPos targetSlotPos = self.priceInputBoard.targetSlotPos for privatePos, (itemWindowType, itemSlotIndex) in self.itemStock.items(): if itemWindowType == attachedInvenType and itemSlotIndex == sourceSlotPos: shop.DelPrivateShopItemStock(itemWindowType, itemSlotIndex) del self.itemStock[privatePos] price = int(self.priceInputBoard.GetText()) if IsPrivateShopItemPriceList(): SetPrivateShopItemPrice(self.priceInputBoard.itemVNum, price) shop.AddPrivateShopItemStock(attachedInvenType, sourceSlotPos, targetSlotPos, price) self.itemStock[targetSlotPos] = (attachedInvenType, sourceSlotPos) snd.PlaySound("sound/ui/drop.wav") self.Refresh() ##### self.priceInputBoard = None return TRUE def CancelInputPrice(self): self.priceInputBoard = None return TRUE def OnOk(self): if not self.title: return if 0 == len(self.itemStock): return shop.BuildPrivateShop(self.title) self.Close() def OnClose(self): self.RefreshInventorySafa() self.Close() def OnPressEscapeKey(self): self.Close() return TRUE def OnOverInItem(self, slotIndex): if self.tooltipItem: if self.itemStock.has_key(slotIndex): self.tooltipItem.SetPrivateShopBuilderItem(*self.itemStock[slotIndex] + (slotIndex,)) def OnOverOutItem(self): if self.tooltipItem: self.tooltipItem.HideToolTip() Thanks def OnClose(self): and def Open(self, title): self.RefreshInventorySafa() change this to shop.RefreshInventorySafa() You added it wrong Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 21, 2016 Active Member Share Posted August 21, 2016 3 minutes ago, safademirel said: def OnClose(self): and def Open(self, title): self.RefreshInventorySafa() change this to shop.RefreshInventorySafa() You added it wrong OMG kill me sorry for this xD Thanks so much dude you are awesome Btw, if I do that shop.RefreshInventorySafa() in def Open/Close at uiShop.py and modify properly uiInventory.py will this work as well? Link to comment Share on other sites More sharing options...
safademirel 289 Posted August 21, 2016 Share Posted August 21, 2016 (edited) 3 minutes ago, Mind Rapist said: OMG kill me sorry for this xD Thanks so much dude you are awesome Btw, if I do that shop.RefreshInventorySafa() in def Open/Close at uiShop.py and modify properly uiInventory.py will this work as well? Yeah it should work or if it didnt work try like this. PythonNetworkStreamPhaseGame.cpp case SHOP_SUBHEADER_GC_START: add __RefreshInventoryWindow(); case SHOP_SUBHEADER_GC_END change like that case SHOP_SUBHEADER_GC_END: { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "EndShop", Py_BuildValue("()")); __RefreshInventoryWindow(); } and thats my uiinventory if ((exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE)) or (shop.IsOpen() and not shop.IsPrivateShop() and item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL)) or (uiPrivateShopBuilder.IsBuildingPrivateShop() and item.IsAntiFlag(item.ITEM_ANTIFLAG_MYSHOP))): self.wndItem.SetUnusableSlot(i) self.listUnusableSlot.append(i) elif ((not exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE) and slotNumber in self.listUnusableSlot) or (not shop.IsOpen() and shop.IsPrivateShop() and item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL) and slotNumber in self.listUnusableSlot) or ( not uiPrivateShopBuilder.IsBuildingPrivateShop() and item.IsAntiFlag(item.ITEM_ANTIFLAG_MYSHOP) and slotNumber in self.listUnusableSlot )): self.wndItem.SetUsableSlot(i) self.listUnusableSlot.remove(i) Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 21, 2016 Active Member Share Posted August 21, 2016 (edited) 11 minutes ago, safademirel said: Yeah it should work or if it didnt work try like this. PythonNetworkStreamPhaseGame.cpp case SHOP_SUBHEADER_GC_START: add __RefreshInventoryWindow(); case SHOP_SUBHEADER_GC_END change like that case SHOP_SUBHEADER_GC_END: { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "EndShop", Py_BuildValue("()")); __RefreshInventoryWindow(); } and thats my uiinventory if ((exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE)) or (shop.IsOpen() and not shop.IsPrivateShop() and item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL)) or (uiPrivateShopBuilder.IsBuildingPrivateShop() and item.IsAntiFlag(item.ITEM_ANTIFLAG_MYSHOP))): self.wndItem.SetUnusableSlot(i) self.listUnusableSlot.append(i) elif ((not exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE) and slotNumber in self.listUnusableSlot) or (not shop.IsOpen() and shop.IsPrivateShop() and item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL) and slotNumber in self.listUnusableSlot) or ( not uiPrivateShopBuilder.IsBuildingPrivateShop() and item.IsAntiFlag(item.ITEM_ANTIFLAG_MYSHOP) and slotNumber in self.listUnusableSlot )): self.wndItem.SetUsableSlot(i) self.listUnusableSlot.remove(i) Thank you so much for this dude this is really awesome I owe you a big one Has any of you guys done this for safebox? I know what to do now I just do the __RefreshInventoryWindow(); but I don't know where Thanks in advance guys and thank you safademirel for your help you have helped me and many others a lot Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 21, 2016 Active Member Share Posted August 21, 2016 Hey guys I did the safebox I think... I used the Private Shop method under Spoiler PyObject * safeboxGetCurrentSafeboxSize(PyObject * poSelf, PyObject * poArgs) in PythonSafeBox.cpp and I did this in uiSafeBox.py Spoiler def ShowWindow(self, size): (self.xSafeBoxStart, self.ySafeBoxStart, z) = player.GetMainCharacterPosition() self.SetTableSize(size) self.Show() safebox.RefreshInventorySafa() and for Close as well but I'm getting this syserr Spoiler 0821 15:24:20394 :: Traceback (most recent call last): 0821 15:24:20394 :: File "networkModule.py", line 247, in SetGamePhase 0821 15:24:20394 :: File "game.py", line 108, in __init__ 0821 15:24:20394 :: File "interfaceModule.py", line 298, in MakeInterface 0821 15:24:20394 :: File "interfaceModule.py", line 174, in __MakeWindows 0821 15:24:20394 :: File "uiInventory.py", line 266, in __init__ 0821 15:24:20394 :: File "uiInventory.py", line 407, in __LoadWindow 0821 15:24:20394 :: File "uiInventory.py", line 474, in SetInventoryPage 0821 15:24:20394 :: File "uiInventory.py", line 581, in RefreshBagSlotWindow 0821 15:24:20395 :: AttributeError 0821 15:24:20395 :: : 0821 15:24:20395 :: 'module' object has no attribute 'ShowWindow' 0821 15:24:20395 :: Can somebody give me a hand please? Thanks Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 23, 2016 Active Member Share Posted August 23, 2016 Fixed I was using wrong ANTIFLAG Link to comment Share on other sites More sharing options...
Honorable Member Mali 41878 Posted September 1, 2016 Honorable Member Share Posted September 1, 2016 On 23.08.2016 at 3:07 AM, Mind Rapist said: Fixed I was using wrong ANTIFLAG Can you give me Antiflag? Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted September 1, 2016 Active Member Share Posted September 1, 2016 4 hours ago, Blackk61 said: Can you give me Antiflag? ANTIFLAG_SAFEBOX but in some clients this can cause errors so I'm suggesting to edit your source and replace the ANTIFLAG_SAFEBOX function with ANTIFLAG_SAVE and use this instead Link to comment Share on other sites More sharing options...
Honorable Member Mali 41878 Posted September 2, 2016 Honorable Member Share Posted September 2, 2016 (edited) 18 hours ago, Mind Rapist said: ANTIFLAG_SAFEBOX but in some clients this can cause errors so I'm suggesting to edit your source and replace the ANTIFLAG_SAFEBOX function with ANTIFLAG_SAVE and use this instead Shops are working but ANTIFLAG_SAFEBOX isn't exist in my client also ANTIFLAG_SAVE isn't working Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted September 2, 2016 Active Member Share Posted September 2, 2016 You have to replace all ANTI_SAFEBOX into ANTI_SAVE in item_proto.txt of your serverfiles then create new item_proto for client and it will work Btw do you share new sash models? Link to comment Share on other sites More sharing options...
Recommended Posts