Yardım Uzaktan Markette Yang Sorunu

Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

mnyk2070

MT Üye
MT Üye
Editör
Mesaj
394
Çözümler
11
Beğeni
131
Puan
499
Ticaret Puanı
0
Uzaktan Markette Seçtiğim Npcde normalde 1 adet efsun nesnesi 3000x Cor Draconis Göstermesi gerekirken 3000 yang olarak gözüküyor bu görüntü sorununu nasıl çözerim
 

Dosya Eklentileri

  • Adsız.png
    Adsız.png
    136,3 KB · Gösterim: 170
Büyük ihtimal kullandığınız sistem uyumlu değil
 
Ama satın aldığın zaman 3000x cor istiyor demi. Sadece görüntü hatası mı?
 
Bu sistemde uishop.py üzerinden çalışıyor demi. Eklemediğim için bilmiyorum.
 
Python:
import PYTHON_DYNAMIC_MODULE_2019 as pythonApi
net = __import__(pythonApi.GetModuleName("net"))
app = __import__(pythonApi.GetModuleName("app"))
player = __import__(pythonApi.GetModuleName("player"))
item = __import__(pythonApi.GetModuleName("item"))
chr = __import__(pythonApi.GetModuleName("chr"))
shop = __import__(pythonApi.GetModuleName("shop"))
chat = __import__(pythonApi.GetModuleName("chat"))
exchange = __import__(pythonApi.GetModuleName("exchange"))
background = __import__(pythonApi.GetModuleName("background"))
import snd
import wndMgr
import constInfo
import ui
import uiCommon
import mouseModule
import localeInfo
import time
###################################################################################################
## Shop
class ShopDialog(ui.ScriptWindow):

    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.tooltipItem = 0
        self.xShopStart = 0
        self.yShopStart = 0
        self.vid = 0
        self.questionDialog = None
        self.popup = None
        self.itemBuyQuestionDialog = None  
        if app.ENABLE_TRADABLE_ICON:
            self.interface = None

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

    def __GetRealIndex(self, i):
        return self.tabIdx * shop.SHOP_SLOT_COUNT + i

    def Refresh(self):
        getItemID=shop.GetItemID
        getItemCount=shop.GetItemCount
        setItemID=self.itemSlotWindow.SetItemSlot
        for i in xrange(shop.SHOP_SLOT_COUNT):
            idx = self.__GetRealIndex(i)
            itemCount = getItemCount(idx)
            if itemCount <= 1:
                itemCount = 0
            setItemID(i, getItemID(idx), itemCount, 4)
            if app.ENABLE_CHANGELOOK_SYSTEM:
                itemTransmutedVnum = shop.GetItemTransmutation(idx)
                if itemTransmutedVnum:
                    self.itemSlotWindow.DisableCoverButton(i)
                else:
                    self.itemSlotWindow.EnableCoverButton(i)  

            if app.ENABLE_SOLD_ITEM_SYSTEM:
                if shop.GetItemIsSold(i) == 1:
                    self.RegisterShopSold(i)
                else:
                    if self.itemSlotWindow.HasCoverButton(i):
                        self.itemSlotWindow.DeleteCoverButton(i)
                       
        wndMgr.RefreshSlot(self.itemSlotWindow.GetWindowHandle())
           
    if app.ENABLE_SOLD_ITEM_SYSTEM:
        def RegisterShopSold(self, pos):
            if pos < 0 or not shop.GetItemID(pos):
                return

            chr.SelectInstance(self.vid)
            if chr.GetRace() == 20451 or chr.GetRace() ==  9008:
                return
       
            item.SelectItem(int(shop.GetItemID(pos)))
            (itemWidth, itemHeight) = item.GetItemSize()

            targetSlot = self.itemSlotWindow
            imageName = "d:/ymir work/ui/sold_icon/slot_disabled_%d.tga" % itemHeight

            targetSlot.SetCoverButton(pos, imageName, imageName, imageName, "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)
            targetSlot.EnableSlot(pos)
            wndMgr.RefreshSlot(targetSlot.GetWindowHandle())
           
    def SetItemData(self, pos, itemID, itemCount, itemPrice):
        shop.SetItemData(pos, itemID, itemCount, itemPrice)

    def LoadDialog(self):
        try:
            PythonScriptLoader = ui.PythonScriptLoader()
            PythonScriptLoader.LoadScriptFile(self, "UIScript/shopdialog.py")
        except:
            import exception
            exception.Abort("ShopDialog.LoadDialog.LoadObject")

        smallTab1 = None
        smallTab2 = None
        smallTab3 = None
        middleTab1 = None
        middleTab2 = None

        try:
            GetObject = self.GetChild
            self.itemSlotWindow = GetObject("ItemSlot")
            self.btnBuy = GetObject("BuyButton")
            self.btnSell = GetObject("SellButton")
            self.btnClose = GetObject("CloseButton")
            self.titleBar = GetObject("TitleBar")
            self.titleName = GetObject('TitleName')
            ###ENABLE_SHOP_SEEN###
            self.ViewsBackground = self.GetChild("ViewsBackground")
            self.ViewsCount = self.GetChild("ViewsCount")
            ######################
            middleTab1 = GetObject("MiddleTab1")
            middleTab2 = GetObject("MiddleTab2")
            smallTab1 = GetObject("SmallTab1")
            smallTab2 = GetObject("SmallTab2")
            smallTab3 = GetObject("SmallTab3")
        except:
            import exception
            exception.Abort("ShopDialog.LoadDialog.BindObject")

        self.realWidth, self.realHeight = self.GetWidth(), self.GetHeight()
        self.realTitleBarX = self.titleBar.GetWidth()

        self.itemSlotWindow.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
        self.itemSlotWindow.SAFE_SetButtonEvent("LEFT", "EMPTY", self.SelectEmptySlot)
        self.itemSlotWindow.SAFE_SetButtonEvent("LEFT", "EXIST", self.SelectItemSlot)
        self.itemSlotWindow.SAFE_SetButtonEvent("RIGHT", "EXIST", self.UnselectItemSlot)
   
        self.itemSlotWindow.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        self.itemSlotWindow.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        self.btnBuy.SetToggleUpEvent(ui.__mem_func__(self.CancelShopping))
        self.btnBuy.SetToggleDownEvent(ui.__mem_func__(self.OnBuy))

        self.btnSell.SetToggleUpEvent(ui.__mem_func__(self.CancelShopping))
        self.btnSell.SetToggleDownEvent(ui.__mem_func__(self.OnSell))

        self.btnClose.SetEvent(ui.__mem_func__(self.AskClosePrivateShop))
        self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))
       
        self.smallRadioButtonGroup = ui.RadioButtonGroup.Create([[smallTab1, lambda : self.OnClickTabButton(0), None], [smallTab2, lambda : self.OnClickTabButton(1), None], [smallTab3, lambda : self.OnClickTabButton(2), None]])
        self.middleRadioButtonGroup = ui.RadioButtonGroup.Create([[middleTab1, lambda : self.OnClickTabButton(0), None], [middleTab2, lambda : self.OnClickTabButton(1), None]])

        self.__HideMiddleTabs()
        self.__HideSmallTabs()
        self.tabIdx = 0
        self.coinType = shop.SHOP_COIN_TYPE_GOLD
        self.Refresh()

    def __ShowBuySellButton(self):
        self.btnBuy.Show()
        self.btnSell.Show()
       
    def __ShowMiddleTabs(self):
        self.middleRadioButtonGroup.Show()
   
    def __ShowSmallTabs(self):
        self.smallRadioButtonGroup.Show()
   
    def __HideBuySellButton(self):
        self.btnBuy.Hide()
        self.btnSell.Hide()
   
    def __HideMiddleTabs(self):
        self.middleRadioButtonGroup.Hide()
   
    def __HideSmallTabs(self):
        self.smallRadioButtonGroup.Hide()
       
    def __SetTabNames(self):
        if shop.GetTabCount() == 2:
            self.middleRadioButtonGroup.SetText(0, shop.GetTabName(0))
            self.middleRadioButtonGroup.SetText(1, shop.GetTabName(1))
        elif shop.GetTabCount() == 3:
            self.smallRadioButtonGroup.SetText(0, shop.GetTabName(0))
            self.smallRadioButtonGroup.SetText(1, shop.GetTabName(1))
            self.smallRadioButtonGroup.SetText(2, shop.GetTabName(2))

    def Destroy(self):
        if app.ENABLE_TRADABLE_ICON:
            self.Close(True)
            self.interface = None
        else:
            self.Close()
        self.ClearDictionary()

        self.tooltipItem = 0
        self.itemSlotWindow = 0
        self.btnBuy = 0
        self.btnSell = 0
        self.btnClose = 0
        self.titleBar = 0
        self.vid = 0
        self.questionDialog = None
        self.popup = None


    def Open(self, vid, count, type=0, points=0, curLimit=0, maxLimit=0):
        self.vid=int(vid)
        isPrivateShop = False
        isMainPlayerPrivateShop = False
        myshop=False
        for i in xrange(len(constInfo.MyShops)):
            if int(constInfo.MyShops[i]["vid"]) == int(self.vid):
                myshop=True
                self.vid=int(constInfo.MyShops[i]["id"])
        chr.SelectInstance(self.vid)
        if (chr.GetRace() == 30000 or chr.GetRace() == 30001 or chr.GetRace() == 30002 or chr.GetRace() == 30003 or chr.GetRace() == 30004 or chr.GetRace() == 30005 or chr.GetRace() == 30006 or chr.GetRace() == 30007) or not chr.IsNPC(self.vid):
            isPrivateShop = True
        if player.IsMainCharacterIndex(self.vid):
            myshop=True
            self.vid=""
        if myshop == True:
            isMainPlayerPrivateShop = True

            self.btnBuy.Hide()
            self.btnSell.Hide()
            self.btnClose.Show()
           
            if vid != 0:
                self.titleName.SetText("%s'in D\xfckkan\xfd" % chr.GetNameByVID(vid))

        else:

            isMainPlayerPrivateShop = False

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

            self.SetSize(self.realWidth, self.realHeight)  
            self.titleBar.SetWidth(self.realTitleBarX)
            if vid != 0:
                self.titleName.SetText("%s'in D\xfckkan\xfd" % chr.GetNameByVID(vid))
           
        shop.Open(isPrivateShop, isMainPlayerPrivateShop)
   
        self.tabIdx = 0
   
        if shop.GetTabCount() == 1:
            self.__ShowBuySellButton()
            self.__HideMiddleTabs()
            self.__HideSmallTabs()
        elif shop.GetTabCount() == 2:
            self.__HideBuySellButton()
            self.__ShowMiddleTabs()
            self.__HideSmallTabs()
            self.__SetTabNames()
            self.middleRadioButtonGroup.OnClick(0)
        elif shop.GetTabCount() == 3:
            self.__HideBuySellButton()
            self.__HideMiddleTabs()
            self.__ShowSmallTabs()
            self.__SetTabNames()
            self.middleRadioButtonGroup.OnClick(1)
           
        if isMainPlayerPrivateShop == True:
            self.btnBuy.Hide()
            self.btnSell.Hide()
               
        self.Refresh()
        self.SetTop()
       
        self.Show()
        self.ViewsBackground.Hide()
        self.ViewsCount.Hide()
        if app.ENABLE_SHOP_SEEN:
            if isPrivateShop and constInfo.RANGE_SHOP_NOT_VIEW != 1:
                if vid != 1 and vid != 11 and vid != 21 and vid != 41 and vid != 51 and vid != 441:
                    self.ViewsBackground.Show()
                    self.ViewsCount.Show()
                    self.ViewsCount.SetText(str(count) + " Kişi bu pazara baktı!")
            else:
                self.ViewsBackground.Hide()
                self.ViewsCount.Hide()
               
        (self.xShopStart, self.yShopStart, z) = player.GetMainCharacterPosition()
        if app.ENABLE_TRADABLE_ICON:
            if not isPrivateShop:
                self.interface.SetOnTopWindow(player.ON_TOP_WND_SHOP)
                self.interface.RefreshMarkInventoryBag()

    if app.ENABLE_TRADABLE_ICON:
        def Close(self, isDestroy=False):
            self.interface.SetOnTopWindow(player.ON_TOP_WND_NONE)
            if not isDestroy:
                self.interface.RefreshMarkInventoryBag()

            if self.itemBuyQuestionDialog:
                self.itemBuyQuestionDialog.Close()
                self.itemBuyQuestionDialog = None
                constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
                   
            constInfo.RANGE_SHOP_NOT_VIEW = 0
            self.OnCloseQuestionDialog()
            shop.Close()
            net.SendShopEndPacket()
            self.CancelShopping()
            self.tooltipItem.HideToolTip()
            self.Hide()

    else:
        def Close(self):
            if self.itemBuyQuestionDialog:
                self.itemBuyQuestionDialog.Close()
                self.itemBuyQuestionDialog = None
                constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)

            constInfo.RANGE_SHOP_NOT_VIEW = 0
            self.OnCloseQuestionDialog()
            shop.Close()
            net.SendShopEndPacket()
            self.CancelShopping()
            self.tooltipItem.HideToolTip()
            self.Hide()

    def GetIndexFromSlotPos(self, slotPos):
        return self.tabIdx * shop.SHOP_SLOT_COUNT + slotPos
       
    def OnClickTabButton(self, idx):
        self.tabIdx = idx
        self.Refresh()

    def AskClosePrivateShop(self):
        questionDialog = uiCommon.QuestionDialog()
        questionDialog.SetText(localeInfo.PRIVATE_SHOP_CLOSE_QUESTION)
        questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnClosePrivateShop))
        questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
        questionDialog.Open()
        self.questionDialog = questionDialog

        return TRUE

    def OnClosePrivateShop(self):
        net.SendChatPacket("/close_shop "+str(self.vid))
        self.OnCloseQuestionDialog()
        return True

    def OnPressEscapeKey(self):
        self.Close()
        return TRUE

    def OnPressExitKey(self):
        self.Close()
        return TRUE

    def OnBuy(self):
        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_BUY_INFO)
        app.SetCursor(app.BUY)
        self.btnSell.SetUp()

    def OnSell(self):
        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_SELL_INFO)
        app.SetCursor(app.SELL)
        self.btnBuy.SetUp()

    def CancelShopping(self):
        self.btnBuy.SetUp()
        self.btnSell.SetUp()
        app.SetCursor(app.NORMAL)

    def __OnClosePopupDialog(self):
        self.pop = None

    def SellAttachedItem(self):

        if shop.IsPrivateShop():
            mouseModule.mouseController.DeattachObject()
            return
           
        attachedSlotType = mouseModule.mouseController.GetAttachedType()
        attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
        attachedCount = mouseModule.mouseController.GetAttachedItemCount()
        attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
        if player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType or player.SLOT_TYPE_GIFT_BOX_INVENTORY == attachedSlotType or player.SLOT_TYPE_ATTRIBUTE_INVENTORY == attachedSlotType or player.SLOT_TYPE_FLOWER_INVENTORY == attachedSlotType:

            itemIndex = player.GetItemIndex(attachedInvenType, attachedSlotPos)
            item.SelectItem(itemIndex)

            if item.IsAntiFlag(item.ANTIFLAG_SELL):
                popup = uiCommon.PopupDialog()
                popup.SetText(localeInfo.SHOP_CANNOT_SELL_ITEM)
                popup.SetAcceptEvent(self.__OnClosePopupDialog)
                popup.Open()
                self.popup = popup

            elif player.IsValuableItem(attachedSlotPos):

                itemPrice = player.GetISellItemPrice(attachedInvenType,attachedSlotPos)


                itemName = item.GetItemName()
               

                questionDialog = uiCommon.QuestionDialog()
                questionDialog.SetText(localeInfo.DO_YOU_SELL_ITEM(itemName, attachedCount, itemPrice))

                questionDialog.SetAcceptEvent(lambda arg1=attachedSlotPos, arg2=attachedCount, arg3=attachedInvenType: self.OnSellItem(arg1, arg2, arg3))
                questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
                questionDialog.Open()
                self.questionDialog = questionDialog

            else:
                self.OnSellItem(attachedSlotPos, attachedCount, attachedInvenType)

        else:
            snd.PlaySound("sound/ui/loginfail.wav")

        mouseModule.mouseController.DeattachObject()

    def OnSellItem(self, slotPos, count, inventype):
        net.SendShopSellPacketNew(slotPos, count, inventype)
        snd.PlaySound("sound/ui/money.wav")
        self.OnCloseQuestionDialog()

    def OnCloseQuestionDialog(self):
        if self.questionDialog:
            self.questionDialog.Close()

        self.questionDialog = None

    def SelectEmptySlot(self, selectedSlotPos):

        isAttached = mouseModule.mouseController.isAttached()
        if isAttached:
            self.SellAttachedItem()

    def UnselectItemSlot(self, selectedSlotPos):
        if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
            return
        if shop.IsPrivateShop():
            self.AskBuyItem(selectedSlotPos)
        else:
            net.SendShopBuyPacket(self.__GetRealIndex(selectedSlotPos))  

    def SelectItemSlot(self, selectedSlotPos):

        isAttached = mouseModule.mouseController.isAttached()
        if isAttached:
            self.SellAttachedItem()

        else:

            if TRUE == shop.IsMainPlayerPrivateShop():
                return

            curCursorNum = app.GetCursor()
            if app.BUY == curCursorNum:
                self.AskBuyItem(selectedSlotPos)

            elif app.SELL == curCursorNum:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_SELL_INFO)

            else:
                selectedItemID = shop.GetItemID(selectedSlotPos)
                itemCount = shop.GetItemCount(selectedSlotPos)

                type = player.SLOT_TYPE_SHOP
                if shop.IsPrivateShop():
                    type = player.SLOT_TYPE_PRIVATE_SHOP

                mouseModule.mouseController.AttachObject(self, type, selectedSlotPos, selectedItemID, itemCount)
                mouseModule.mouseController.SetCallBack("INVENTORY", ui.__mem_func__(self.DropToInventory))
                snd.PlaySound("sound/ui/pick.wav")

    def DropToInventory(self):
        attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
        self.AskBuyItem(attachedSlotPos)

    def AskBuyItem(self, slotPos):
        if app.ENABLE_SOLD_ITEM_SYSTEM:
            if shop.GetItemIsSold(slotPos) == 1:
                return
        #slotPos = self.__GetRealIndex(slotPos)
        itemIndex = shop.GetItemID(slotPos)
        itemPrice = shop.GetItemPrice(slotPos)
        if app.ENABLE_CHEQUE_SYSTEM:
            itemPriceCheque = shop.GetItemPriceCheque(slotPos)
        itemCount = shop.GetItemCount(slotPos)

        item.SelectItem(itemIndex)
        itemName = item.GetItemName()

        itemBuyQuestionDialog = uiCommon.QuestionDialog()
        coinType = shop.GetTabCoinType(self.tabIdx)
        if app.ENABLE_CHEQUE_SYSTEM:
            if shop.IsPrivateShop():
                itemBuyQuestionDialog.SetText(localeInfo.DO_YOU_BUY_ITEM_CHEQUE(itemName, itemCount, localeInfo.NumberToMoneyString(itemPrice), localeInfo.NumberToChequeString(itemPriceCheque)))
            else:
                buyItemVnum = shop.GetBuyWithItem(slotPos)
                if buyItemVnum != 0:
                    item.SelectItem(buyItemVnum)
                    istenenItemAd = item.GetItemName()
                    itemBuyQuestionDialog.SetText(localeInfo.DO_YOU_BUY_ITEM(itemName, itemCount, localeInfo.NumberToWithItemString(itemPrice, istenenItemAd)))

                elif coinType == shop.SHOP_COIN_TYPE_YEAR_ROUND_COIN:
                    itemBuyQuestionDialog.SetText(localeInfo.DO_YOU_BUY_ITEM(itemName, itemCount, localeInfo.NumberToYearRoundPointString(itemPrice)))
                else:
                    itemBuyQuestionDialog.SetText(localeInfo.DO_YOU_BUY_ITEM(itemName, itemCount, localeInfo.NumberToMoneyString(itemPrice)))
        else:
            itemBuyQuestionDialog.SetText(localeInfo.DO_YOU_BUY_ITEM(itemName, itemCount, localeInfo.NumberToMoneyString(itemPrice)))
        itemBuyQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.Open()
        itemBuyQuestionDialog.pos = slotPos
        self.itemBuyQuestionDialog = itemBuyQuestionDialog

    def AnswerBuyItem(self, flag):
        if flag:
            pos = self.itemBuyQuestionDialog.pos
            net.SendShopBuyPacket(pos)

        self.itemBuyQuestionDialog.Close()
        self.itemBuyQuestionDialog = None

        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)

    def SetItemToolTip(self, tooltipItem):
        self.tooltipItem = tooltipItem

    def OverInItem(self, slotIndex):
        # slotIndex = self.__GetRealIndex(slotIndex)
        # if mouseModule.mouseController.isAttached():
            # return

        coinType = shop.GetTabCoinType(self.tabIdx)
        # if 0 != self.tooltipItem:
            # self.tooltipItem.SetShopItem(slotIndex, coinType)
           
        slotIndex = self.__GetRealIndex(slotIndex)
        if mouseModule.mouseController.isAttached():
            return

        if app.ENABLE_2TH_SHOPEX_SYSTEM:
            if not shop.IsPrivateShop():
                if 0 != self.tooltipItem:
                    self.tooltipItem.SetShopExItem(slotIndex, shop.GetType())
            else:
                if 0 != self.tooltipItem:
                    self.tooltipItem.SetShopItem(slotIndex, coinType)
        else:
            if 0 != self.tooltipItem:
                if shop.SHOP_COIN_TYPE_GOLD == shop.GetTabCoinType(self.tabIdx):
                    self.tooltipItem.SetShopItem(slotIndex, coinType)

    def OverOutItem(self):
        if 0 != self.tooltipItem:
            self.tooltipItem.HideToolTip()
            constInfo.MODEL_RENDER = 0
            constInfo.RENDER_WINDOW_TYPE = "NONE"


    def OnUpdate(self):      
        USE_SHOP_LIMIT_RANGE = 1000

        (x, y, z) = player.GetMainCharacterPosition()
        if abs(x - self.xShopStart) > USE_SHOP_LIMIT_RANGE or abs(y - self.yShopStart) > USE_SHOP_LIMIT_RANGE:
            self.Close()
           
    if app.ENABLE_TRADABLE_ICON:
        def BindInterface(self, interface):
            self.interface = interface
           
        def CantSellInvenItem(self, slotPos):
            itemIndex = player.GetItemIndex(slotPos)
           
            if itemIndex != 0:
                itemIsAntiFlagBySlot = player.IsAntiFlagBySlot(player.INVENTORY, slotPos, item.ANTIFLAG_SELL)
                if itemIsAntiFlagBySlot:
                    return True
           
            return False

        def OnTop(self):
            if not shop.IsPrivateShop():
                self.interface.SetOnTopWindow(player.ON_TOP_WND_SHOP)
                self.interface.RefreshMarkInventoryBag()


