MG Yaşı
2 Ay 1 Gün
Katılım
2 Şub 2026
Konular
224
Mesajlar
363
Tepkime puanı
54
Puan
53
Konum
İstanbul
8becfe4deadd4731099973772b297b42.gif


Kod:
Root/uishop.py:
#Arat
    def Refresh(self):

Kod:
Root/uishop.py:
# Altına ekle
    def GetEmptyLines(self):
        emptyLines = 8
        for i in xrange(5):
            empty = 8
            for j in xrange(8):
                itemIndex = shop.GetItemID(5*j+i)
                if itemIndex > 0:
                    item.SelectItem(itemIndex)
                    (w, h) = item.GetItemSize()
                    empty -= h
            if empty < emptyLines:
                emptyLines = empty
        return emptyLines


Kod:
Root/uishop.py:
# Arat
            self.itemSlotWindow = GetObject("ItemSlot")

Kod:
Root/uishop.py:
# Altına ekle
            self.board = GetObject("board")

Kod:
Root/uishop.py:
# Arat
        self.itemSlotWindow = 0

Kod:
Root/uishop.py:
# Altına Ekle
        self.board = 0


Kod:
Root/uishop.py:
# Arat
    # def Open(self, vid):


Kod:
Root/uishop.py:
# değiştir
    def Open(self, vid):
        isPrivateShop = FALSE
        isMainPlayerPrivateShop = FALSE

        import chr
        if chr.IsNPC(vid):
            isPrivateShop = FALSE
        else:
            isPrivateShop = TRUE

        self.board.SetSize(184, 348)
        self.itemSlotWindow.ArrangeSlot(0, 5, 8, 32, 32, 0, 0)
        self.itemSlotWindow.RefreshSlot()
        self.itemSlotWindow.SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0)
        self.btnBuy.SetPosition(21, 292)
        self.btnSell.SetPosition(104, 292)

        if player.IsMainCharacterIndex(vid):

            isMainPlayerPrivateShop = TRUE

            self.btnBuy.Hide()
            self.btnSell.Hide()
            self.btnClose.Show()

        else:
            if isPrivateShop == FALSE:
                EMPTY_LINES = 32 * self.GetEmptyLines()

                self.board.SetSize(184, 348 - EMPTY_LINES)

                self.itemSlotWindow.ArrangeSlot(0, 5, 8 - EMPTY_LINES / 32, 32, 32, 0, 0)
                self.itemSlotWindow.RefreshSlot()
                self.itemSlotWindow.SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0)

                self.btnBuy.SetPosition(21, 292 - EMPTY_LINES)
                self.btnSell.SetPosition(104, 292 - EMPTY_LINES)

            isMainPlayerPrivateShop = FALSE

            self.btnBuy.Show()
            self.btnSell.Show()
            self.btnClose.Hide()

        shop.Open(isPrivateShop, isMainPlayerPrivateShop)
        self.Refresh()
        self.SetTop()
        self.Show()

        (self.xShopStart, self.yShopStart, z) = player.GetMainCharacterPosition()
      
//65 slot icin eklesin

    def Open(self, vid):
        isPrivateShop = FALSE
        isMainPlayerPrivateShop = FALSE

        import chr
        if chr.IsNPC(vid):
            isPrivateShop = FALSE
        else:
            isPrivateShop = TRUE

        self.board.SetSize(283, 320)
        self.itemSlotWindow.ArrangeSlot(0, 8, 8, 32, 32, 0, 0)
        self.itemSlotWindow.RefreshSlot()
        self.itemSlotWindow.SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0)
        # self.btnBuy.SetPosition(21, 292)
        # self.btnSell.SetPosition(104, 292)

        if player.IsMainCharacterIndex(vid):

            isMainPlayerPrivateShop = TRUE

            # self.btnBuy.Hide()
            # self.btnSell.Hide()
            self.btnClose.Show()

        else:
            if isPrivateShop == FALSE:
                EMPTY_LINES = 32 * self.GetEmptyLines()

                self.board.SetSize(283, 320 - EMPTY_LINES)

                self.itemSlotWindow.ArrangeSlot(0, 8, 8 - EMPTY_LINES / 32, 32, 32, 0, 0)
                self.itemSlotWindow.RefreshSlot()
                self.itemSlotWindow.SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0)

                #self.btnBuy.SetPosition(21, 292 - EMPTY_LINES)
                #self.btnSell.SetPosition(104, 292 - EMPTY_LINES)

            isMainPlayerPrivateShop = FALSE

            #self.btnBuy.Show()
            #self.btnSell.Show()
            self.btnClose.Hide()

        shop.Open(isPrivateShop, isMainPlayerPrivateShop)
        self.Refresh()
        self.SetTop()
        self.Show()

        (self.xShopStart, self.yShopStart, z) = player.GetMainCharacterPosition()
Mmo Tutkunları Kull
 
Geri
Üst