HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
Merhaba Turkmmo Ailesi
@Licymnius Arkadaşımız forum da bu sistemin Great offline shop için itemi koyduğunda kırmızı olmasını anlattı sizlere bende tamamen bu sistemi greata uyarlamayı anlatıcağım size
Sizdeki definelere göre yaparsanız daha sağlıklı olur defineler farklı olabilir
[CODE title="uiPrivateShopBuilder.py"]// Aratın@Licymnius Arkadaşımız forum da bu sistemin Great offline shop için itemi koyduğunda kırmızı olmasını anlattı sizlere bende tamamen bu sistemi greata uyarlamayı anlatıcağım size
Sizdeki definelere göre yaparsanız daha sağlıklı olur defineler farklı olabilir
class PrivateShopBuilder(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.__LoadWindow()
self.itemStock = {}
self.tooltipItem = None
self.priceInputBoard = None
self.days = 0
self.title = ""
// Altına Ekleyin ;
if app.WJ_ENABLE_TRADABLE_ICON:
self.interface = None
self.wndInventory = None
self.lockedItems = {i
-1,-1) for i in range(shop.SHOP_SLOT_COUNT)}***********************************************************************
// Aratın
def Destroy(self):
self.ClearDictionary()
self.itemSlot = None
self.btnOk = None
self.btnClose = None
self.titleBar = None
self.priceInputBoard = None
// Altına Ekleyin ;
if app.WJ_ENABLE_TRADABLE_ICON:
self.interface = None
self.wndInventory = None
self.lockedItems = {i
-1,-1) for i in range(shop.SHOP_SLOT_COUNT)}*******************************************************************************
// Aratın ;
def Open(self,title,days,interface):
self.days = days
self.title = title
if len(title) > 25:
title = title[:22] + "..."
self.itemStock = {}
shop.ClearPrivateShopStock()
self.SetCenterPosition()
self.Refresh()
self.Show()
// Altına Ekleyin
if app.WJ_ENABLE_TRADABLE_ICON:
self.lockedItems = {i
-1,-1) for i in range(shop.SHOP_SLOT_COUNT)}self.interface = interface
self.interface.SetOnTopWindow(player.ON_TOP_WND_PRIVATE_SHOP)
self.interface.RefreshMarkInventoryBag()
**************************************************************************
// Aratın
def Close(self):
global g_isBuildingPrivateShop
g_isBuildingPrivateShop = False
self.title = ""
self.itemStock = {}
shop.ClearPrivateShopStock()
if self.priceInputBoard:
self.priceInputBoard.Close()
self.priceInputBoard = None
// Altına Ekleyin
if app.WJ_ENABLE_TRADABLE_ICON:
for privatePos, (itemInvenPage, itemSlotPos) in self.lockedItems.items():
if self.wndInventory and itemInvenPage == self.wndInventory.GetInventoryPageIndex():
self.wndInventory.wndItem.SetCanMouseEventSlot(itemSlotPos)
self.lockedItems = {i
-1,-1) for i in range(shop.SHOP_SLOT_COUNT)}self.interface.SetOnTopWindow(player.ON_TOP_WND_NONE)
self.interface.RefreshMarkInventoryBag()
********************************************************************
// Aratın ;
def Refresh(self):
getitemVNum=player.GetItemIndex
[***]
self.itemSlot.RefreshSlot()
// Altın Ekleyin
if app.WJ_ENABLE_TRADABLE_ICON:
self.RefreshLockedSlot()
**********************************************************************
// Aratın
def OnSelectEmptySlot(self, selectedSlotPos):
[***]
priceInputBoard = uiCommon.MoneyInputDialog()
// Altına Ekleyin
if app.WJ_ENABLE_TRADABLE_ICON:
self.CantTradableItem(selectedSlotPos, attachedSlotPos)
*************************************************************************
// Aratın
def OnSelectItemSlot(self, selectedSlotPos):
[***]
snd.PlaySound("sound/ui/drop.wav")
// Altına Ekleyin ;
if app.WJ_ENABLE_TRADABLE_ICON:
(itemInvenPage, itemSlotPos) = self.lockedItems[selectedSlotPos]
if self.wndInventory and itemInvenPage == self.wndInventory.GetInventoryPageIndex():
self.wndInventory.wndItem.SetCanMouseEventSlot(itemSlotPos)
self.lockedItems[selectedSlotPos] = (-1, -1)
********************************************************************************
// Aratın
def CancelInputPrice(self):
// Altına Ekleyin
if app.WJ_ENABLE_TRADABLE_ICON:
itemInvenPage = self.priceInputBoard.sourceSlotPos / player.INVENTORY_PAGE_SIZE
itemSlotPos = self.priceInputBoard.sourceSlotPos - (itemInvenPage * player.INVENTORY_PAGE_SIZE)
if self.wndInventory and itemInvenPage == self.wndInventory.GetInventoryPageIndex():
self.wndInventory.wndItem.SetCanMouseEventSlot(itemSlotPos)
self.lockedItems[self.priceInputBoard.targetSlotPos] = (-1, -1)
*********************************************************************************
// Sayfanın Sonun Ekleyin
def OnUpdate(self):
if app.WJ_ENABLE_TRADABLE_ICON:
self.RefreshLockedSlot()
if app.WJ_ENABLE_TRADABLE_ICON:
def CantTradableItem(self, destSlotIndex, srcSlotIndex):
itemInvenPage = srcSlotIndex / player.INVENTORY_PAGE_SIZE
localSlotPos = srcSlotIndex - (itemInvenPage * player.INVENTORY_PAGE_SIZE)
self.lockedItems[destSlotIndex] = (itemInvenPage, localSlotPos)
if self.wndInventory and itemInvenPage == self.wndInventory.GetInventoryPageIndex():
self.wndInventory.wndItem.SetCantMouseEventSlot(localSlotPos)
def RefreshLockedSlot(self):
if self.wndInventory:
for privatePos, (itemInvenPage, itemSlotPos) in self.lockedItems.items():
if self.wndInventory and itemInvenPage == self.wndInventory.GetInventoryPageIndex():
self.wndInventory.wndItem.SetCantMouseEventSlot(itemSlotPos)
self.wndInventory.wndItem.RefreshSlot()
def BindInterface(self, interface):
self.interface = interface
def OnTop(self):
if self.interface:
self.interface.SetOnTopWindow(player.ON_TOP_WND_PRIVATE_SHOP)
self.interface.RefreshMarkInventoryBag()
def SetInven(self, wndInventory):
from _weakref import proxy
self.wndInventory = proxy(wndInventory)[/CODE]
Yapamayan arkadaşlar için kendi uiPrivateShopBuilder.py Dosyamı Paylaşıyorum
İyi Kullanımlar...
Ekli dosyalar
Son düzenleme:
Rica EderimTeşekkürler.

Rica EderimPaylaşım için teşekkürler.

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Çözüldü
- Cevaplar
- 2
- Görüntüleme
- 73
- Cevaplar
- 8
- Görüntüleme
- 263
- Cevaplar
- 16
- Görüntüleme
- 1K