class MallPageDialog(ui.ScriptWindow):
    def __init__(self):
        ui.ScriptWindow.__init__(self)

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

    def Destroy(self):
        self.ClearDictionary()

    def Open(self):
        scriptLoader = ui.PythonScriptLoader()
        scriptLoader.LoadScriptFile(self, "uiscript/mallpagedialog.py")

        self.GetChild("titlebar").SetCloseEvent(ui.__mem_func__(self.Close))
       
        (x, y)=self.GetGlobalPosition()
        x+=10
        y+=30
       
        MALL_PAGE_WIDTH = 720
        MALL_PAGE_HEIGHT = 1120
       
        app.ShowWebPage(
            "http://metin2.co.kr/08_mall/game_mall/login_fail.htm",
            (x, y, x+MALL_PAGE_WIDTH, y+MALL_PAGE_HEIGHT))

        self.Lock()
        self.Show()
       
    def Close(self):          
        app.HideWebPage()
        self.Unlock()
        self.Hide()
       
    def OnPressEscapeKey(self):
        self.Close()
        return TRUE
 
Kusura bakma tek tek söylüyorum ama uiTooltip.py de paylaşman lazımmış :)
 
uiTooltip.py:
        ## Bu kısma girmiyor ShopType 5 hangisi.
        elif buyItemVnum != 0 and shopType != 5:
            item.SelectItem(buyItemVnum)
            istenenItemAd = item.GetItemName()
            istenenItemVnum = item.GetVnum()
            self.AppendPrice_WithItem(price, istenenItemVnum, istenenItemAd)
 
