Sucht in root/ uishop.py
Dort sucht ihr
def Refresh(self):
über diese Funktion:
Code
Suchen:
self.itemSlotWindow = GetObject("ItemSlot")
Darunter:
self.board = GetObject("board")
Suchen:
self.itemSlotWindow = 0
Darunter:
self.board = 0
Suchen:
def Open(self, vid):
Code
- Ganze Funktion mit der Ersetzen (Standart Shop's):
- 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()
Hier noch (Falls jemand 80 Slot's benutzt)
Code
- def GetEmptyLines(self):
- emptyLines = 9
- for i in xrange(10):
- empty = 9
- for j in xrange(9):
- itemIndex = shop.GetItemID(10*j+i)
- if itemIndex > 0:
- item.SelectItem(itemIndex)
- (w, h) = item.GetItemSize()
- empty -= h
- if empty < emptyLines:
- emptyLines = empty
- return emptyLines
- und
- def Open(self, vid):
- isPrivateShop = FALSE
- isMainPlayerPrivateShop = FALSE
- import chr
- if chr.IsNPC(vid):
- isPrivateShop = FALSE
- else:
- isPrivateShop = TRUE
- self.board.SetSize(346, 330)
- self.itemSlotWindow.ArrangeSlot(0, 10, 9, 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)
- if player.IsMainCharacterIndex(vid):
- isMainPlayerPrivateShop = TRUE
- self.btnClose.Show()
- else:
- if isPrivateShop == FALSE:
- EMPTY_LINES = 32 * self.GetEmptyLines()
- self.board.SetSize(346, 330 - EMPTY_LINES)
- self.itemSlotWindow.ArrangeSlot(0, 10, 9 - 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)
- isMainPlayerPrivateShop = FALSE
- self.btnClose.Hide()
- shop.Open(isPrivateShop, isMainPlayerPrivateShop)
- self.Refresh()
- self.SetTop()
- self.Show()
- (self.xShopStart, self.yShopStart, z) = player.GetMainCharacterPosition()
Vllt kann es jemand gebrauchen
Bilder Folgen gleich