nagatto 2,130 Posted January 21, 2017 Olá malta, venho-vos deixar um guia de como inserir a colorização das vossas quests. Como fazer Só precisas de alterar algumas partes 1. Em interfaceModule.py, replace BINARY_RecvQuest com: Spoiler 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 iconName and (iconType not in ("item", "file")): # type "ex" implied btn.SetUpVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName.replace("open", "close"))) btn.SetOverVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName)) btn.SetDownVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName)) else: if localeInfo.IsEUROPE(): 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() listOfTypes = iconType.split(",") if "blink" in listOfTypes: btn.Flash() listOfColors = { "golden": 0xFFffa200, "green": 0xFF00e600, "blue": 0xFF0099ff, "purple": 0xFFcc33ff, "fucsia": 0xFFcc0099, "aqua": 0xFF00ffff, } for k,v in listOfColors.iteritems(): if k in listOfTypes: btn.ToolTipText.SetPackedFontColor(v) btn.SetEvent(ui.__mem_func__(self.__StartQuest), btn) btn.Show() btn.index = index btn.name = name self.questButtonList.insert(0, btn) self.__ArrangeQuestButton() 2. Em questlib.lua, altera send_letter_ex com: Spoiler function send_letter_ex(name, icon_type, icon_name) make_quest_button_ex(name, icon_type, icon_name) set_skin(NOWINDOW) q.set_title(name) q.set_icon(icon_name) q.start() end function resend_letter_ex(name, icon_type, icon_name) make_quest_button_ex(name, icon_type, icon_name) q.set_title(name) q.set_icon(icon_name) q.start() end function resend_letter(title) makequestbutton(title) q.set_title(title) q.start() end Explicação O 2º argumento de send_letter_ex suporta múltiplos parâmetros: green|blue|purple|golden|fucsia|aqua e mais (Podem adiciona-lás no BINARY_RecvQuest by adicionando novas cores 0xFF+#HEX; Color Picker Online) Piscar (a quest irá piscar como as mensagens privadas) ex (uma tag inútil para separar "info" de "item") O 3º argumento é o nome do icon para escolherem, atualmente têm: scroll_open.tga scroll_open_green.tga scroll_open_blue.tga scroll_open_purple.tga scroll_open_golden.tga Exemplos: send_letter_ex(localeInfo.LanguageOptionTitle, "green,blink,ex", "scroll_open_green.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "blue,blink,ex", "scroll_open_blue.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "purple,blink,ex", "scroll_open_purple.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "golden,blink,ex", "scroll_open_golden.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "golden,blink,ex", "scroll_open.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "golden,blink,ex", "scroll_open_green.tga") Faz download dos ficheiros e adiciona metin2_patch_new_questicon no teu client. Download 6 VoLtZzZ, thecrazy, p0w3r0ff and 3 others reacted to this Share this post Link to post Share on other sites