Sen hem yang hem de item ile mi satıyorsun o nesneyi.
 
Python:
        #  and shopType != 5 kısmını silip denermisin
        elif buyItemVnum != 0:
            item.SelectItem(buyItemVnum)
            istenenItemAd = item.GetItemName()
            istenenItemVnum = item.GetVnum()
            self.AppendPrice_WithItem(price, istenenItemVnum, istenenItemAd)
 
Normal markette olup uzaktan markette oluyor ilginç. Belki source tarafında bir problem vardır.
 
buradan değiştirilmesi gereken kodlar varmıdır
Python:
import PYTHON_DYNAMIC_MODULE_2019 as pythonApi
import ui
import constInfo
import dbg
event = __import__(pythonApi.GetModuleName("event"))
chat = __import__(pythonApi.GetModuleName("chat"))
import interfaceModule
from ui_wrapper import _ui
import constinfo
net = __import__(pythonApi.GetModuleName("net"))
player = __import__(pythonApi.GetModuleName("player"))
import playerSettingModule
import os


class UzakMarket(ui.ScriptWindow):
    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.BuildWindow()
       
        self.IsShow = False

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

    def BindInterfaceClass(self, interface):
        self.interface = interface

    def BuildWindow(self) :  
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/fastmenu.py")
        except:
            import exception
            exception.Abort("UzakMarket.BuildWindow")

        self.ParentBoard = self.GetChild("board")
        self.ChildBoard = self.GetChild("BlackBoard")
        self.GetChild("title").SetCloseEvent(ui.__mem_func__(self.Close))
       
        self.ButtonList = []
        BUTTON_COUNT = 6
        NPC_VNUM = [1,11,21,41,51,421]
        NPC_TEXT =    {
            1:    "Silah Satıcısı",
            11: "Zırh Satıcısı",
            21: "Satıcı",
            41: "Balıkçı",
            51: "Simyacı",
            421: "Biyolog Yardımcısı"
        }
        self.DlgWidht = 190
        self.BlackBoardHeight = 23*6 + 5*(6-1) + 13 - 60 + (10*BUTTON_COUNT) ## -38 for the new buttons
        self.DlgHeight = self.BlackBoardHeight + 51
        for i in xrange(BUTTON_COUNT):
            btnShop = ui.MakeButton(self.ChildBoard, 8, 6 + 28 * int(i), "", "d:/ymir work/ui/game/myshop_deco/", "select_btn_01.sub", "select_btn_02.sub", "select_btn_03.sub")
            btnShop.SetText(NPC_TEXT[NPC_VNUM[int(i)]])
            btnShop.SetEvent(lambda arg = NPC_VNUM[i]: self.OnClickMenu(arg))
            self.ButtonList.append(btnShop)
   
        self.ParentBoard.SetSize(self.DlgWidht, self.DlgHeight)
        self.ChildBoard.SetSize(self.DlgWidht - 26, self.BlackBoardHeight)
        self.SetSize(self.DlgWidht, self.DlgHeight)
        self.SetCenterPosition()
        self.UpdateRect()

    def OnClickMenu(self, arg):
        constInfo.RANGE_SHOP_NOT_VIEW = 1
        self.Close()
        net.SendChatPacket("/open_range_npc " + str(arg))

    def Show(self) :
        ui.ScriptWindow.Show(self)
        self.IsShow = True

    def Close(self):
        self.Hide()
        self.IsShow = False

    def OnPressEscapeKey(self):
        self.Close()
        return True

    def IsShowWindow(self):
        return self.IsShow
       
