コード例 #1
0
			def __LoadInformation_Default_GetHitRate(self, race):
				attacker_dx = nonplayer.GetMonsterDX(race)
				attacker_level = nonplayer.GetMonsterLevel(race)

				self_dx = fgGHGjjFHJghjfFG1545gGG.GetStatus(fgGHGjjFHJghjfFG1545gGG.DX)
				self_level = fgGHGjjFHJghjfFG1545gGG.GetStatus(fgGHGjjFHJghjfFG1545gGG.LEVEL)

				iARSrc = min(90, (attacker_dx * 4 + attacker_level * 2) / 6)
				iERSrc = min(90, (self_dx * 4 + self_level * 2) / 6)

				fAR = (float(iARSrc) + 210.0) / 300.0
				fER = (float(iERSrc) * 2 + 5) / (float(iERSrc) + 95) * 3.0 / 10.0

				return fAR - fER
コード例 #2
0
    def __CheckPvPProtectedLevelPlayer(self):
        if player.GetStatus(player.LEVEL) < constInfo.PVPMODE_PROTECTED_LEVEL:
            self.__SetPeacePKMode()
            chat.AppendChat(
                chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_PROTECT %
                (constInfo.PVPMODE_PROTECTED_LEVEL))
            return 1

        return 0
コード例 #3
0
 def StartQuest(self):
     if self.Index < 1:
         return
     if fgGHGjjFHJghjfFG1545gGG.GetStatus(
             fgGHGjjFHJghjfFG1545gGG.LEVEL) < 5:
         import chat
         chat.AppendChat(chat.CHAT_TYPE_INFO,
                         "Dein Level ist noch zu niedrig.")
         self.qStart.SetUp()
         return
     import event
     event.QuestButtonClick(self.Index)
コード例 #4
0
    def RefreshGauge(self):

        self.curHP = fgGHGjjFHJghjfFG1545gGG.GetStatus(
            fgGHGjjFHJghjfFG1545gGG.HP)
        self.maxHP = fgGHGjjFHJghjfFG1545gGG.GetStatus(
            fgGHGjjFHJghjfFG1545gGG.MAX_HP)
        self.SetPercentage(self.curHP, self.maxHP)

        if self.showAlways:
            self.Show()

        else:

            if self.IsShow():
                if self.curHP > self.maxHP / 2:
                    self.Hide()

            else:
                if self.curHP < self.maxHP / 2:
                    self.OnUpdate()
                    self.Show()
コード例 #5
0
    def CheckBonus(self, bonus, bonuslist, offset):
        for boni in bonuslist:
            if bonus[0] == boni:
                try:
                    Index = bonuslist.index(boni)
                    BonusDescription = ui.TextLine()
                    BonusDescription.SetParent(self.Board)
                    BonusDescription.SetPosition(offset[Index][0] + 20,
                                                 offset[Index][1] + 35)
                    BonusDescription.SetText(str(bonus[0]))
                    BonusDescription.Show()

                    BonusSlotBar = ui.SlotBar()
                    BonusSlotBar.SetParent(self.Board)
                    BonusSlotBar.SetSize(115, 15)
                    BonusSlotBar.SetPosition(offset[Index][0] + 20,
                                             offset[Index][1] + 15 + 35)
                    BonusSlotBar.Show()

                    BonusAttrLine = ui.TextLine()
                    BonusAttrLine.SetParent(self.Board)
                    BonusAttrLine.SetPosition(offset[Index][0] + 5 + 20,
                                              offset[Index][1] + 15 + 35)

                    try:
                        Type = self.SpecialBoni[bonus[1]]
                        Attribute = self.EquipAttribute(bonus)
                    except:
                        Attribute = fgGHGjjFHJghjfFG1545gGG.GetStatus(
                            int(bonus[2]))
                    if self.TestSystem != 1:
                        BonusAttrLine.SetText(str(Attribute))
                        # try:
                        # if int(Attribute) >= int(self.MaxBoni[str(bonus[1])]):
                        # BonusAttrLine.SetFontColor(1.0, 0.63, 0)
                        # else:
                        # BonusAttrLine.SetFontColor(1, 1, 1)
                        # except:
                        # BonusAttrLine.SetFontColor(1, 1, 1)
                    else:
                        BonusAttrLine.SetText("Test system is active")
                        BonusAttrLine.SetFontColor(0.1, 0.7, 1.0)

                    BonusAttrLine.Show()
                    self.BonusList.append(
                        [BonusDescription, BonusAttrLine, BonusSlotBar])
                except:
                    pass
