Çözülemedi an integer is required

Ne yazık ki bu konuda sorulara çözüm bulunmuyor. Eğer konuda yorumlar varsa hepsini inceleyebilirsiniz. Belki sizlerin sorununuzu çözmek için için ipuçları bulabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

ezentere

Üye
Üye
Mesaj
92
Çözümler
3
Beğeni
28
Puan
429
Ticaret Puanı
0
Astra2 filesinden offline shop unu söktüm, python tarafını packlerime göre düzenledim, ne kadar doğru oldu bilmiyorum ama oyuna giriş yaptıktan sonra offline shop a tıkladığımda böyle bir syserr düşüyor.

Syserr.TXT:
1118 15:48:24190 :: Traceback (most recent call last):

1118 15:48:24190 ::   File "interfaceModule.py", line 1370, in RecvQuest

1118 15:48:24190 ::   File "interfaceModule.py", line 1375, in BINARY_RecvQuest

1118 15:48:24191 ::   File "interfaceModule.py", line 1457, in __FindQuestButton

1118 15:48:24191 :: AttributeError
1118 15:48:24191 :: :
1118 15:48:24192 :: 'Interface' object has no attribute 'questButtonList'
1118 15:48:24192 ::

1118 15:48:24219 :: uiTaskBar:978: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

1118 15:48:24219 :: Traceback (most recent call last):

1118 15:48:24220 ::   File "uiTaskBar.py", line 978, in OnUpdate

1118 15:48:24220 :: TypeError
1118 15:48:24220 :: :
1118 15:48:24221 :: an integer is required
1118 15:48:24221 ::

interfaceModule.py 1370:
    def RecvQuest(self, index, name):
        # QUEST_LETTER_IMAGE
        self.BINARY_RecvQuest(index, name, "file", localeInfo.GetLetterImageName())
        # END_OF_QUEST_LETTER_IMAGE
interfaceModule.py 1375:
    def BINARY_RecvQuest(self, index, name, iconType, iconName):

        btn = self.__FindQuestButton(index)
        if 0 != btn:
            self.__DestroyQuestButton(btn)

        btn = uiWhisper.WhisperButton()

        # QUEST_LETTER_IMAGE
        ##!! 20061026.levites.퀘스트_이미지_교체
        import item
        if "item"==iconType:
            item.SelectItem(int(iconName))
            buttonImageFileName=item.GetIconImageFileName()
        else:
            buttonImageFileName=iconName

        if localeInfo.IsEUROPE():
            if "highlight" == iconType:
                btn.SetUpVisual("locale/ymir_ui/highlighted_quest.tga")
                btn.SetOverVisual("locale/ymir_ui/highlighted_quest_r.tga")
                btn.SetDownVisual("locale/ymir_ui/highlighted_quest_r.tga")
            else:
                btn.SetUpVisual(localeInfo.GetLetterCloseImageName())
                btn.SetOverVisual(localeInfo.GetLetterOpenImageName())
                btn.SetDownVisual(localeInfo.GetLetterOpenImageName())              
        else:
            btn.SetUpVisual(buttonImageFileName)
            btn.SetOverVisual(buttonImageFileName)
            btn.SetDownVisual(buttonImageFileName)
            btn.Flash()
        # END_OF_QUEST_LETTER_IMAGE

        if localeInfo.IsARABIC():
            btn.SetToolTipText(name, 0, 35)
            btn.ToolTipText.SetHorizontalAlignCenter()
        else:
            btn.SetToolTipText(name, -20, 35)
            btn.ToolTipText.SetHorizontalAlignLeft()
           
        btn.SetEvent(ui.__mem_func__(self.__StartQuest), btn)
        btn.Show()

        btn.index = index
        btn.name = name

        self.questButtonList.insert(0, btn)
        self.__ArrangeQuestButton()

        #chat.AppendChat(chat.CHAT_TYPE_NOTICE, localeInfo.QUEST_APPEND)
interfaceModule.py 1457:
    def __FindQuestButton(self, index):
        for btn in self.questButtonList:
            if btn.index == index:
                return btn

        return 0