class SearchBoard(ui.ScriptWindow):
    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.BuildWindow()
       
        self.IsShow = False

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

    def BindInterfaceClass(self, interface):
        self.interface = interface

    def BuildWindow(self) :  
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/fastmenu.py")
        except:
            import exception
            exception.Abort("SearchBoard.BuildWindow")

        self.ParentBoard = self.GetChild("board")
        self.ChildBoard = self.GetChild("BlackBoard")
        self.GetChild("title").SetCloseEvent(ui.__mem_func__(self.Close))
       

        self.ButtonList = []
        BUTTON_COUNT = 2
        BTN_VNUM = [1,2]
        BTN_TEXT =    {
            1:    "Ticaret Camı",
            2:    "Ortalama Fiyat"
        }
        self.DlgWidht = 190
        self.BlackBoardHeight = 23*6 + 5*(6-1) + 13 - 60 + (10*BUTTON_COUNT) - 71 ## -38 for the new buttons
        self.DlgHeight = self.BlackBoardHeight + 51
        for i in xrange(BUTTON_COUNT):
            btnShop = ui.MakeButton(self.ChildBoard, 8, 6 + 28 * int(i), "", "d:/ymir work/ui/game/myshop_deco/", "select_btn_01.sub", "select_btn_02.sub", "select_btn_03.sub")
            btnShop.SetText(BTN_TEXT[BTN_VNUM[int(i)]])
            btnShop.SetEvent(lambda arg = BTN_VNUM[i]: self.OnClickMenu(arg))
            self.ButtonList.append(btnShop)
   
        self.ParentBoard.SetSize(self.DlgWidht, self.DlgHeight)
        self.ChildBoard.SetSize(self.DlgWidht - 26, self.BlackBoardHeight)
        self.SetSize(self.DlgWidht, self.DlgHeight)
        self.SetCenterPosition()
        self.UpdateRect()

    def OnClickMenu(self, arg):
        if (int(arg) == 2):
            #constInfo.AVERAGE_OPEN = 1
            net.SendChatPacket("/open_average_search")
        elif (int(arg) == 1):
            net.SendChatPacket("/open_private_search")
       
        self.Close()

    def Show(self) :
        ui.ScriptWindow.Show(self)
        self.IsShow = True

    def Close(self):
        self.Hide()
        self.IsShow = False

    def OnPressEscapeKey(self):
        self.Close()
        return True

    def IsShowWindow(self):
        return self.IsShow
 
Geri
Üst