Jump to content

4 Inventory Page [HELP SYSERR]


Recommended Posts

Hi

my client root 34k

4 Inventory Page;


my py original func;

    def SetInventoryPage(self, page):
        self.inventoryPageIndex = page
        self.inventoryTab[1-page].SetUp()
        self.RefreshBagSlotWindow()

I've changed with it
 

def SetInventoryPage(self, page):
    self.inventoryTab[self.inventoryPageIndex].SetUp()
    self.inventoryPageIndex = page
    self.inventoryTab[self.inventoryPageIndex].Down()
    self.RefreshBagSlotWindow()


syserr;

:: Traceback (most recent call last):

::   File "networkModule.py", line 233, in SetGamePhase

::   File "game.py", line 105, in __init__

::   File "interfaceModule.py", line 266, in MakeInterface

::   File "interfaceModule.py", line 165, in __MakeWindows

::   File "uiInventory.py", line 113, in __init__

::   File "uiInventory.py", line 238, in __LoadWindow

::   File "uiInventory.py", line 284, in SetInventoryPage

:: AttributeError
:: :
:: 'InventoryWindow' object has no attribute 'inventoryPageIndex'
::

 

thank you metin2dev..
 

Link to comment
Share on other sites

            self.inventoryTab = []
            self.inventoryTab.append(self.GetChild("Inventory_Tab_01"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_04"))            

            self.equipmentTab = []
            self.equipmentTab.append(self.GetChild("Equipment_Tab_01"))
            self.equipmentTab.append(self.GetChild("Equipment_Tab_02"))



        self.inventoryTab[0].SetEvent(lambda arg=0: self.SetInventoryPage(arg))
        self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg))
        self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg))
        self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg))        
        self.inventoryTab[0].Down()

just like that

Link to comment
Share on other sites

  • Active Member
	def __LoadWindow(self):
		if self.isLoaded == 1:
			return

		self.isLoaded = 1

		try:
			pyScrLoader = ui.PythonScriptLoader()

			if ITEM_MALL_BUTTON_ENABLE:
				pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "InventoryWindow.py")
			else:
				pyScrLoader.LoadScriptFile(self, "UIScript/InventoryWindow.py")
		except:
			import exception
			exception.Abort("InventoryWindow.LoadWindow.LoadObject")

		try:
			wndItem = self.GetChild("ItemSlot")
			wndEquip = self.GetChild("EquipmentSlot")
			self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
			self.wndMoneySlot = self.GetChild("Money_Slot")
			self.mallButton = self.GetChild2("MallButton")
			self.DSSButton = self.GetChild2("DSSButton")
			self.costumeButton = self.GetChild2("CostumeButton")
			
			self.inventoryTab = []
			self.inventoryTab.append(self.GetChild("Inventory_Tab_01"))
			self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))
			self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
			self.inventoryTab.append(self.GetChild("Inventory_Tab_04"))

			self.equipmentTab = []
			self.equipmentTab.append(self.GetChild("Equipment_Tab_01"))
			self.equipmentTab.append(self.GetChild("Equipment_Tab_02"))

			if self.costumeButton and not app.ENABLE_COSTUME_SYSTEM:
				self.costumeButton.Hide()
				self.costumeButton.Destroy()
				self.costumeButton = 0

			self.wndChangeEquipment = None
			self.wndChangeEquipment = ChangeEquipmentWindow(self)

			# Belt Inventory Window
			self.wndBelt = None
			if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
				self.wndBelt = BeltInventoryWindow(self)
			
			
			
		except:
			import exception
			exception.Abort("InventoryWindow.LoadWindow.BindObject")

		## Item
		wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
		wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
		wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
		wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
		wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

		## Equipment
		wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
		wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
		wndEquip.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
		wndEquip.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
		wndEquip.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

		## PickMoneyDialog
		dlgPickMoney = uiPickMoney.PickMoneyDialog()
		dlgPickMoney.LoadDialog()
		dlgPickMoney.Hide()

		## RefineDialog
		self.refineDialog = uiRefine.RefineDialog()
		self.refineDialog.Hide()

		## AttachMetinDialog
		self.attachMetinDialog = uiAttachMetin.AttachMetinDialog()
		self.attachMetinDialog.Hide()

		## MoneySlot
		self.wndMoneySlot.SetEvent(ui.__mem_func__(self.OpenPickMoneyDialog))

		self.inventoryTab[0].SetEvent(lambda arg=0: self.SetInventoryPage(arg))
		self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg))

		self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg))
		self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg))

		self.inventoryTab[0].Down()
		self.inventoryPageIndex = 0 ################## <= Have you got? ###################################

		self.equipmentTab[0].SetEvent(lambda arg=0: self.SetEquipmentPage(arg))
		self.equipmentTab[1].SetEvent(lambda arg=1: self.SetEquipmentPage(arg))
		self.equipmentTab[0].Down()
		self.equipmentTab[0].Hide()
		self.equipmentTab[1].Hide()

		self.wndItem = wndItem
		self.wndEquip = wndEquip
		self.dlgPickMoney = dlgPickMoney

		# MallButton
		if self.mallButton:
			self.mallButton.SetEvent(ui.__mem_func__(self.ClickMallButton))

		if self.DSSButton:
			self.DSSButton.SetEvent(ui.__mem_func__(self.ClickDSSButton)) 
		
		# Costume Button
		if self.costumeButton:
			self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton))

		self.wndCostume = None
		
 		#####

		## Refresh
		self.SetInventoryPage(0)
		self.SetEquipmentPage(0)
		self.RefreshItemSlot()
		self.RefreshStatus()
  • Love 1