uiTaskBar.py 978:
    def OnUpdate(self):
        if app.GetGlobalTime() - self.lastUpdateQuickSlot > 500:
            self.lastUpdateQuickSlot = app.GetGlobalTime()
            self.RefreshQuickSlot()

        if True == self.hpGaugeBoard.IsIn():
            self.tooltipHP.Show()
        else:
            self.tooltipHP.Hide()

        if True == self.mpGaugeBoard.IsIn():
            self.tooltipSP.Show()
        else:
            self.tooltipSP.Hide()

        if True == self.stGaugeBoard.IsIn():
            self.tooltipST.Show()
        else:
            self.tooltipST.Hide()
       
        if True == self.expGaugeBoard.IsIn():
            self.tooltipEXP.Show()
        else:
            self.tooltipEXP.Hide()
 
Son düzenleme:
Kodları da ekleyin. Bu şekilde nasıl anlayacağız? :)
 
Başka bir yerde hata olmuş olabilir. Kodları inceledim ancak gözüme bir sorun çarpmadı. Eski yedekler duruyorsa karşılaştırma yapabilirsiniz
 
Başka bir yerde hata olmuş olabilir. Kodları inceledim ancak gözüme bir sorun çarpmadı. Eski yedekler duruyorsa karşılaştırma yapabilirsiniz
Kodları inceledim tek tek karşılaştırdım ama sorun bulamadım bende.
Yedeklerden sıfırdan ekledim. Bu hata kalktı ama bu seferde pazar aç tuşuna basınca hiç bir şey gelmiyor.

debug ekranında bu yazıyor.
Kod:
PointWindow: OpenShopButton
===== Load Script File : UIScript/PrivateShopBuilder.py
===== Load Script File : UIScript/PrivateShopBuilder.py
uiPrivateShopBuilder.py:
import ui
import snd
import shop
import mouseModule
import player
import chr
import net
import uiCommon
import localeInfo
import chat
import item
import systemSetting #±èÁØÈ£
import player #±èÁØÈ£
import app
import __builtin__ as selfs
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
    import constInfo
    import uiPrivateShopEditor
    import chat

g_isBuildingPrivateShop = False

g_itemPriceDict={}

g_privateShopAdvertisementBoardDict={}

def Clear():
    global g_itemPriceDict
    global g_isBuildingPrivateShop
    g_itemPriceDict={}
    g_isBuildingPrivateShop = False
    # @@@correction007 BEGIN
    global g_privateShopAdvertisementBoardDict
    g_privateShopAdvertisementBoardDict={}
    # @@@correction007 END

def IsPrivateShopItemPriceList():
    global g_itemPriceDict
    if g_itemPriceDict:
        return True
    else:
        return False

def IsBuildingPrivateShop():
    global g_isBuildingPrivateShop
    if player.IsOpenPrivateShop() or g_isBuildingPrivateShop:
        return True
    else:
        return False

def SetPrivateShopItemPrice(itemVNum, itemPrice):
    global g_itemPriceDict
    g_itemPriceDict[int(itemVNum)]=itemPrice

def GetPrivateShopItemPrice(itemVNum):
    try:
        global g_itemPriceDict
        return g_itemPriceDict[itemVNum]
    except KeyError:
        return 0

def UpdateADBoard():
    for key in g_privateShopAdvertisementBoardDict.keys():
        g_privateShopAdvertisementBoardDict[key].Show()

def DeleteADBoard(vid):
    if not g_privateShopAdvertisementBoardDict.has_key(vid):
        return

    del g_privateShopAdvertisementBoardDict[vid]


class PrivateShopAdvertisementBoard(ui.ThinBoard):
    def __init__(self):
        ui.ThinBoard.__init__(self, "UI_BOTTOM")
        self.vid = None
        self.__MakeTextLine()

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

    def __MakeTextLine(self):
        self.textLine = ui.TextLine()
        self.textLine.SetParent(self)
        self.textLine.SetWindowHorizontalAlignCenter()
        self.textLine.SetWindowVerticalAlignCenter()
        self.textLine.SetHorizontalAlignCenter()
        self.textLine.SetVerticalAlignCenter()
        self.textLine.Show()

    def Open(self, vid, text):
        self.vid = vid

        self.textLine.SetText(text)
        self.textLine.UpdateRect()
        self.SetSize(len(text)*6 + 10*2, 20)
        self.Show()

        g_privateShopAdvertisementBoardDict[vid] = self

    def OnMouseLeftButtonUp(self):
        if not self.vid:
            return
        net.SendOnClickPacket(self.vid)

        return True

    def OnUpdate(self):
        if not self.vid:
            return

        if systemSetting.IsShowSalesText():
            self.Show()
            (x, y) = chr.GetProjectPosition(self.vid, 220)
            self.SetPosition(x - self.GetWidth() / 2, y - self.GetHeight() / 2)

        else:
            for key in g_privateShopAdvertisementBoardDict.keys():
                if player.GetMainCharacterIndex() == key:
                    g_privateShopAdvertisementBoardDict[key].Show()
                    x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220)
                    g_privateShopAdvertisementBoardDict[key].SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2)
                else:
                    g_privateShopAdvertisementBoardDict[key].Hide()

