コード例 #1
0
    def Open(self, open, quiz, duration):
        srcLines = quiz.split("|")

        if len(srcLines) >= 5:
            msgLines = srcLines[:2]
            selLines = srcLines[2:]

            for msgText, msgLine in zip(self.msgTexts, msgLines):
                msgText.SetText(msgLine)

            for selButton, selLine in zip(self.selButtons, selLines):
                selButton.SetText(selLine)

        self.statusText.SetText("%s: %s" %
                                (uiScriptLocale.AUTOBAN_QUIZ_REST_TIME,
                                 localeInfo.SecondToDHM(duration)))

        self.answer = 0
        self.endTime = app.GetTime() + duration

        for selectButton in self.selButtons:
            selectButton.SetUp()

        self.Show()
        self.Lock()
コード例 #2
0
    def OnUpdate(self):
        restTime = self.endTime - app.GetTime()
        if restTime < 0:
            restTime = 0

        self.statusText.SetText("%s: %s" %
                                (uiScriptLocale.AUTOBAN_QUIZ_REST_TIME,
                                 localeInfo.SecondToDHM(restTime)))
コード例 #3
0
    def __UpdateImprisonmentDurationText(self):
        restTime = max(self.imprisonmentEndTime - app.GetGlobalTimeStamp(), 0)

        imprisonmentEndTimeText = localeInfo.SecondToDHM(restTime)
        if imprisonmentEndTimeText != self.imprisonmentEndTimeText:
            self.imprisonmentEndTimeText = imprisonmentEndTimeText
            self.serverInfo.SetText("%s: %s" %
                                    (uiScriptLocale.AUTOBAN_QUIZ_REST_TIME,
                                     self.imprisonmentEndTimeText))
コード例 #4
0
	def UpdateDescription(self):
		if not self.isClocked:
			self.__UpdateDescription2()
			return

		if not self.description:
			return

		toolTip = self.description
		if self.endTime > 0:
			leftTime = localeInfo.SecondToDHM(self.endTime - app.GetGlobalTimeStamp())
			toolTip += " (%s : %s)" % (localeInfo.LEFT_TIME, leftTime)
		self.SetToolTipText(toolTip, 0, 40)
コード例 #5
0
    def UpdateDailyTimer(self):
        if self.status == 2:
            if settinginfo.DailyQuest_Time > app.GetGlobalTimeStamp():
                leftSec = max(
                    0, settinginfo.DailyQuest_Time - app.GetGlobalTimeStamp())
                self.MainTimeLine.SetText("[ Neue Quest in " +
                                          localeInfo.SecondToDHM(leftSec) +
                                          " ]")
            else:
                event.QuestButtonClick(settinginfo.DailyQuest_QID)
                self.SetLayoutType(3)

        elif self.status == 1:
            if settinginfo.DailyQuest_Time > app.GetGlobalTimeStamp():
                leftSec = max(
                    0, settinginfo.DailyQuest_Time - app.GetGlobalTimeStamp())
                self.MainTimeLine.SetText("[ Verbl. Zeit: " +
                                          localeInfo.SecondToDHM(leftSec) +
                                          " ]")
            else:
                event.QuestButtonClick(settinginfo.DailyQuest_QID)
                #chat.AppendChat(chat.CHAT_TYPE_INFO,"Die Zeit für die Daily-Quest ist abgelaufen!")
                self.SetLayoutType(3)
