Exemplo n.º 1
0
 def Open(self):
     if FALSE == self.isLoaded:
         self.__LoadScript()
     self.__Initialize()
     self.SetTop()
     self.Show()
     (self.xGuildStorageStart, self.yGuildStorageStart,
      z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
     self.amountInput.SetText("1")
Exemplo n.º 2
0
    def OnUpdate(self):
        (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 self.IsShow():
            if systemSetting.IsMultiShopLock() == 1:
                self.AdjustPosition()
Exemplo n.º 3
0
    def OnUpdate(self):

        USE_GUILDSTORAGE_LIMIT_RANGE = 1000

        (x, y, z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
        if abs(x -
               self.xGuildStorageStart) > USE_GUILDSTORAGE_LIMIT_RANGE or abs(
                   y - self.yGuildStorageStart) > USE_GUILDSTORAGE_LIMIT_RANGE:
            self.Close()
Exemplo n.º 4
0
    def Open(self):
        self.cubeItemInfo = {}
        self.cubeResultInfos = []
        self.cubeMaterialInfos = {}

        self.Refresh()
        self.Show()

        self.isUsable = True
        (self.xShopStart, self.yShopStart,
         z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
Exemplo n.º 5
0
 def Open(self):
     if FALSE == self.isLoaded:
         self.__LoadScript()
     self.__Initialize()
     self.QuestCMD("GETMEMBERLIST")
     self.SetTop()
     self.Show()
     self.scrollbar.SetPos(0)
     (self.xGuildStorageStart, self.yGuildStorageStart,
      z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
     self.MemberInput.SetText("Membername")
Exemplo n.º 6
0
 def Open(self):
     if FALSE == self.isLoaded:
         self.__LoadScript()
     self.__Initialize()
     self.SetTop()
     self.Show()
     (self.xGuildStorageStart, self.yGuildStorageStart,
      z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
     constInfo.GUILDSTORAGE["logs"] = {}
     self.Logs.ClearItem()
     self.QuestCMD("LOAD_LOGS#")
Exemplo n.º 7
0
    def OnUpdate(self):

        if constInfo.GUILDSTORAGE["open"] == 1:
            chat.AppendChat(
                chat.CHAT_TYPE_INFO,
                "Du kannst keinen Shop oeffnen, solange das Gildenlager offen ist."
            )
            self.Close()

        USE_SHOP_LIMIT_RANGE = 1000

        (x, y, z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
        if abs(x - self.xShopStart) > USE_SHOP_LIMIT_RANGE or abs(
                y - self.yShopStart) > USE_SHOP_LIMIT_RANGE:
            self.Close()
Exemplo n.º 8
0
    def OnUpdate(self):
        USE_GUILDSTORAGE_LIMIT_RANGE = 1000

        (x, y, z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
        if abs(x -
               self.xGuildStorageStart) > USE_GUILDSTORAGE_LIMIT_RANGE or abs(
                   y - self.yGuildStorageStart) > USE_GUILDSTORAGE_LIMIT_RANGE:
            self.Close()

        oldtime = self.oldtime_
        newtime = app.GetTime()
        newcalc = newtime - oldtime
        intnewcalc = int(newcalc)
        if newcalc > 5:
            self.oldtime_ = newtime
            self.QuestCMD("UPDATE#")
Exemplo n.º 9
0
    def Open(self, mode):
        if FALSE == self.isLoaded:
            self.__LoadScript()
        self.__Initialize()
        if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
            chat.AppendChat(
                chat.CHAT_TYPE_INFO,
                "Du kannst das Gildenlager nicht oeffnen, solange du ein Item droppst."
            )
            self.Close()
            return
        if mouseModule.mouseController.isAttached():
            chat.AppendChat(
                chat.CHAT_TYPE_INFO,
                "Du kannst das Gildenlager nicht oeffnen, solange du ein Item haelst."
            )
            self.Close()
            return
        constInfo.GUILDSTORAGE["open"] = 1

        self.StandartInterface()

        ## clear the slots
        for i in range(120):
            self.GuildStorage["slots"].ClearSlot(i)

        if mode == 0:
            self.Adminpanel["btn_Admin"].Hide()
            self.Logs["btn_Logs"].Hide()
        else:
            self.Adminpanel["btn_Admin"].Show()
            self.Logs["btn_Logs"].Show()

        (self.xGuildStorageStart, self.yGuildStorageStart,
         z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
        self.SetTop()
        self.Show()
Exemplo n.º 10
0
	def ShowWindow(self, size):

		(self.xSafeBoxStart, self.ySafeBoxStart, z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()

		self.SetTableSize(size)
		self.Show()
Exemplo n.º 11
0
 def OpenMultiShop(self):
     self.BuildMultiShop()
     self.AdjustPosition()
     (self.xShopStart, self.yShopStart,
      z) = player.GetMainCharacterPosition()
     self.Show()
Exemplo n.º 12
0
    def OnUpdate(self):
        (x, y, z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
        miniMap.Update(x, y)

        self.positionInfo.SetText("(%.0f, %.0f)" % (x / 100, y / 100))

        localtime = localtime = time.strftime("[%H:%M:%S]")
        self.timeInfo.SetText(localtime + "[" + str(app.GetRenderFPS()) +
                              " FPS]")

        self.mapNameInfo.SetText(settinginfo.GetMapNameByMapFolderName(1))
        if settinginfo.MapIsSpecialMap(1):
            self.mapNameInfo.SetFontColor(1.0, 0.63, 0)

        if settinginfo.realChannel > 0:
            self.UpdateServerInfo()

        # if settinginfo.bio_timer_status == 1:
        # if app.GetGlobalTimeStamp() > settinginfo.bio_timer:
        # self.bioInfo.SetText("[BIO] Bereit!")
        # self.bioInfo.SetFontColor(0.5411, 0.7254, 0.5568)
        # self.bioInfo.Show()
        # else:
        # timeLeft = settinginfo.bio_timer - app.GetGlobalTimeStamp()
        # self.bioInfo.SetText("[BIO] Zeit: " + self.AyFormatRebootTime(timeLeft))
        # self.bioInfo.SetFontColor(0.9, 0.4745, 0.4627)
        # self.bioInfo.Show()

        self.UpdateBossMapTimer()
        self.UpdateForestZoneTimer()

        if self.SwitchBotButton.IsIn():
            self.switchBotToolTip.Open()
        else:
            self.switchBotToolTip.Close()

        if self.SwitchBotButtonInactive.IsIn():
            self.switchBotToolTip2.Open()
        else:
            self.switchBotToolTip2.Close()

        if self.GMPanelButton.IsIn():
            # self.TeamlerOnlineToolTip.Open()

            self.teamOnlineToolTip.Open()
        else:
            # self.TeamlerOnlineToolTip.Close()

            self.teamOnlineToolTip.Close()
        # -------------------------------------------------------------------
        # Battlezone-Infos
        # if background.GetCurrentMapName() == "metin2_map_battlefield":
        # self.battleZoneTitle.Show()
        # self.battleZonePoints.SetText(str(settinginfo.battlezonePoints) + " Punkt(e)")

        # if settinginfo.battlezoneLeaveTime > app.GetGlobalTimeStamp():
        # self.BattlezoneLeaveButton.Hide()
        # self.battlezoneLeaveTimeTitle.Show()
        # battlezoneTimeLeft = settinginfo.battlezoneLeaveTime - app.GetGlobalTimeStamp()
        # self.battlezoneLeaveTime.SetText(str(self.AyFormatRebootTime(int(battlezoneTimeLeft))))
        # self.battlezoneLeaveTime.Show()
        # else:
        # self.BattlezoneLeaveButton.Show()
        # self.battlezoneLeaveTimeTitle.Hide()
        # self.battlezoneLeaveTime.Hide()
        # else:
        # self.battleZoneTitle.Hide()
        # self.battleZonePoints.Hide()
        # self.BattlezoneLeaveButton.Hide()
        # self.battlezoneLeaveTime.Hide()
        # self.battlezoneLeaveTimeTitle.Hide()

        # -------------------------------------------------------------------
        if self.tooltipInfo:
            if True == self.MiniMapWindow.IsIn():
                (mouseX, mouseY) = wndMgr.GetMousePosition()
                (bFind, sName, iPosX, iPosY,
                 dwTextColor) = miniMap.GetInfo(mouseX, mouseY)
                if bFind == 0:
                    self.tooltipInfo.Hide()
                elif not self.canSeeInfo:
                    self.tooltipInfo.SetText(
                        "%s(%s)" % (sName, localeInfo.UI_POS_UNKNOWN))
                    self.tooltipInfo.SetTooltipPosition(mouseX - 5, mouseY)
                    self.tooltipInfo.SetTextColor(dwTextColor)
                    self.tooltipInfo.Show()
                else:
                    if localeInfo.IsARABIC() and sName[-1].isalnum():
                        self.tooltipInfo.SetText("(%s)%d, %d" %
                                                 (sName, iPosX, iPosY))
                    else:
                        self.tooltipInfo.SetText("%s(%d, %d)" %
                                                 (sName, iPosX, iPosY))
                    self.tooltipInfo.SetTooltipPosition(mouseX - 5, mouseY)
                    self.tooltipInfo.SetTextColor(dwTextColor)
                    self.tooltipInfo.Show()
            else:
                self.tooltipInfo.Hide()

            # AUTOBAN
            if self.imprisonmentDuration:
                self.__UpdateImprisonmentDurationText()
            # END_OF_AUTOBAN

        if True == self.MiniMapShowButton.IsIn():
            self.tooltipMiniMapOpen.Show()
        else:
            self.tooltipMiniMapOpen.Hide()

        if True == self.MiniMapHideButton.IsIn():
            self.tooltipMiniMapClose.Show()
        else:
            self.tooltipMiniMapClose.Hide()

        if True == self.ScaleUpButton.IsIn():
            self.tooltipScaleUp.Show()
        else:
            self.tooltipScaleUp.Hide()

        if True == self.ScaleDownButton.IsIn():
            self.tooltipScaleDown.Show()
        else:
            self.tooltipScaleDown.Hide()

        # if True == self.BattlezoneLeaveButton.IsIn():
        # self.tooltipLeaveBattlezone.Show()
        # else:
        # self.tooltipLeaveBattlezone.Hide()

        if True == self.AtlasShowButton.IsIn():
            self.tooltipAtlasOpen.Show()
        else:
            self.tooltipAtlasOpen.Hide()
Exemplo n.º 13
0
    def Open(self, vid):

        if constInfo.GUILDSTORAGE["open"] == 1:
            chat.AppendChat(
                chat.CHAT_TYPE_INFO,
                "Du kannst keinen Shop oeffnen, solange das Gildenlager offen ist."
            )
            self.Close()

        isPrivateShop = False
        isMainPlayerPrivateShop = False

        import chr
        if chr.IsNPC(vid):
            isPrivateShop = False
        else:
            isPrivateShop = True

        if fgGHGjjFHJghjfFG1545gGG.IsMainCharacterIndex(vid):

            isMainPlayerPrivateShop = True

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

        else:

            isMainPlayerPrivateShop = False

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

        shop.Open(isPrivateShop, isMainPlayerPrivateShop)

        self.tabIdx = 0

        if isPrivateShop:
            self.__HideMiddleTabs()
            self.__HideSmallTabs()
        else:
            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)

        self.Refresh()
        self.SetTop()

        self.Show()

        (self.xShopStart, self.yShopStart,
         z) = fgGHGjjFHJghjfFG1545gGG.GetMainCharacterPosition()
Exemplo n.º 14
0
	def OnUpdate(self):
		(x, y, z) = player.GetMainCharacterPosition()
		if abs(x - self.xStart) > self.LIMIT_RANGE or abs(y - self.yStart) > self.LIMIT_RANGE:
			self.Close()
Exemplo n.º 15
0
	def Open(self):
		if self.IsShow():
			self.Close()
		else:
			(self.xStart, self.yStart, z) = player.GetMainCharacterPosition()
			self.Show()