class PrivateShopBuilder(ui.ScriptWindow):

    def __init__(self):
        #print "NEW MAKE_PRIVATE_SHOP_WINDOW ----------------------------------------------------------------"
        ui.ScriptWindow.__init__(self)


        self.itemStock = {}
        self.tooltipItem = None
        self.priceInputBoard = None
        if not app.ENABLE_OFFLINE_PRIVATE_SHOP:
            self.title = ""
        else:
            self.time_select_pivot_window = 0
            self.cur_time_text = 0
            self.time_select_button = 0
            self.time_bar = 0
            self.time_listbox = 0
            self.time_scrollbar = 0
            self.Page1Button = None
            self.Page2Button = None
            self.page = 0
            self.list = [None] * 180
            self.TitleType = 0
            self.PolyVnum = 30000

        self.__LoadWindow()
    def __del__(self):
        #print "------------------------------------------------------------- DELETE MAKE_PRIVATE_SHOP_WINDOW"
        ui.ScriptWindow.__del__(self)

    def __LoadWindow(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/PrivateShopBuilder.py")
        except:
            import exception
            exception.Abort("PrivateShopBuilderWindow.LoadWindow.LoadObject")

        try:
            GetObject = self.GetChild
            self.nameLine = GetObject("NameLine")
            self.itemSlot = GetObject("ItemSlot")
            self.btnOk = GetObject("OkButton")
            self.btnClose = GetObject("CloseButton")
            self.titleBar = GetObject("TitleBar")
            if app.ENABLE_OFFLINE_PRIVATE_SHOP:
                self.positionInfo = GetObject("Position")
                self.time_select_pivot_window = GetObject("time_select_pivot_window")
                self.cur_time_text = GetObject("cur_time_text")
                self.time_select_button = GetObject("time_select_button")
                self.Page1Button = GetObject("Page1Button")
                self.Page2Button = GetObject("Page2Button")
        except:
            import exception
            exception.Abort("PrivateShopBuilderWindow.LoadWindow.BindObject")

        self.btnOk.SetEvent(ui.__mem_func__(self.OnOk))
        self.btnClose.SetEvent(ui.__mem_func__(self.OnClose))
        self.titleBar.SetCloseEvent(ui.__mem_func__(self.OnClose))

        self.itemSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.OnSelectEmptySlot))
        self.itemSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.OnSelectItemSlot))
        self.itemSlot.SetOverInItemEvent(ui.__mem_func__(self.OnOverInItem))
        self.itemSlot.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem))

        if app.ENABLE_OFFLINE_PRIVATE_SHOP:
            self.Page1Button.SetEvent(ui.__mem_func__(self.SetPage), 0)
            self.Page2Button.SetEvent(ui.__mem_func__(self.SetPage), 1)
            self.Page1Button.Down()
            import uiScriptLocale
            self.cur_time_text.SetText(localeInfo.TOOLTIP_ITEM_NORMAL + " " + uiScriptLocale.SHOP_TITLE)

            self.time_bar = ui.Bar()
            x, y = self.time_select_pivot_window.GetGlobalPosition()
            self.time_bar.SetPosition(x, y)
            self.time_bar.SetSize(159, 94)
            self.time_bar.SetColor(0xFF000000)
            self.time_bar.AddFlag("float")
            self.time_bar.Hide()

            self.time_listbox = ui.ListBoxEx()
            self.time_listbox.SetParent(self.time_bar)
            self.time_listbox.SetPosition(0, 0)
            self.time_listbox.SetSize(159, 94)
            self.time_listbox.SetViewItemCount(5)
            for i in xrange(len(constInfo.OfflinePrivateShopTimeList)):
                if not i:
                    self.time_listbox.AppendItem(uiPrivateShopEditor.Item(localeInfo.TOOLTIP_ITEM_NORMAL + " " + uiScriptLocale.SHOP_TITLE))
                else:
                    self.time_listbox.AppendItem(uiPrivateShopEditor.Item("%d " % constInfo.OfflinePrivateShopTimeList[i] + uiScriptLocale.PET_INFORMATION_LIFE_TIME))

            self.time_listbox.SetSelectEvent(ui.__mem_func__(self.__SelectTime))
            self.time_listbox.Show()

            self.time_scrollbar = ui.ScrollBar()
            self.time_scrollbar.SetParent(self.time_listbox)
            self.time_scrollbar.SetScrollBarSize(94)
            self.time_scrollbar.SetPosition(144, 0)
            self.time_scrollbar.Show()
            self.time_listbox.SetScrollBar(self.time_scrollbar)

            self.time_select_button.SAFE_SetEvent(self.OnTimeSelect)

    def Destroy(self):
        self.ClearDictionary()

        self.nameLine = None
        self.itemSlot = None
        self.btnOk = None
        self.btnClose = None
        self.titleBar = None
        self.priceInputBoard = None
        if app.ENABLE_OFFLINE_PRIVATE_SHOP:
            self.time_select_pivot_window = 0
            self.cur_time_text = 0
            self.time_select_button = 0
            self.time_bar = 0
            self.time_listbox = 0
            self.time_scrollbar = 0
            self.Page1Button = None
            self.Page2Button = None
            self.page = 0
            self.list = []
            self.TitleType = 0
            self.PolyVnum = 30000

    # def Open(self, title):
    def Open(self, title, TitleType, PolyVnum):
        # self.title = title

        # if len(title) > 25:
            # title = title[:22] + "..."

        if not app.ENABLE_OFFLINE_PRIVATE_SHOP:
            self.title = title
            if len(title) > 25:
                title = title[:22] + "..."

            self.nameLine.SetText(title)
        else:
            self.TitleType = TitleType
            self.PolyVnum = PolyVnum

        self.itemStock = {}
        shop.ClearPrivateShopStock()
        # self.nameLine.SetText(title)
        self.SetCenterPosition()
        self.Refresh()
        self.Show()

        global g_isBuildingPrivateShop
        g_isBuildingPrivateShop = True

    def Close(self):
        global g_isBuildingPrivateShop
        g_isBuildingPrivateShop = False

        if not app.ENABLE_OFFLINE_PRIVATE_SHOP:
            self.title = ""

        self.itemStock = {}
        shop.ClearPrivateShopStock()
        self.Hide()

        if app.ENABLE_OFFLINE_PRIVATE_SHOP:
            self.time_bar.Hide()

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

    def Refresh(self):
        getitemVNum=player.GetItemIndex
        getItemCount=player.GetItemCount
        setitemVNum=self.itemSlot.SetItemSlot
        delItem=self.itemSlot.ClearSlot

        if app.ENABLE_OFFLINE_PRIVATE_SHOP:
            asd = 0
            z = 1
            j = asd / 45
            if self.page and j:
                if j == 1:
                    z = 0
                elif j == 3:
                    z = 2
                asd = asd % 45
            self.list = [None] * 180

        for i in xrange(shop.SHOP_PAGE_SIZE):
            slotNumber = self.page * shop.SHOP_PAGE_SIZE + i
            if app.ENABLE_OFFLINE_PRIVATE_SHOP:
                y = i / 10
                x = i % 10
                y2 = asd / 5
                x2 = asd % 5
                var = (y * 10) + (z * 5) + self.page * shop.SHOP_PAGE_SIZE
                if y2 > y and z:
                    var += y2 * 10

                if y2 > y and not z:
                    var += 5

                if y2 == y:
                    var += x2

                if slotNumber >= var or (self.page and z and not j):
                    btn = ui.Button()
                    btn.SetParent(self.itemSlot)
                    btn.SetUpVisual("d:/ymir work/ui/game/shopsearchp2p/padlock.dds")
                    btn.SetOverVisual("d:/ymir work/ui/game/shopsearchp2p/padlock.dds")
                    btn.SetDownVisual("d:/ymir work/ui/game/shopsearchp2p/padlock.dds")
                    btn.SetPosition((x) * 32, (y) * 32)
                    # btn.SetEvent(lambda : self.DeleteAll())
                    btn.Show()
                    self.list[slotNumber] = (btn)

            slot = self.itemSlot
            # TraceError("%d - %d" % (i, slotNumber))

            if not self.itemStock.has_key(slotNumber):
                delItem(i)
                continue

            pos = self.itemStock[slotNumber]

            itemCount = getItemCount(*pos)
            if itemCount <= 1:
                itemCount = 0
            setitemVNum(i, getitemVNum(*pos), itemCount)

            # if ENABLE_CHANGE_LOOK_SYSTEM: # @@@correction025
                # itemTransmutedVnum = player.GetItemChangeLook(invenType, invenPos)
                # if itemTransmutedVnum:
                    # slot.DisableCoverButton(i)
                # else:
                    # slot.EnableCoverButton(i)

        self.itemSlot.RefreshSlot()

        # for i in xrange(shop.SHOP_SLOT_COUNT):

            # if not self.itemStock.has_key(i):
                # delItem(i)
                # continue

            # pos = self.itemStock[i]

            # itemCount = getItemCount(*pos)
            # if itemCount <= 1:
                # itemCount = 0
            # setitemVNum(i, getitemVNum(*pos), itemCount)

        # self.itemSlot.RefreshSlot()

    def OnSelectEmptySlot(self, selectedSlotPos):
        selectedSlotPos += self.page * shop.SHOP_PAGE_SIZE
        isAttached = mouseModule.mouseController.isAttached()
        if isAttached:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()
            attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
            mouseModule.mouseController.DeattachObject()

            if player.SLOT_TYPE_INVENTORY != attachedSlotType and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedSlotType:
                return
            attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)

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

            if item.IsAntiFlag(item.ANTIFLAG_GIVE) or item.IsAntiFlag(item.ANTIFLAG_MYSHOP):
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.PRIVATE_SHOP_CANNOT_SELL_ITEM)
                return


            if app.ENABLE_OFFLINE_PRIVATE_SHOP:
                (width, height) = item.GetItemSize()
                for i in xrange(height):
                    if self.list[selectedSlotPos + (height - 1) * 10]:
                        return

            priceInputBoard = uiCommon.MoneyInputDialog()
            priceInputBoard.SetTitle(localeInfo.PRIVATE_SHOP_INPUT_PRICE_DIALOG_TITLE)
            priceInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputPrice))
            priceInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputPrice))
            if app.ENABLE_OFFLINE_PRIVATE_SHOP and constInfo.PriceCheck.has_key(itemVNum):
                (min, max) = constInfo.PriceCheck[itemVNum]
                priceInputBoard.SetCheckPrices(min, max)

            priceInputBoard.Open()

            itemPrice=GetPrivateShopItemPrice(itemVNum)

            if itemPrice>0:
                priceInputBoard.SetValue(itemPrice)

            self.priceInputBoard = priceInputBoard
            self.priceInputBoard.itemVNum = itemVNum
            self.priceInputBoard.sourceWindowType = attachedInvenType
            self.priceInputBoard.sourceSlotPos = attachedSlotPos
            self.priceInputBoard.targetSlotPos = selectedSlotPos

    def OnSelectItemSlot(self, selectedSlotPos):
        selectedSlotPos += self.page * shop.SHOP_PAGE_SIZE
        isAttached = mouseModule.mouseController.isAttached()
        if isAttached:
            snd.PlaySound("sound/ui/loginfail.wav")
            mouseModule.mouseController.DeattachObject()

        else:
            if not selectedSlotPos in self.itemStock:
                return

            invenType, invenPos = self.itemStock[selectedSlotPos]
            shop.DelPrivateShopItemStock(invenType, invenPos)
            snd.PlaySound("sound/ui/drop.wav")

            del self.itemStock[selectedSlotPos]

            self.Refresh()

    def AcceptInputPrice(self):

        if not self.priceInputBoard:
            return True

        text = self.priceInputBoard.GetText()

        if not text:
            return True

        if not text.isdigit():
            return True

        if int(text) <= 0:
            return True

        attachedInvenType = self.priceInputBoard.sourceWindowType
        sourceSlotPos = self.priceInputBoard.sourceSlotPos
        targetSlotPos = self.priceInputBoard.targetSlotPos

        for privatePos, (itemWindowType, itemSlotIndex) in self.itemStock.items():
            if itemWindowType == attachedInvenType and itemSlotIndex == sourceSlotPos:
                shop.DelPrivateShopItemStock(itemWindowType, itemSlotIndex)
                del self.itemStock[privatePos]

        price = int(self.priceInputBoard.GetText())

        if app.ENABLE_OFFLINE_PRIVATE_SHOP and constInfo.PriceCheck.has_key(self.priceInputBoard.itemVNum):
            (min, max) = constInfo.PriceCheck[self.priceInputBoard.itemVNum]
            count = player.GetItemCount(sourceSlotPos)
            fprice = float(float(price) / float(count))
            if fprice > float(max) or fprice < float(min):
                chat.AppendChat(chat.CHAT_TYPE_INFO, "Bu Fiyata Ekliyemezsin !")
                return

        if IsPrivateShopItemPriceList():
            SetPrivateShopItemPrice(self.priceInputBoard.itemVNum, price)

        shop.AddPrivateShopItemStock(attachedInvenType, sourceSlotPos, targetSlotPos, price)
        self.itemStock[targetSlotPos] = (attachedInvenType, sourceSlotPos)
        snd.PlaySound("sound/ui/drop.wav")

        self.Refresh()

        #####

        self.priceInputBoard = None
        return True

    def CancelInputPrice(self):
        self.priceInputBoard = None
        return True

    def OnOk(self):

        if not app.ENABLE_OFFLINE_PRIVATE_SHOP and not self.title:
            return
        else:
            if not len(self.nameLine.GetText()):
                return

        if 0 == len(self.itemStock):
            return

        if app.ENABLE_OFFLINE_PRIVATE_SHOP:
            shop.BuildPrivateShop(self.nameLine.GetText(), 3600 * constInfo.OfflinePrivateShopTimeList[self.time_listbox.GetItemIndex(self.time_listbox.GetSelectedItem())], self.TitleType, self.PolyVnum)
        else:
            shop.BuildPrivateShop(self.title)

        self.Close()

    def OnClose(self):
        self.Close()

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

    def OnOverInItem(self, slotIndex):
        slotIndex += self.page * shop.SHOP_PAGE_SIZE
        if self.tooltipItem:
            if self.itemStock.has_key(slotIndex):
                self.tooltipItem.SetPrivateShopBuilderItem(*self.itemStock[slotIndex] + (slotIndex,))

    def OnOverOutItem(self):

        if self.tooltipItem:
            self.tooltipItem.HideToolTip()

    def OnUpdate(self):

        if app.ENABLE_OFFLINE_PRIVATE_SHOP:
            (x, y, z) = player.GetMainCharacterPosition()
            self.positionInfo.SetText("%s - (%.0f, %.0f)" % (localeInfo.MINIMAP_ZONE_NAME_DICT[selfs.wndMiniMap.GetMapName()], x/100, y/100))

    def OnMoveWindow(self, x, y):
        if app.ENABLE_OFFLINE_PRIVATE_SHOP:
             if self.time_bar:
                self.BarAdjustPositionAndSize()

    if app.ENABLE_OFFLINE_PRIVATE_SHOP:
        def BarAdjustPositionAndSize(self):
            x, y = self.time_select_pivot_window.GetGlobalPosition()
            self.time_bar.SetPosition(x, y)

        def __SelectTime(self):
            self.cur_time_text.SetText(self.time_listbox.GetSelectedItem().GetText())
            if self.time_bar:
                self.time_bar.Hide()

        def OnTimeSelect(self):
            x, y = self.time_select_pivot_window.GetGlobalPosition()
            self.time_bar.SetPosition(x, y)
            if self.time_bar:
                if self.time_bar.IsShow():
                    self.time_bar.Hide()
                else:
                    self.time_bar.Show()

        def SetPage(self, i):
            self.page = i
            if i:
                self.Page1Button.SetUp()
            else:
                self.Page2Button.SetUp()

            self.Refresh()