コード例 #6
0
ファイル: uipet.py プロジェクト: UnknownUserTM/ExtractFiles
	def OnUpdate(self):
		if self.IsShow():
		
			if self.PetEXPBlock.IsIn():
				# self.Board.SetTitleName("Pet - IN")
				self.ShowLevelInfoToolTip()
			else:
				# self.Board.SetTitleName("Pet - OUT")
				self.HideLevelInfoToolTip()
		
			if constInfo.PET_INFOS["level"] == 0 or constInfo.PET_INFOS["guiclose"] == 1:
				constInfo.PET_INFOS["skill_status"] = 0
				constInfo.PET_INFOS["gui"] = 0
				constInfo.PET_INFOS["guiclose"] = 0
				self.HideLevelInfoToolTip()
				self.__del__()
				return
				
			itemVnum = 55001
			for i in xrange(fgGHGjjFHJghjfFG1545gGG.INVENTORY_PAGE_SIZE*4):
				if constInfo.IS_PET_SEAL(fgGHGjjFHJghjfFG1545gGG.GetItemIndex(i)):
					metinSocket = [fgGHGjjFHJghjfFG1545gGG.GetItemMetinSocket(i, j) for j in xrange(fgGHGjjFHJghjfFG1545gGG.METIN_SOCKET_MAX_NUM)]
					if metinSocket[0] == 1:
						itemVnum = fgGHGjjFHJghjfFG1545gGG.GetItemIndex(i)
			self.PetItemVnumIMG.LoadImage("icon/item/" + str(itemVnum) + ".tga")
			if constInfo.PET_INFOS["life"] > app.GetGlobalTimeStamp(): 
				leftSec = max(0, constInfo.PET_INFOS["life"] - app.GetGlobalTimeStamp())
				self.PetLifeTimeTextLine.SetText(localeInfo.SecondToDHM(leftSec))
				self.PetLifeTimeTextLine.SetPosition(18,2)
				self.PetLifeTimeTextLine.SetFontColor(0.5411, 0.7254, 0.5568)	
			else:
				self.PetLifeTimeTextLine.SetText("Schläft")
				self.PetLifeTimeTextLine.SetFontColor(0.9, 0.4745, 0.4627)
				self.PetLifeTimeTextLine.SetPosition(42,2)
			
			if constInfo.PET_INFOS["level"] < 10:
				self.PetLevelTextLine.SetText("  " + str(constInfo.PET_INFOS["level"]))
			elif constInfo.PET_INFOS["level"] >= 10 and constInfo.PET_INFOS["level"] < 100:
				self.PetLevelTextLine.SetText(" " + str(constInfo.PET_INFOS["level"]))
			elif constInfo.PET_INFOS["level"] >= 100:
				self.PetLevelTextLine.SetText(str(constInfo.PET_INFOS["level"]))
			
			MaxMobEXP = (constInfo.PET_INFOS["level"] + 1) * 1000
			MaxItemEXP = constInfo.PET_INFOS["level"] + 1
			self.SetExperience(constInfo.PET_INFOS["mob_exp"],MaxMobEXP)	
			self.SetItemExperience(constInfo.PET_INFOS["item_exp"],MaxItemEXP)
				
			i = 0
			list = 0
			while i < 3:
				self.PetBoni[i+3].SetText(str(self.__CreateAffectString(constInfo.PET_INFOS["attr"][list],constInfo.PET_INFOS["attr"][list+1])))			
				list = list + 2
				i = i + 1
				
			if constInfo.PET_INFOS["skill_status"] == 1:
				self.PetSkillSlotBGImg1.ActivateSlot(3)	
				self.PetSkillNameError.SetText("(Aktiviert)")
			else:
				self.PetSkillSlotBGImg1.DeactivateSlot(3)
				self.PetSkillNameError.SetText("(Deaktiviert)")				
				
			if constInfo.PET_INFOS["level"] < 10:
				self.PetSkillNameError.SetText("Die Fertigkeit kann erst erlernt werden wenn dein Pet lv.10 ist.")
				self.PetSkillNameError.SetFontColor(0.9, 0.4745, 0.4627)
			elif constInfo.PET_INFOS["level"] >= 10 and constInfo.PET_INFOS["skill_level"] < 20:
				self.PetSkillNameError.SetText("Du kannst die Fertigkeit nun mit den Meisterbüchern trainieren.")
				self.PetSkillNameError.SetFontColor(0.5411, 0.7254, 0.5568)			
			elif constInfo.PET_INFOS["level"] >= 10 and constInfo.PET_INFOS["skill_level"] >= 20:
				#self.PetSkillNameError.SetText("")
				self.PetSkillNameError.SetFontColor(0.5411, 0.7254, 0.5568)	
			if constInfo.PET_INFOS["skill_level"] >= 20:
				self.PetSkillSlotBGImg1.SetItemSlot(3, 70002, 20)
			else:
				self.PetSkillSlotBGImg1.SetItemSlot(3, 70002, constInfo.PET_INFOS["skill_level"])