コード例 #6
0
 def ChangeLimit(self):
     # self.qLimit.limit+=1
     # if self.qLimit.limit > 2:
     # self.qLimit.limit = 0
     # self.qLimit.SetToolTipText(self.qLimit.limitTable[0][self.qLimit.limit])
     # self.qLimit.SetText(self.qLimit.limitTable[1][self.qLimit.limit])
     level = fgGHGjjFHJghjfFG1545gGG.GetStatus(
         fgGHGjjFHJghjfFG1545gGG.LEVEL)
     if level <= 84:
         self.qLimit.limit = 0
     elif level >= 85 and level <= 134:
         self.qLimit.limit = 1
     else:
         self.qLimit.limit = 2
     self.InfoLines[6].SetText(str(self.qLimit.limit + 1) + " Dailypoints")
     self.qLimit.SetToolTipText(
         self.qLimit.limitTable[0][self.qLimit.limit])
     self.qLimit.SetText(self.qLimit.limitTable[1][self.qLimit.limit])
コード例 #7
0
	def OnQuestListScroll(self):
		pos = int(self.QuestListScrollBar.GetPos() * (len(self.biologistQuestDict) - self.ITEM_COUNT)) 
		for i in xrange(self.ITEM_COUNT):
			realPos = i + pos
			info = self.biologistQuestDict[realPos]
			self.bioItemDict[i].SetItem(info["itemVnum"])
			self.bioItemDict[i].SetQuestTitle(questinfo.GetQuestString(info["title"]))
			self.bioItemDict[i].SetCount(info["itemCount"],info["itemCount_MAX"])
			
			if info["status"] == self.bioItemDict[i].STATUS_ACTIVE:
				player_level = fgGHGjjFHJghjfFG1545gGG.GetStatus(fgGHGjjFHJghjfFG1545gGG.LEVEL)
				if player_level < info["level"]:
					self.bioItemDict[i].SetStatusColor(self.bioItemDict[i].STATUS_LEVEL_LOW,info["level"])
				else:
					self.bioItemDict[i].SetStatusColor(info["status"],0)
			else:
				self.bioItemDict[i].SetStatusColor(info["status"],0)
			self.bioItemDict[i].SetTimer(info["time"])
コード例 #8
0
    def CheckGameButton(self):

        if not self.IsShow():
            return

        statusPlusButton = self.gameButtonDict["STATUS"]
        skillPlusButton = self.gameButtonDict["SKILL"]
        #		helpButton=self.gameButtonDict["HELP"]

        if fgGHGjjFHJghjfFG1545gGG.GetStatus(fgGHGjjFHJghjfFG1545gGG.STAT) > 0:
            statusPlusButton.Show()
        else:
            statusPlusButton.Hide()

        if self.__IsSkillStat():
            skillPlusButton.Show()
        else:
            skillPlusButton.Hide()