if app.ENABLE_OFFLINE_PRIVATE_SHOP:
    class PrivateShopTitleBar(ui.ShopDecoTitle):
        def __init__(self, type):
            ui.ShopDecoTitle.__init__(self, type-1, "UI_BOTTOM")
                
            self.Show()
            
            self.type = type
            self.vid = None
            self.__MakeTextLine()
            self.__CalcFontColor()

        def __del__(self):
            ui.ShopDecoTitle.__del__(self)
            self.textLine = None
            
        def __CalcFontColor(self) :   
            if self.type != 0 :
                import uiMyShopDecoration
                COLOR = int(uiMyShopDecoration.DECO_SHOP_TITLE_LIST[self.type-1][2], 16)
                
                RED        = (COLOR & 0xFF0000) >> 16
                GREEN    = (COLOR & 0x00FF00) >> 8
                BLUE    = COLOR & 0x0000FF
                
                self.textLine.SetFontColor(float(RED)/255.0, float(GREEN)/255.0, float(BLUE)/255.0)

        def __MakeTextLine(self):
            self.textLine = ui.TextLine()
            # self.textLine.DisableEnterToken()
            self.textLine.SetParent(self)
            self.textLine.SetWindowHorizontalAlignCenter()
            self.textLine.SetWindowVerticalAlignCenter()
            self.textLine.SetHorizontalAlignCenter()
            self.textLine.SetVerticalAlignCenter()
            self.textLine.Show()

        def Open(self, vid, text):
            self.vid = vid

            self.textLine.SetText(text)
            width = max(32, len(text)*6 + 20*2)
            self.SetSize(width, 32)
            
            self.Show()
                    
            g_privateShopAdvertisementBoardDict[vid] = self
            
        def OnMouseLeftButtonUp(self):
            if not self.vid:
                return
            net.SendOnClickPacket(self.vid)
            
            return True
            
        def OnUpdate(self):
            if not self.vid:
                return

            if systemSetting.IsShowSalesText():
                self.Show()
                x, y = chr.GetProjectPosition(self.vid, 220)
                width = x - self.GetWidth()/2
                height = y - self.GetHeight()/2
                self.SetPosition(width, height)
            else:
                for key in g_privateShopAdvertisementBoardDict.keys():
                    if  player.GetMainCharacterIndex() == key:
                        title_bar = g_privateShopAdvertisementBoardDict[key]
                        
                        title_bar.Show()
                        
                        x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220)
                        
                        width = x - title_bar.GetWidth()/2
                        height = y - title_bar.GetHeight()/2
                        
                        title_bar.SetPosition(width, height)
                    else:
                        title_bar = g_privateShopAdvertisementBoardDict[key]
                        title_bar.Hide()