Link to comment
Share on other sites

my py;

    def __LoadWindow(self):
        if self.isLoaded == 1:
            return

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()

            if ITEM_MALL_BUTTON_ENABLE:
                pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "InventoryWindow.py")
            else:
                pyScrLoader.LoadScriptFile(self, "UIScript/InventoryWindow.py")
        except:
            import exception
            exception.Abort("InventoryWindow.LoadWindow.LoadObject")

        try:
            wndItem = self.GetChild("ItemSlot")
            wndEquip = self.GetChild("EquipmentSlot")
            self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
            self.wndMoney = self.GetChild("Money")
            self.wndMoneySlot = self.GetChild("Money_Slot")
            self.mallButton = self.GetChild2("MallButton")
            self.costumeButton = self.GetChild2("CostumeButton")
            self.VectorsHzl = self.GetChild2("VectorsHzl")
            
            self.inventoryTab = []
            self.inventoryTab.append(self.GetChild("Inventory_Tab_01"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_04"))            

            self.equipmentTab = []
            self.equipmentTab.append(self.GetChild("Equipment_Tab_01"))
            self.equipmentTab.append(self.GetChild("Equipment_Tab_02"))

            if self.costumeButton and not app.ENABLE_COSTUME_SYSTEM:
                self.costumeButton.Hide()
                self.costumeButton.Destroy()
                self.costumeButton = 0

        except:
            import exception
            exception.Abort("InventoryWindow.LoadWindow.BindObject")

        ## Item
        wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
        wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
        wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
        wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
        wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        ## Equipment
        wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
        wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
        wndEquip.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
        wndEquip.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
        wndEquip.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        ## PickMoneyDialog
        dlgPickMoney = uiPickMoney.PickMoneyDialog()
        dlgPickMoney.LoadDialog()
        dlgPickMoney.Hide()

        ## RefineDialog
        self.refineDialog = uiRefine.RefineDialog()
        self.refineDialog.Hide()

        ## AttachMetinDialog
        self.attachMetinDialog = uiAttachMetin.AttachMetinDialog()
        self.attachMetinDialog.Hide()

        ## MoneySlot
        self.wndMoneySlot.SetEvent(ui.__mem_func__(self.OpenPickMoneyDialog))

        self.inventoryTab[0].SetEvent(lambda arg=0: self.SetInventoryPage(arg))
        self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg))
        self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg))
        self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg))        
        self.inventoryTab[0].Down()

        self.equipmentTab[0].SetEvent(lambda arg=0: self.SetEquipmentPage(arg))
        self.equipmentTab[1].SetEvent(lambda arg=1: self.SetEquipmentPage(arg))
        self.equipmentTab[0].Down()
        self.equipmentTab[0].Hide()
        self.equipmentTab[1].Hide()

        self.wndItem = wndItem
        self.wndEquip = wndEquip
        self.dlgPickMoney = dlgPickMoney

        # MallButton
        if self.mallButton:
            self.mallButton.SetEvent(ui.__mem_func__(self.ClickMallButton))
        
        # Costume Button
        if self.costumeButton:
            self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton))
            
        # Hzl Ekpmn
        if self.VectorsHzl:
            self.VectorsHzl.SetEvent(ui.__mem_func__(self._VectorsHzl))            

        self.wndCostume = None
        
         #####

        ## Refresh
        self.SetInventoryPage(0)
        self.SetEquipmentPage(0)
        self.RefreshItemSlot()
        self.RefreshStatus()

Link to comment
Share on other sites

What's NO?

You must add "self.inventoryPageIndex = 0" for example under "self.inventoryTab[0].Down()"

yes

https://metin2.download/picture/ud1rXt511473uVifqgfrdvpW9Wmvk87S/.png

syserr:

:: Traceback (most recent call last):

 ::   File "networkModule.py", line 233, in SetGamePhase

::   File "game.py", line 105, in __init__

 ::   File "interfaceModule.py", line 270, in MakeInterface

 ::   File "interfaceModule.py", line 123, in __MakeTaskBar

::   File "uiTaskBar.py", line 489, in LoadWindow

 ::   File "uiTaskBar.py", line 697, in RefreshQuickSlot

:: RuntimeError

 :: :

 :: skill.GetSkillType - Failed to find skill by 5

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.