コード例 #9
0
ファイル: uiwarp.py プロジェクト: UnknownUserTM/ExtractFiles
    def CheckSubPage(self):
        subPageMapInfo = self.warpList[self.page]

        a = self.start_idx
        for i in xrange(WINDOW_COUNT):
            if a < len(self.warpList[self.page]):
                subPageMapInfo = self.warpList[self.page][a]
                isAvail = True
                self.MapNames[i].SetText(
                    subPageMapInfo["name"] +
                    self.GetFKeyName(subPageMapInfo["f_key"]))

                player_level = fgGHGjjFHJghjfFG1545gGG.GetStatus(
                    fgGHGjjFHJghjfFG1545gGG.LEVEL)
                if subPageMapInfo["min_level"] > 0:
                    if subPageMapInfo["max_level"] > 0:
                        if player_level < subPageMapInfo[
                                "min_level"] or player_level > subPageMapInfo[
                                    "max_level"]:
                            isAvail = False

                    else:
                        if player_level < subPageMapInfo["min_level"]:
                            isAvail = False

                if subPageMapInfo["is_avail"] == MAP_UNAVAILABLE:
                    isAvail = False

                if not isAvail:
                    if subPageMapInfo["disable_image"] != "":
                        self.MapImages[i].LoadImage(
                            "images_warp/" +
                            str(subPageMapInfo["disable_image"]) + ".tga")

                    self.WarpButtons[i].Disable()
                else:
                    if subPageMapInfo["default_image"] != "":
                        self.MapImages[i].LoadImage(
                            "images_warp/" +
                            str(subPageMapInfo["default_image"]) + ".tga")

                    self.WarpButtons[i].Enable()
                # self.MapImages[i].Show()
                a = a + 1
コード例 #10
0
    def LoadCategory(self, catIndex):
        self.ResetUI()
        DungeonSettings = settinginfo.DungeonMainSettings[catIndex]

        self.Board.SetTitleName("Dungeonkompendium ~ " +
                                str(DungeonSettings[0][0]))
        self.NavBG.LoadImage("images_dungeon/dungeonkompendium_header/" +
                             str(DungeonSettings[1][3]))

        self.MinLevelTextLine.SetText(str(DungeonSettings[1][0]))
        self.ItemTextLine.SetText(str(DungeonSettings[1][1]))
        self.GroupTextLine.SetText(str(DungeonSettings[1][2]))

        if DungeonSettings[4][0]:
            if DungeonSettings[1][0] <= fgGHGjjFHJghjfFG1545gGG.GetStatus(
                    fgGHGjjFHJghjfFG1545gGG.LEVEL):
                self.BossItemSlots[13].SetItemSlot(13, 91105, 0)
            else:
                self.BossItemSlots[13].SetItemSlot(13, 91105,
                                                   DungeonSettings[1][0])

        # ---------------------------------------------------------------------------
        i = 0
        x = 8
        dungeonDescTextLines = settinginfo.DungeonMainSettings[catIndex][2]
        while i < len(dungeonDescTextLines):
            if dungeonDescTextLines[i][0] == "title":
                self.ContentTextLines[i].SetText(
                    "[ " + str(dungeonDescTextLines[i][1]) + " ]")
                self.ContentTextLines[i].SetFontColor(1.0, 0.7843, 0.0)
                self.ContentTextLines[i].SetPosition(233, x)
                x = x + 20
            elif dungeonDescTextLines[i][0] == "normal":
                self.ContentTextLines[i].SetText(
                    str(dungeonDescTextLines[i][1]))
                self.ContentTextLines[i].SetFontColor(0.7607, 0.7607, 0.7607)
                self.ContentTextLines[i].SetPosition(233, x)
                x = x + 15
            elif dungeonDescTextLines[i][0] == "warning":
                self.ContentTextLines[i].SetText(
                    "[Warnung] " + str(dungeonDescTextLines[i][1]))
                self.ContentTextLines[i].SetFontColor(0.9, 0.4745, 0.4627)
                x = x + 5
                self.ContentTextLines[i].SetPosition(233, x)
                x = x + 20
            elif dungeonDescTextLines[i][0] == "attention":
                self.ContentTextLines[i].SetText(
                    "[Hinweis] " + str(dungeonDescTextLines[i][1]))
                self.ContentTextLines[i].SetFontColor(0.9607, 0.2392, 0.0)
                self.ContentTextLines[i].SetPosition(233, x)
                x = x + 5
                self.ContentTextLines[i].SetPosition(233, x)
                x = x + 20
            elif dungeonDescTextLines[i][0] == "break":
                x = x + dungeonDescTextLines[i][1]
            i = i + 1
        # ---------------------------------------------------------------------------
        i = 0
        dungeonBossSlotInfos = settinginfo.DungeonMainSettings[catIndex][3]
        while i < len(dungeonBossSlotInfos):
            self.BossItemSlots[i].SetItemSlot(i, dungeonBossSlotInfos[i], 0)
            i = i + 1
        # ---------------------------------------------------------------------------
        self.cat = catIndex
コード例 #11
0
    def LoadUI(self):
        constInfo.warpgui_open = 1
        self.Board = ui.BoardWithTitleBar()
        self.Board.SetSize(700, 350)
        self.Board.SetCenterPosition()
        self.Board.AddFlag("movable")
        self.Board.AddFlag("float")
        self.Board.SetTitleName("Teleportation")
        self.Board.SetCloseEvent(self.__del__)
        self.Board.Show()

        self.NavThinBoard = ui.ThinBoard()
        self.NavThinBoard.SetParent(self.Board)
        self.NavThinBoard.SetPosition(15, 35)
        self.NavThinBoard.SetSize(110, 305)
        self.NavThinBoard.Show()
        self.itemtooltip = uiToolTip.ItemToolTip()
        self.itemtooltip.HideToolTip()
        i = 0
        nb_height = 10

        while i < len(warps):

            self.NavButtons[i] = ui.Button()
            self.NavButtons[i].SetParent(self.NavThinBoard)
            self.NavButtons[i].SetPosition(10, nb_height)
            self.NavButtons[i].SetText("")
            self.NavButtons[i].SetUpVisual(
                "d:/ymir work/ui/public/Large_Button_01.sub")
            self.NavButtons[i].SetOverVisual(
                "d:/ymir work/ui/public/Large_Button_02.sub")
            self.NavButtons[i].SetDownVisual(
                "d:/ymir work/ui/public/Large_Button_03.sub")
            self.NavButtons[i].SetEvent(ui.__mem_func__(self.LoadCategory), i)
            self.NavButtons[i].Show()

            self.NavButtonTitles[i] = ui.TextLine()
            self.NavButtonTitles[i].SetParent(self.NavButtons[i])
            self.NavButtonTitles[i].SetPosition(43, 2)
            self.NavButtonTitles[i].SetText(str(warps[i][0][0]))
            self.NavButtonTitles[i].SetHorizontalAlignCenter()
            self.NavButtonTitles[i].Show()

            i = i + 1
            nb_height = nb_height + 22

        step = 5
        i = 1
        aIndex = 0
        wtb_width = 130
        wtb_height = 35
        player_level = fgGHGjjFHJghjfFG1545gGG.GetStatus(
            fgGHGjjFHJghjfFG1545gGG.LEVEL)

        while i <= board_count:
            self.WarpBGImages[i] = ui.ImageBox()
            self.WarpBGImages[i].SetParent(self.Board)
            self.WarpBGImages[i].SetPosition(wtb_width, wtb_height)
            self.WarpBGImages[i].LoadImage("images_warpgui/map/map_0_0.tga")
            self.WarpBGImages[i].Show()

            self.WarpThinBoards[i] = ui.ThinBoard()
            self.WarpThinBoards[i].SetParent(self.WarpBGImages[i])
            self.WarpThinBoards[i].SetSize(130, 150)
            self.WarpThinBoards[i].SetPosition(0, 0)
            self.WarpThinBoards[i].Show()

            self.WarpMapNames[i] = ui.TextLine()
            self.WarpMapNames[i].SetParent(self.WarpThinBoards[i])
            self.WarpMapNames[i].SetPosition(65, 8)
            self.WarpMapNames[i].SetText("MapName")
            self.WarpMapNames[i].SetHorizontalAlignCenter()
            self.WarpMapNames[i].Show()
            self.WarpTitleUnderLines[i] = ui.ImageBox()
            self.WarpTitleUnderLines[i].SetParent(self.WarpThinBoards[i])
            self.WarpTitleUnderLines[i].SetPosition(5, 25)
            self.WarpTitleUnderLines[i].LoadImage(
                "images_warpgui/title_underline.tga")
            self.WarpTitleUnderLines[i].Show()

            self.WarpButtons[i] = ui.Button()
            self.WarpButtons[i].SetParent(self.WarpThinBoards[i])
            self.WarpButtons[i].SetPosition(22, 125)
            self.WarpButtons[i].SetText("")
            self.WarpButtons[i].SetUpVisual(
                "d:/ymir work/ui/public/Large_Button_01.sub")
            self.WarpButtons[i].SetOverVisual(
                "d:/ymir work/ui/public/Large_Button_02.sub")
            self.WarpButtons[i].SetDownVisual(
                "d:/ymir work/ui/public/Large_Button_03.sub")
            self.WarpButtons[i].SetEvent(ui.__mem_func__(self.SendWarpPacket),
                                         i)
            self.WarpButtons[i].Show()

            self.WarpButtonTitles[i] = ui.TextLine()
            self.WarpButtonTitles[i].SetParent(self.WarpButtons[i])
            self.WarpButtonTitles[i].SetPosition(43, 2)
            self.WarpButtonTitles[i].SetText("Teleportieren")
            self.WarpButtonTitles[i].SetHorizontalAlignCenter()
            self.WarpButtonTitles[i].Show()

            self.WarpErrors[i] = ui.TextLine()
            self.WarpErrors[i].SetParent(self.WarpThinBoards[i])
            self.WarpErrors[i].SetPosition(65, 125)
            self.WarpErrors[i].SetText("[ Ab lv. ]")
            self.WarpErrors[i].SetHorizontalAlignCenter()
            self.WarpErrors[i].Show()

            self.WarpItemSlots[i] = ui.GridSlotWindow()
            self.WarpItemSlots[i].SetParent(self.WarpThinBoards[i])
            self.WarpItemSlots[i].ArrangeSlot(i, 1, 1, 32, 32, 0, 0)
            self.WarpItemSlots[i].SetPosition(49, 75)
            self.WarpItemSlots[i].SetOverInItemEvent(
                ui.__mem_func__(self.ShowToolTip))
            self.WarpItemSlots[i].SetOverOutItemEvent(
                ui.__mem_func__(self.HideToolTip))
            self.WarpItemSlots[i].Show()
            # self.WarpItemSlots[i].SetItemSlot(0,27001,1)

            self.WarpClosed[i] = ui.TextLine()
            self.WarpClosed[i].SetParent(self.WarpThinBoards[i])
            self.WarpClosed[i].SetPosition(65, 95)
            self.WarpClosed[i].SetText("[ Geschlossen! ]")
            self.WarpClosed[i].SetHorizontalAlignCenter()
            self.WarpClosed[i].Hide()

            aIndex = aIndex + 1
            i = i + 1
            wtb_width = wtb_width + 135
            if i == step:
                wtb_width = 130
                wtb_height = 190

        self.scrollbar = ui.ScrollBar()
        self.scrollbar.SetParent(self.Board)
        self.scrollbar.SetScrollBarSize(305)
        self.scrollbar.SetPosition(670, 35)
        self.scrollbar.SetMiddleBarSize(float(board_count) / float(8))
        self.scrollbar.SetScrollEvent(self.__OnScroll)
        self.scrollbar.Show()
        self.LoadCategory(0)
コード例 #12
0
    def OnUpdate(self):
        if len(warps[self.sel_cat][1]) <= 8:

            i = 1

            while i <= board_count:
                if i <= len(warps[self.sel_cat][1]):
                    player_level = fgGHGjjFHJghjfFG1545gGG.GetStatus(
                        fgGHGjjFHJghjfFG1545gGG.LEVEL)
                    if warps[self.sel_cat][1][i - 1][5] > 0:
                        if player_level >= warps[self.sel_cat][1][
                                i - 1][1] and player_level <= warps[
                                    self.sel_cat][1][i - 1][5]:
                            self.WarpButtons[i].Show()
                            #self.WarpErrors[i].Hide()
                            self.WarpErrors[i].Show()
                            self.WarpErrors[i].SetPosition(65, 110)
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][i - 1][1]) +
                                " - lv." +
                                str(warps[self.sel_cat][1][i - 1][5]) + " ]")
                        else:
                            self.WarpErrors[i].SetPosition(65, 125)
                            self.WarpButtons[i].Hide()
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][i - 1][1]) +
                                " - lv." +
                                str(warps[self.sel_cat][1][i - 1][5]) + " ]")
                            self.WarpErrors[i].Show()
                    else:

                        if player_level >= warps[self.sel_cat][1][i - 1][1]:
                            self.WarpButtons[i].Show()
                            #self.WarpErrors[i].Hide()
                            self.WarpErrors[i].Show()
                            self.WarpErrors[i].SetPosition(65, 110)
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][i - 1][1]) + " ]")

                        else:
                            self.WarpErrors[i].SetPosition(65, 125)
                            self.WarpButtons[i].Hide()
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][i - 1][1]) + " ]")
                            self.WarpErrors[i].Show()

                    if warps[self.sel_cat][1][i - 1][3] != "NOFLAG":
                        if settinginfo.searchForEventFlag(
                                warps[self.sel_cat][1][i - 1][3],
                                warps[self.sel_cat][1][i - 1][4]) == False:
                            self.WarpButtons[i].Hide()
                            self.WarpClosed[i].Show()
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][i - 1][1]) + " ]")
                            self.WarpErrors[i].Show()
                        else:
                            self.WarpButtons[i].Show()
                            self.WarpClosed[i].Hide()
                            self.WarpErrors[i].Hide()
                            if player_level < warps[self.sel_cat][1][i - 1][1]:
                                self.WarpButtons[i].Hide()
                                self.WarpErrors[i].Show()

                i = i + 1
        else:
            self.ResetUI()
            pos = int(self.scrollbar.GetPos() *
                      (len(warps[self.sel_cat][1]) - board_count))

            i = 1
            while i <= board_count:
                realPos = (i + pos) - 1
                if realPos + 1 <= len(warps[self.sel_cat][1]):
                    self.WarpMapNames[i].SetText(
                        str(warps[self.sel_cat][1][realPos][0]))
                    player_level = fgGHGjjFHJghjfFG1545gGG.GetStatus(
                        fgGHGjjFHJghjfFG1545gGG.LEVEL)

                    if warps[self.sel_cat][1][realPos][5] > 0:
                        if player_level >= warps[self.sel_cat][1][realPos][
                                1] and player_level <= warps[
                                    self.sel_cat][1][realPos][5]:
                            self.WarpButtons[i].Show()
                            #self.WarpErrors[i].Hide()
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][realPos][1]) +
                                " - lv." +
                                str(warps[self.sel_cat][1][realPos][5]) + " ]")
                            self.WarpErrors[i].SetPosition(65, 110)
                            self.WarpErrors[i].Show()
                        else:
                            self.WarpErrors[i].SetPosition(65, 125)
                            self.WarpButtons[i].Hide()
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][realPos][1]) +
                                " - lv." +
                                str(warps[self.sel_cat][1][realPos][5]) + " ]")
                            self.WarpErrors[i].Show()
                    else:

                        if player_level >= warps[self.sel_cat][1][realPos][1]:
                            self.WarpButtons[i].Show()
                            self.WarpErrors[i].SetPosition(65, 110)
                            #self.WarpErrors[i].Hide()
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][realPos][1]) + " ]")
                            self.WarpErrors[i].Show()
                        else:
                            self.WarpButtons[i].Hide()
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][realPos][1]) + " ]")
                            self.WarpErrors[i].Show()

                    if warps[self.sel_cat][1][realPos][3] != "NOFLAG":
                        if settinginfo.searchForEventFlag(
                                warps[self.sel_cat][1][realPos][3],
                                warps[self.sel_cat][1][realPos][4]) == False:
                            self.WarpButtons[i].Hide()
                            self.WarpClosed[i].Show()
                            self.WarpErrors[i].SetText(
                                "[ Ab lv." +
                                str(warps[self.sel_cat][1][realPos][1]) + " ]")
                            self.WarpErrors[i].Show()
                        else:
                            self.WarpButtons[i].Show()
                            self.WarpClosed[i].Hide()
                            self.WarpErrors[i].Hide()
                            if player_level < warps[
                                    self.sel_cat][1][realPos][1]:
                                self.WarpButtons[i].Hide()
                                self.WarpErrors[i].Show()
                    self.WarpBGImages[i].Show()
                    i = i + 1