UiScript/PrivateShopBuilder.py:
import uiScriptLocale
import app
window = {
    "name" : "PrivateShopBuilder",

    "x" : 0,
    "y" : 0,

    "style" : ["movable", "float",],

    "width" : 184,
    "height" : 328 + 26,

    "children" :
    [
        {
            "name" : "board",
            "type" : "board",
            "style" : ("attach",),

            "x" : 0,
            "y" : 0,

            "width" : 184,
            "height" : 328 + 26,

            "children" :
            [
                ## Title
                {
                    "name" : "TitleBar",
                    "type" : "titlebar",
                    "style" : ("attach",),

                    "x" : 8,
                    "y" : 8,

                    "width" : 169,
                    "color" : "gray",

                    "children" :
                    (
                        { "name":"TitleName", "type":"text", "x":84, "y":4, "text":uiScriptLocale.PRIVATE_SHOP_TITLE, "text_horizontal_align":"center" },
                    ),
                },

                ## Name_Static
                #{
                #    "name" : "Name_Static", "type" : "text", "x" : 15, "y" : 35 + 3, "text" : uiScriptLocale.PRIVATE_SHOP_NAME,
                #},
                ## Name
                {
                    "name" : "NameSlot",
                    "type" : "slotbar",
                    "x" : 13,
                    "y" : 35,
                    "width" : 90 + 67,
                    "height" : 18,

                    "children" :
                    (
                        {
                            "name" : "NameLine",
                            "type" : "text",
                            "x" : 3,
                            "y" : 3,
                            "width" : 157,
                            "height" : 15,
                            "input_limit" : 25,
                            "text" : "1234567890123456789012345",
                        },
                    ),
                },

                ## Item Slot
                {
                    "name" : "ItemSlot",
                    "type" : "grid_table",

                    "x" : 12,
                    "y" : 34 + 26,

                    "start_index" : 0,
                    "x_count" : 5,
                    "y_count" : 8,
                    "x_step" : 32,
                    "y_step" : 32,

                    "image" : "d:/ymir work/ui/public/Slot_Base.sub",
                },

                ## Ok
                {
                    "name" : "OkButton",
                    "type" : "button",

                    "x" : 21,
                    "y" : 295 + 26,

                    "width" : 61,
                    "height" : 21,

                    "text" : uiScriptLocale.OK,

                    "default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
                    "over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
                    "down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
                },

                ## Close
                {
                    "name" : "CloseButton",
                    "type" : "button",

                    "x" : 104,
                    "y" : 295 + 26,

                    "width" : 61,
                    "height" : 21,

                    "text" : uiScriptLocale.CLOSE,

                    "default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
                    "over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
                    "down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
                },
            ],
        },
    ],
}

