- Mesaj
- 736
- Çözümler
- 55
- Beğeni
- 1.497
- Puan
- 1.179
- Ticaret Puanı
- 0
Metin2 itemlere göre npc boyutları
![8becfe4deadd4731099973772b297b42.gif 8becfe4deadd4731099973772b297b42.gif](https://i.gyazo.com/8becfe4deadd4731099973772b297b42.gif)
Root/uishop.py:
#Arat
def Refresh(self):
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
Root/uishop.py:
# Arat
self.itemSlotWindow = GetObject("ItemSlot")
Root/uishop.py:
# Altına ekle
self.board = GetObject("board")
Root/uishop.py:
# Arat
self.itemSlotWindow = 0
Root/uishop.py:
# Altına Ekle
self.board = 0
Root/uishop.py:
# Arat
# def Open(self, vid):
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()