コード例 #13
0
    def __OnScroll(self):
        self.ResetUI()
        #chat.AppendChat(chat.CHAT_TYPE_INFO,"scrollbar.pos=" + str(self.scrollbar.GetPos()))
        #chat.AppendChat(chat.CHAT_TYPE_INFO,"sel_cat=" + str(self.sel_cat))
        pos = int(self.scrollbar.GetPos() *
                  (len(warps[self.sel_cat][1]) -
                   board_count))  ##Aktuelle Position der Scrollbar
        #self.Board.SetTitleName("Teleportation + " + str(pos))
        i = 1
        while i <= board_count:
            realPos = (i + pos) - 1
            if realPos + 1 <= len(warps[self.sel_cat][1]):
                self.WarpMapNames[i].SetText(
                    str(warps[self.sel_cat][1][realPos][0]))
                player_level = fgGHGjjFHJghjfFG1545gGG.GetStatus(
                    fgGHGjjFHJghjfFG1545gGG.LEVEL)

                if warps[self.sel_cat][1][realPos][5] > 0:
                    if player_level >= warps[self.sel_cat][1][realPos][
                            1] and player_level <= warps[
                                self.sel_cat][1][realPos][5]:
                        self.WarpButtons[i].Show()
                        #self.WarpErrors[i].Hide()
                        self.WarpErrors[i].SetPosition(65, 110)
                    else:
                        self.WarpErrors[i].SetPosition(65, 125)
                        self.WarpButtons[i].Hide()
                        self.WarpErrors[i].SetText(
                            "[ Ab lv." +
                            str(warps[self.sel_cat][1][realPos][1]) +
                            " - lv." +
                            str(warps[self.sel_cat][1][realPos][5]) + " ]")
                        self.WarpErrors[i].Show()
                else:
                    if player_level >= warps[self.sel_cat][1][realPos][1]:
                        self.WarpButtons[i].Show()
                        #self.WarpErrors[i].Hide()
                        self.WarpErrors[i].SetPosition(65, 110)
                    else:
                        self.WarpErrors[i].SetPosition(65, 125)
                        self.WarpButtons[i].Hide()
                        self.WarpErrors[i].SetText(
                            "[ Ab lv." +
                            str(warps[self.sel_cat][1][realPos][1]) + " ]")
                        self.WarpErrors[i].Show()

                if warps[self.sel_cat][1][realPos][2] != 0:
                    self.WarpBGImages[i].LoadImage(
                        "images_warp/map_" +
                        str(warps[self.sel_cat][1][realPos][2]) + ".tga")
                else:
                    self.WarpBGImages[i].LoadImage("images_warp/unknown.tga")

                if warps[self.sel_cat][1][realPos][3] != "NOFLAG":
                    if settinginfo.searchForEventFlag(
                            warps[self.sel_cat][1][realPos][3],
                            warps[self.sel_cat][1][realPos][4]) == False:
                        self.WarpButtons[i].Hide()
                        self.WarpClosed[i].Show()
                        self.WarpErrors[i].SetText(
                            "[ Ab lv." +
                            str(warps[self.sel_cat][1][realPos][1]) + " ]")
                        self.WarpErrors[i].Show()

                    else:
                        self.WarpButtons[i].Show()
                        self.WarpClosed[i].Hide()
                        self.WarpErrors[i].Hide()
                        if player_level < warps[self.sel_cat][1][realPos][1]:
                            self.WarpButtons[i].Hide()
                            self.WarpErrors[i].Show()

                if warps[self.sel_cat][1][realPos][6] != 0:
                    self.WarpItemSlots[i].SetItemSlot(
                        i, warps[self.sel_cat][1][realPos][6],
                        warps[self.sel_cat][1][realPos][7])
                else:
                    self.WarpItemSlots[i].SetItemSlot(i, 0, 0)
                self.WarpItemSlots[i].RefreshSlot()
                self.WarpBGImages[i].Show()

                self.WarpBGImages[i].Show()
            i = i + 1
コード例 #14
0
    def LoadCategory(self, idx):
        self.ResetUI()
        self.sel_cat = idx

        if len(warps[self.sel_cat][1]) > 8:
            self.scrollbar.Show()
            self.Board.SetSize(700, 355)

            self.scrollbar.SetMiddleBarSize(
                float(board_count) / float(len(warps[self.sel_cat][1])))
            self.scrollbar.SetPos(0)
            board_count_load = 8
        else:
            self.scrollbar.Hide()
            self.Board.SetSize(680, 355)
            board_count_load = len(warps[self.sel_cat][1])

        i = 1
        aIndex = 0
        while i <= board_count_load:
            self.WarpMapNames[i].SetText(str(
                warps[self.sel_cat][1][aIndex][0]))
            if warps[self.sel_cat][1][aIndex][2] != 0:
                self.WarpBGImages[i].LoadImage(
                    "images_warp/map_" +
                    str(warps[self.sel_cat][1][aIndex][2]) + ".tga")
            else:
                self.WarpBGImages[i].LoadImage("images_warp/unknown.tga")
            player_level = fgGHGjjFHJghjfFG1545gGG.GetStatus(
                fgGHGjjFHJghjfFG1545gGG.LEVEL)

            if warps[self.sel_cat][1][aIndex][5] > 0:
                if player_level >= warps[
                        self.sel_cat][1][aIndex][1] and player_level <= warps[
                            self.sel_cat][1][aIndex][5]:
                    self.WarpButtons[i].Show()
                    #self.WarpErrors[i].Hide()
                    self.WarpErrors[i].SetPosition(65, 110)
                else:
                    self.WarpErrors[i].SetPosition(65, 125)
                    self.WarpButtons[i].Hide()
                    self.WarpErrors[i].SetText(
                        "[ Ab lv." + str(warps[self.sel_cat][1][aIndex][1]) +
                        " - lv." + str(warps[self.sel_cat][1][aIndex][5]) +
                        " ]")
                    self.WarpErrors[i].Show()
            else:
                if player_level >= warps[self.sel_cat][1][aIndex][1]:
                    self.WarpButtons[i].Show()
                    #self.WarpErrors[i].Hide()
                    self.WarpErrors[i].SetPosition(65, 110)
                else:
                    self.WarpErrors[i].SetPosition(65, 125)
                    self.WarpButtons[i].Hide()
                    self.WarpErrors[i].SetText(
                        "[ Ab lv." + str(warps[self.sel_cat][1][aIndex][1]) +
                        " ]")
                    self.WarpErrors[i].Show()

            if warps[self.sel_cat][1][aIndex][3] != "NOFLAG":
                if settinginfo.searchForEventFlag(
                        warps[self.sel_cat][1][aIndex][3],
                        warps[self.sel_cat][1][aIndex][4]) == False:
                    self.WarpButtons[i].Hide()
                    self.WarpClosed[i].Show()
                    self.WarpErrors[i].SetText(
                        "[ Ab lv." + str(warps[self.sel_cat][1][aIndex][1]) +
                        " ]")
                    self.WarpErrors[i].Show()

                else:
                    self.WarpButtons[i].Show()
                    self.WarpClosed[i].Hide()
                    self.WarpErrors[i].Hide()
                    if player_level < warps[self.sel_cat][1][aIndex][1]:
                        self.WarpButtons[i].Hide()
                        self.WarpErrors[i].Show()

            if warps[self.sel_cat][1][aIndex][6] != 0:
                self.WarpItemSlots[i].SetItemSlot(
                    i, warps[self.sel_cat][1][aIndex][6],
                    warps[self.sel_cat][1][aIndex][7])
            else:
                self.WarpItemSlots[i].SetItemSlot(i, 0, 0)
            self.WarpItemSlots[i].RefreshSlot()
            self.WarpBGImages[i].Show()
            aIndex = aIndex + 1
            i = i + 1
コード例 #15
0
    def __IsSkillStat(self):
        if fgGHGjjFHJghjfFG1545gGG.GetStatus(
                fgGHGjjFHJghjfFG1545gGG.SKILL_ACTIVE) > 0:
            return True

        return False