if app.ENABLE_OFFLINE_PRIVATE_SHOP:
    window["children"][0]["children"][1]["width"] += 160
    window["children"][0]["children"][1]["children"][0]["width"] += 155
    window["children"][0]["children"][2]["y"] += 26
    window["children"][0]["children"][2]["x_count"] = 10
    window["children"][0]["children"][2]["y_count"] = 9
    window["children"][0]["children"][3]["x"] += 43
    window["children"][0]["children"][3]["y"] -= 288
    window["children"][0]["children"][3]["vertical_align"] = "bottom"
    window["children"][0]["children"][4]["x"] += 121
    window["children"][0]["children"][4]["y"] -= 288
    window["children"][0]["children"][4]["vertical_align"] = "bottom"
    window["style"].pop(1)
    window["children"][0]["children"][1]["children"][0]["type"] = "editline"
    window["children"][0]["children"][1]["children"][0]["text"] = ""

    window["height"] += 35
    window["children"][0]["height"] += 35
    window["children"][0]["children"] += [
        {
            "name" : "Page1Button",
            "type" : "radio_button",

            "x" : 82 - 25,
            "y" : 295 + 35 + 26 + 26,

            "default_image" : "d:/ymir work/ui/game/shopsearchp2p/pageone.dds",
            "over_image" : "d:/ymir work/ui/game/shopsearchp2p/pageone_hover.dds",
            "down_image" : "d:/ymir work/ui/game/shopsearchp2p/pageone_active.dds",
        },
        {
            "name" : "Page2Button",
            "type" : "radio_button",

            "x" : 242 + 25,
            "y" : 295 + 35 + 26 + 26,

            "default_image" : "d:/ymir work/ui/game/shopsearchp2p/pagetwo.dds",
            "over_image" : "d:/ymir work/ui/game/shopsearchp2p/pagetwo_hover.dds",
            "down_image" : "d:/ymir work/ui/game/shopsearchp2p/pagetwo_active.dds",
        },
        {
            "name" : "Position",
            "type" : "text",
            "x" : window["width"] / 2,
            "y" : 34 + 29,
            "text" : "",
            "text_horizontal_align" : "center",
        },
        {
            "name" : "time_window",
            "type" : "window",
            
            "x" : 0,
            "y" : 295 + 35 + 35,
            "width" : 184,
            "height" : 22 + 20,
            "horizontal_align" : "center",
            "children" :
            (
                {
                    "name" : "time_select_img",
                    "type" : "expanded_image",
                    "x" : 13,
                    "y" : 20,
                    "x_scale" : 0.759,
                    "y_scale" : 1.0,
                    "image" : "d:/ymir work/ui/quest_re/button_one.sub",
                },
                {
                    "name" : "cur_time_text_window",
                    "type" : "window",
                    
                    "x" : 13,
                    "y" : 20,
                    "width" : 175-16,
                    "height" : 16,
                    
                    "children" :
                    (
                        {"name":"cur_time_text", "type":"text", "x":0, "y":0, "text": "-", "all_align" : "center"},
                    ),
                },
                {
                    "name" : "time_select_button",
                    "type" : "button",

                    "x" : 13 + 143,
                    "y" : 20,

                    "default_image" : "d:/ymir work/ui/game/party_match/arrow_default.sub",
                    "over_image" : "d:/ymir work/ui/game/party_match/arrow_over.sub",
                    "down_image" : "d:/ymir work/ui/game/party_match/arrow_down.sub",
                },
                {
                    "name" : "time_select_pivot_window",
                    "type" : "window",

                    "x" : 13,
                    "y" : 16+20,
                    "width" : 175,
                    "height" : 0,
                },
            ),
        },
    ]
 
Debug ekranında yazan hata değil. Bilgi mesajı :)
Yüklediği uiscript dosyası yazıyor
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst