mavzermete 1
mavzermete
Bvural41 1
Bvural41
Fethi Polat 1
Fethi Polat
Hikaye Ekle

Metin2 hızlı menü kaldırma

  • Konuyu başlatan Konuyu başlatan Blackniga31
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 14
  • Görüntüleme Görüntüleme 3K

Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!

merhaba arkadaşlar bidiğiniz gibi çoğu serverlerde envanterin yanında hızlı menü sistemi var ben bunu kaldırmak istiyorum bilgili arkadaşlardan yardım istiyorum

aZQ5Mf.png
 
merhaba arkadaşlar bidiğiniz gibi çoğu serverlerde envanterin yanında hızlı menü sistemi var ben bunu kaldırmak istiyorum bilgili arkadaşlardan yardım istiyorum

aZQ5Mf.png


Buyur Dostum İstersen bunu da deneyebilirsin

Root > uiinventory.py Aç Ve alttaki kodları sil

Kod:
class BeltInventoryWindow(ui.ScriptWindow):

    def __init__(self, wndInventory):
        import exception
       
        if not app.ENABLE_NEW_EQUIPMENT_SYSTEM:           
            exception.Abort("What do you do?")
            return

        if not wndInventory:
            exception.Abort("wndInventory parameter must be set to InventoryWindow")
            return                       
                 
        ui.ScriptWindow.__init__(self)

        self.isLoaded = 0
        self.wndInventory = wndInventory;
       
        self.wndBeltInventoryLayer = None
        self.wndBeltInventorySlot = None
        self.expandBtn = None
        self.minBtn = None

        self.__LoadWindow()

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def Show(self, openBeltSlot = False):
        self.__LoadWindow()
        self.RefreshSlot()

        ui.ScriptWindow.Show(self)
       
        if openBeltSlot:
            self.OpenInventory()
        else:
            self.CloseInventory()

    def Close(self):
        self.Hide()

    def IsOpeningInventory(self):
        return self.wndBeltInventoryLayer.IsShow()
       
    def OpenInventory(self):
        self.wndBeltInventoryLayer.Show()
        self.expandBtn.Hide()

        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()
               
    def CloseInventory(self):
        self.wndBeltInventoryLayer.Hide()
        self.expandBtn.Show()
       
        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()

    ## ÇöÀç Àκ¥Å丮 À§Ä¡¸¦ ±âÁØÀ¸·Î BASE À§Ä¡¸¦ °è»ê, ¸®ÅÏ.. ¼ıÀÚ ÇϵåÄÚµùÇϱâ Á¤¸» ½ÈÁö¸¸ ¹æ¹ıÀÌ ¾ø´Ù..
    def GetBasePosition(self):
        x, y = self.wndInventory.GetGlobalPosition()
        return x - 148, y + 241
       
    def AdjustPositionAndSize(self):
        bx, by = self.GetBasePosition()
       
        if self.IsOpeningInventory():           
            self.SetPosition(bx, by)
            self.SetSize(self.ORIGINAL_WIDTH, self.GetHeight())
           
        else:
            self.SetPosition(bx + 138, by);
            self.SetSize(10, self.GetHeight())

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

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/BeltInventoryWindow.py")
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.LoadObject")

        try:
            self.ORIGINAL_WIDTH = self.GetWidth()
            wndBeltInventorySlot = self.GetChild("BeltInventorySlot")
            self.wndBeltInventoryLayer = self.GetChild("BeltInventoryLayer")
            self.expandBtn = self.GetChild("ExpandBtn")
            self.minBtn = self.GetChild("MinimizeBtn")
           
            self.expandBtn.SetEvent(ui.__mem_func__(self.OpenInventory))
            self.minBtn.SetEvent(ui.__mem_func__(self.CloseInventory))
           
            if localeInfo.IsARABIC() :
                self.expandBtn.SetPosition(self.expandBtn.GetWidth() - 2, 15)
                self.wndBeltInventoryLayer.SetPosition(self.wndBeltInventoryLayer.GetWidth() - 5, 0)
                self.minBtn.SetPosition(self.minBtn.GetWidth() + 3, 15)           
   
            for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
                slotNumber = item.BELT_INVENTORY_SLOT_START + i                           
                wndBeltInventorySlot.SetCoverButton(slotNumber,    "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)                                   
           
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")

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

        self.wndBeltInventorySlot = wndBeltInventorySlot

    def RefreshSlot(self):
        getItemVNum=player.GetItemIndex
       
        for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
            slotNumber = item.BELT_INVENTORY_SLOT_START + i
            self.wndBeltInventorySlot.SetItemSlot(slotNumber, getItemVNum(slotNumber), player.GetItemCount(slotNumber))
            self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, True)
           
            avail = "0"
           
            if player.IsAvailableBeltInventoryCell(slotNumber):
                self.wndBeltInventorySlot.EnableCoverButton(slotNumber)               
            else:
                self.wndBeltInventorySlot.DisableCoverButton(slotNumber)               

        self.wndBeltInventorySlot.RefreshSlot()

Bunuda sil :

Kod:
            if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
                self.wndBelt = BeltInventoryWindow(self)

bunu da Sil :

Kod:
        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)

Son olarak uiscript dosyasından BeltInventoryWindow.py Dosyasını sil ve paketle oyuna atıp dene bir bakalım
 
Buyur Dostum İstersen bunu da deneyebilirsin

Root > uiinventory.py Aç Ve alttaki kodları sil

Kod:
class BeltInventoryWindow(ui.ScriptWindow):

    def __init__(self, wndInventory):
        import exception
      
        if not app.ENABLE_NEW_EQUIPMENT_SYSTEM:          
            exception.Abort("What do you do?")
            return

        if not wndInventory:
            exception.Abort("wndInventory parameter must be set to InventoryWindow")
            return                      
                
        ui.ScriptWindow.__init__(self)

        self.isLoaded = 0
        self.wndInventory = wndInventory;
      
        self.wndBeltInventoryLayer = None
        self.wndBeltInventorySlot = None
        self.expandBtn = None
        self.minBtn = None

        self.__LoadWindow()

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def Show(self, openBeltSlot = False):
        self.__LoadWindow()
        self.RefreshSlot()

        ui.ScriptWindow.Show(self)
      
        if openBeltSlot:
            self.OpenInventory()
        else:
            self.CloseInventory()

    def Close(self):
        self.Hide()

    def IsOpeningInventory(self):
        return self.wndBeltInventoryLayer.IsShow()
      
    def OpenInventory(self):
        self.wndBeltInventoryLayer.Show()
        self.expandBtn.Hide()

        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()
              
    def CloseInventory(self):
        self.wndBeltInventoryLayer.Hide()
        self.expandBtn.Show()
      
        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()

    ## ÇöÀç Àκ¥Å丮 À§Ä¡¸¦ ±âÁØÀ¸·Î BASE À§Ä¡¸¦ °è»ê, ¸®ÅÏ.. ¼ıÀÚ ÇϵåÄÚµùÇϱâ Á¤¸» ½ÈÁö¸¸ ¹æ¹ıÀÌ ¾ø´Ù..
    def GetBasePosition(self):
        x, y = self.wndInventory.GetGlobalPosition()
        return x - 148, y + 241
      
    def AdjustPositionAndSize(self):
        bx, by = self.GetBasePosition()
      
        if self.IsOpeningInventory():          
            self.SetPosition(bx, by)
            self.SetSize(self.ORIGINAL_WIDTH, self.GetHeight())
          
        else:
            self.SetPosition(bx + 138, by);
            self.SetSize(10, self.GetHeight())

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

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/BeltInventoryWindow.py")
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.LoadObject")

        try:
            self.ORIGINAL_WIDTH = self.GetWidth()
            wndBeltInventorySlot = self.GetChild("BeltInventorySlot")
            self.wndBeltInventoryLayer = self.GetChild("BeltInventoryLayer")
            self.expandBtn = self.GetChild("ExpandBtn")
            self.minBtn = self.GetChild("MinimizeBtn")
          
            self.expandBtn.SetEvent(ui.__mem_func__(self.OpenInventory))
            self.minBtn.SetEvent(ui.__mem_func__(self.CloseInventory))
          
            if localeInfo.IsARABIC() :
                self.expandBtn.SetPosition(self.expandBtn.GetWidth() - 2, 15)
                self.wndBeltInventoryLayer.SetPosition(self.wndBeltInventoryLayer.GetWidth() - 5, 0)
                self.minBtn.SetPosition(self.minBtn.GetWidth() + 3, 15)          
  
            for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
                slotNumber = item.BELT_INVENTORY_SLOT_START + i                          
                wndBeltInventorySlot.SetCoverButton(slotNumber,    "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)                                  
          
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")

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

        self.wndBeltInventorySlot = wndBeltInventorySlot

    def RefreshSlot(self):
        getItemVNum=player.GetItemIndex
      
        for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
            slotNumber = item.BELT_INVENTORY_SLOT_START + i
            self.wndBeltInventorySlot.SetItemSlot(slotNumber, getItemVNum(slotNumber), player.GetItemCount(slotNumber))
            self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, True)
          
            avail = "0"
          
            if player.IsAvailableBeltInventoryCell(slotNumber):
                self.wndBeltInventorySlot.EnableCoverButton(slotNumber)              
            else:
                self.wndBeltInventorySlot.DisableCoverButton(slotNumber)              

        self.wndBeltInventorySlot.RefreshSlot()

Bunuda sil :

Kod:
            if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
                self.wndBelt = BeltInventoryWindow(self)

bunu da Sil :

Kod:
        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)

Son olarak uiscript dosyasından BeltInventoryWindow.py Dosyasını sil ve paketle oyuna atıp dene bir bakalım

bendeki hızlı menüyü kaldırmadı maalesef işe yaramadı
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst