Dynamic Things Posted November 8, 2016 at 04:27 PM Share Posted November 8, 2016 at 04:27 PM Olá TMoore Tutorials, este tutorial é para quem procura mudar a cor do pergaminho do "send_letter". Ficheiros a editar: questlib.lua;interfacemodule.py Cliente Abrir o ficheiro InterfaceModule.py e procurar por: def BINARY_RecvQuest Vamos substituir a função inteira por: 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() Files Abrir o ficheiro questlib.lua e procura pela função send_letter_ex Substituir a função por: 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 Como funciona? Com o send_letter_ex permite-nos usar mais cores ao notificar a existência de novas quest's, assim podendo organizar quest por cores por exemplo: Missões de caça cor azul, Missões de procura cor verde, etc... O send_letter_ex atualmente suporta as seguintes cores Verde;Azul;Roxo;Dourado;Magenta;Azul claro. Pode ser adicionado mais cores basta adicionar novas imagens e adicionando na função BINARY_RecvQuest, de seguinte forma, procurar por 0xFF e em seguida o +#HEX, tal como podem ver no exemplo: listOfColors = { "golden": 0xFFffa200, "green": 0xFF00e600, "blue": 0xFF0099ff, "purple": 0xFFcc33ff, "fucsia": 0xFFcc0099, "aqua": 0xFF00ffff, } blink - Com isto as quest's também vão ficar a piscar como as mensagens, ficam antes de serem lidas. ex - (uma marca fictícia para separá-lo de "info" e "item"). Lembrando que o nome que têm de colocar na quest, será o nome da imagem que querem, por exemplo: scroll_open_green.tga Cor verde: send_letter_ex(localeInfo.LanguageOptionTitle, "green,blink,ex", "scroll_open_green.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "green,blink,ex", "scroll_open_blue.tga") Fazer download do conteúdo que se segue, e adicionar ao vosso cliente. https://mega.nz/#!Sx1GSQzJ!m2WNYam18xiL6P4gDty_ayXy9BFPa71iJHoRobdEEFo (em caso de duvidas sinta-se livre de partilhar) Créditos: MartySama Link to comment Share on other sites More sharing options...
Marco Posted November 8, 2016 at 05:52 PM Share Posted November 8, 2016 at 05:52 PM Algo não está bem ... Link to comment Share on other sites More sharing options...
Dynamic Things Posted November 8, 2016 at 06:33 PM Author Share Posted November 8, 2016 at 06:33 PM Algo não está bem ... Posta a quest, e prints de como tens feito a instalação aqui do tutorial sff. Link to comment Share on other sites More sharing options...
Marco Posted November 9, 2016 at 12:11 PM Share Posted November 9, 2016 at 12:11 PM Resolvido! Era na quest* Obrigado Link to comment Share on other sites More sharing options...
Dynamic Things Posted November 9, 2016 at 12:40 PM Author Share Posted November 9, 2016 at 12:40 PM Quest: send_letter("A Investigação do Biólogo") q.set_icon("scroll_open_green.tga") send_letter_ex(localeInfo.LanguageOptionTitle, "green,blink,ex", "scroll_open_green.tga") Link to comment Share on other sites More sharing options...
Marco Posted November 9, 2016 at 12:43 PM Share Posted November 9, 2016 at 12:43 PM Resolvido! Era na quest* Obrigado Tinha editado o outro post e nem reparei que tinhas respondido, desculpa. E obrigado desde já Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now