Zeler Posted July 4, 2013 Report Share Posted July 4, 2013 hola, en fin como estoy cansado de la incompetencia(por parte del team asco de epvp) y de la gente cínica vengo a compartir mi código de interfaz de caballo, lo he creado yo a como se llamaba mi antiguo team; TW y ahora lo comparto con ustedes por dejarme eso en cosas de la vida y ser buena persona, seguramente más adelante comparta la interfaz total a libre distribución(Yo fui quién clono la interfaz de LOM)Además me molesta la gente mierda que no sabe ni una puta mierda y se atribuye mi trabajo, cuando no saben una puta mierda(Ya me he calmado jajaja)Ésta es el código que va en uiaffectshower.py class HorseImage(ui.ExpandedImageBox): FILE_PATH = "d:/ymir work/ui/pattern/HorseState/" PORCIENTO_BARRA = { 00 : 0, 01 : 0, 02 : 0, 03 : 0, 10 : 10, 11 : 15, 12 : 20, 13 : 30, 20 : 35, 21 : 40, 22 : 45, 23 : 50, 30 : 55, 31 : 60, 32 : 70, 33 : 100, } BARRA_BARRA = { 00 : "negrogauge", 01 : "negrogauge", 02 : "negrogauge", 03 : "negrogauge", 10 : "rojogauge", 11 : "rojogauge", 12 : "rojogauge", 13 : "rojogauge", 20 : "amarillogauge", 21 : "amarillogauge", 22 : "amarillogauge", 23 : "amarillogauge", 30 : "greengauge", 31 : "greengauge", 32 : "greengauge", 33 : "greengauge", } FILE_DICT = { 00 : FILE_PATH+"00.dds", 01 : FILE_PATH+"00.dds", 02 : FILE_PATH+"00.dds", 03 : FILE_PATH+"00.dds", 10 : FILE_PATH+"10.dds", 11 : FILE_PATH+"11.dds", 12 : FILE_PATH+"12.dds", 13 : FILE_PATH+"13.dds", 20 : FILE_PATH+"20.dds", 21 : FILE_PATH+"21.dds", 22 : FILE_PATH+"22.dds", 23 : FILE_PATH+"23.dds", 30 : FILE_PATH+"30.dds", 31 : FILE_PATH+"31.dds", 32 : FILE_PATH+"32.dds", 33 : FILE_PATH+"33.dds", } def __init__(self): ui.ExpandedImageBox.__init__(self) #self.textLineList = [] self.toolTip = uiToolTip.ToolTip(100) self.toolTip.HideToolTip() self.CB= ui.ImageBox() self.CB.LoadImage("d:/global/horse/viewer.dds") self.CB.SetPosition(255, 5) self.CB.Show() self.CB.AddFlag("movable") self.CB.AddFlag("attach") self.CAB= ui.ImageBox() self.CAB.SetParent(self.CB) self.CAB.SetPosition(16, 17) self.CAB.Show() self.Gauge3 = ui.AniImageBox() self.Gauge3.SetDelay(5) self.Gauge3.Show() self.Gauge3.SetParent(self.CAB) self.Gauge3.SetPercentage(100, 100) self.NivelC = ui.TextLine() self.NivelC.SetFeather() self.NivelC.SetOutline() self.NivelC.SetPackedFontColor(0xffFFFBF6) self.NivelC.Show() self.NivelC.SetParent(self.CB) self.NivelC.SetPosition(22, 2) self.Hambre = ui.TextLine() self.Hambre.SetFeather() self.Hambre.SetOutline() self.Hambre.SetPackedFontColor(0xffFFFBF6) self.Hambre.Show() self.Hambre.SetParent(self.CB) self.Hambre.SetPosition(60, 26) self.Descansar = ui.TextLine() self.Descansar.SetFeather() self.Descansar.SetOutline() self.Descansar.SetPackedFontColor(0xffFF8C00) self.Descansar.Show() self.Descansar.SetParent(self.CB) self.Descansar.SetPosition(60, 36) def __GetHorseGrade(self, level): if 0 == level: return 0 return (level-1)/10 + 1 def SetState(self, level, health, battery): #self.textLineList=[] self.toolTip.ClearToolTip() if level>0: try: grade = self.__GetHorseGrade(level) self.__AppendText(locale.LEVEL_LIST[grade]) self.NivelC.SetText(locale.LEVEL_LIST[grade]) LEVEL_IMAGE=["", "d:/global/horse/horse_1.dds", "d:/global/horse/horse_2.dds", "d:/global/horse/horse_3.dds"] self.CAB.LoadImage(LEVEL_IMAGE[grade]) except IndexError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery) return try: healthName=locale.HEALTH_LIST[health] if len(healthName)>0: self.__AppendText(healthName) self.Hambre.SetText(healthName) except IndexError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery) return if health>0: if battery==0: self.__AppendText(locale.NEEFD_REST) self.Descansar.SetText("Cansado") try: fileName=self.FILE_DICT[health*10+battery] pogresoactual=self.PORCIENTO_BARRA[health*10+battery] BarraActual=self.BARRA_BARRA[health*10+battery] except KeyError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - KeyError" % (level, health, battery) try: for x in range(int(1),int(7)): self.Gauge3.AppendImage("d:/global/"+BarraActual+"/0"+str(x)+".tga") self.Gauge3.SetPosition(44, 3) self.Gauge3.SetPercentage(pogresoactual, 100) except: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - LoadError %s" % (level, health, battery, fileName, pogresoactual) self.SetScale(0.7, 0.7) def __AppendText(self, text): self.toolTip.AppendTextLine(text) self.toolTip.ResizeToolTip() #x=self.GetWidth()/2 #textLine = ui.TextLine() #textLine.SetParent(self) #textLine.SetSize(0, 0) #textLine.SetOutline() #textLine.Hide() #textLine.SetPosition(x, 40+len(self.textLineList)*16) #textLine.SetText(text) #self.textLineList.append(textLine) def OnMouseOverIn(self): #for textLine in self.textLineList: # textLine.Show() self.toolTip.ShowToolTip() def OnMouseOverOut(self): #for textLine in self.textLineList: # textLine.Hide() self.toolTip.HideToolTip()¡Atención! Tabso en el adjunto hay un archivo que ya tiene el códigoLos archivos:(en adjunto)Captura de pantalla: Sí tienes un error no dudes en responder este post-- Cuando hablo de error es un error no de que no sepas implementar, no jodan con eso a estás alturas ya debes saber algo. grimtales 1 Quote Link to comment Share on other sites More sharing options...
diper-papi-chulo Posted July 4, 2013 Report Share Posted July 4, 2013 bueno yo la ee testeado ese codigo y si funciona no podra usted postear la pet gui eso seria mas bueno :- Quote Link to comment Share on other sites More sharing options...
zeref Posted July 4, 2013 Report Share Posted July 4, 2013 como no deja editar me pidio que posteara este link aqui se los dejo es el archivo adjunto Debes iniciar sesión para ver el contenido del enlace en esta publicación. .hack//ROOTS and wolvesZone CM 2 Quote Link to comment Share on other sites More sharing options...
diper-papi-chulo Posted July 4, 2013 Report Share Posted July 4, 2013 hey men porfavor si son tan amables de postear la pet gui se los agradeseria ya que tendriamos algo mas de trolili Quote Link to comment Share on other sites More sharing options...
Sneidder Posted July 4, 2013 Report Share Posted July 4, 2013 xd lo vi en elite el diseño esta bonito donde lo descargo? Quote Link to comment Share on other sites More sharing options...
Neff10 Posted July 4, 2013 Report Share Posted July 4, 2013 porfin lo liberaste... Quote Link to comment Share on other sites More sharing options...
TheSanto Posted July 4, 2013 Report Share Posted July 4, 2013 Hace falta algún import? Quote Link to comment Share on other sites More sharing options...
Shang Posted July 4, 2013 Report Share Posted July 4, 2013 Gracias Zeler, ahora a ver si un día de estos nos das una alegría a algunos y pones la interfaz del LOM... Pero tengo un problemilla, cuando mando al caballo al establo, el horse-gui no se va de ahí arriba, uso los files de invoice, puede ser por la quest? y tampoco se me ve la raya del estado del caballo, pero eso creo que es problema de mi tarjeta gráfica. Un saludo, gracias. Quote Link to comment Share on other sites More sharing options...
Zeler Posted July 5, 2013 Author Report Share Posted July 5, 2013 hay unos files mierda que no sirven así que te recomendaría cambiar y sobre la barra % pues mira si están bien las rutas, por que creo que no meti unos archivos xd no me acuerdo Quote Link to comment Share on other sites More sharing options...
Shang Posted July 5, 2013 Report Share Posted July 5, 2013 los bluegauge no están xDDD Quote Link to comment Share on other sites More sharing options...
ßlaςK Posted July 5, 2013 Report Share Posted July 5, 2013 Gracias!! Quote Link to comment Share on other sites More sharing options...
mtcosmos Posted January 9, 2018 Report Share Posted January 9, 2018 En 4/7/2013 a las 6:55, Zeler dijo: hola, en fin como estoy cansado de la incompetencia(por parte del team asco de epvp) y de la gente cínica vengo a compartir mi código de interfaz de caballo, lo he creado yo a como se llamaba mi antiguo team; TW y ahora lo comparto con ustedes por dejarme eso en cosas de la vida y ser buena persona, seguramente más adelante comparta la interfaz total a libre distribución(Yo fui quién clono la interfaz de LOM)Además me molesta la gente mierda que no sabe ni una puta mierda y se atribuye mi trabajo, cuando no saben una puta mierda(Ya me he calmado jajaja)Ésta es el código que va en uiaffectshower.py class HorseImage(ui.ExpandedImageBox): FILE_PATH = "d:/ymir work/ui/pattern/HorseState/" PORCIENTO_BARRA = { 00 : 0, 01 : 0, 02 : 0, 03 : 0, 10 : 10, 11 : 15, 12 : 20, 13 : 30, 20 : 35, 21 : 40, 22 : 45, 23 : 50, 30 : 55, 31 : 60, 32 : 70, 33 : 100, } BARRA_BARRA = { 00 : "negrogauge", 01 : "negrogauge", 02 : "negrogauge", 03 : "negrogauge", 10 : "rojogauge", 11 : "rojogauge", 12 : "rojogauge", 13 : "rojogauge", 20 : "amarillogauge", 21 : "amarillogauge", 22 : "amarillogauge", 23 : "amarillogauge", 30 : "greengauge", 31 : "greengauge", 32 : "greengauge", 33 : "greengauge", } FILE_DICT = { 00 : FILE_PATH+"00.dds", 01 : FILE_PATH+"00.dds", 02 : FILE_PATH+"00.dds", 03 : FILE_PATH+"00.dds", 10 : FILE_PATH+"10.dds", 11 : FILE_PATH+"11.dds", 12 : FILE_PATH+"12.dds", 13 : FILE_PATH+"13.dds", 20 : FILE_PATH+"20.dds", 21 : FILE_PATH+"21.dds", 22 : FILE_PATH+"22.dds", 23 : FILE_PATH+"23.dds", 30 : FILE_PATH+"30.dds", 31 : FILE_PATH+"31.dds", 32 : FILE_PATH+"32.dds", 33 : FILE_PATH+"33.dds", } def __init__(self): ui.ExpandedImageBox.__init__(self) #self.textLineList = [] self.toolTip = uiToolTip.ToolTip(100) self.toolTip.HideToolTip() self.CB= ui.ImageBox() self.CB.LoadImage("d:/global/horse/viewer.dds") self.CB.SetPosition(255, 5) self.CB.Show() self.CB.AddFlag("movable") self.CB.AddFlag("attach") self.CAB= ui.ImageBox() self.CAB.SetParent(self.CB) self.CAB.SetPosition(16, 17) self.CAB.Show() self.Gauge3 = ui.AniImageBox() self.Gauge3.SetDelay(5) self.Gauge3.Show() self.Gauge3.SetParent(self.CAB) self.Gauge3.SetPercentage(100, 100) self.NivelC = ui.TextLine() self.NivelC.SetFeather() self.NivelC.SetOutline() self.NivelC.SetPackedFontColor(0xffFFFBF6) self.NivelC.Show() self.NivelC.SetParent(self.CB) self.NivelC.SetPosition(22, 2) self.Hambre = ui.TextLine() self.Hambre.SetFeather() self.Hambre.SetOutline() self.Hambre.SetPackedFontColor(0xffFFFBF6) self.Hambre.Show() self.Hambre.SetParent(self.CB) self.Hambre.SetPosition(60, 26) self.Descansar = ui.TextLine() self.Descansar.SetFeather() self.Descansar.SetOutline() self.Descansar.SetPackedFontColor(0xffFF8C00) self.Descansar.Show() self.Descansar.SetParent(self.CB) self.Descansar.SetPosition(60, 36) def __GetHorseGrade(self, level): if 0 == level: return 0 return (level-1)/10 + 1 def SetState(self, level, health, battery): #self.textLineList=[] self.toolTip.ClearToolTip() if level>0: try: grade = self.__GetHorseGrade(level) self.__AppendText(locale.LEVEL_LIST[grade]) self.NivelC.SetText(locale.LEVEL_LIST[grade]) LEVEL_IMAGE=["", "d:/global/horse/horse_1.dds", "d:/global/horse/horse_2.dds", "d:/global/horse/horse_3.dds"] self.CAB.LoadImage(LEVEL_IMAGE[grade]) except IndexError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery) return try: healthName=locale.HEALTH_LIST[health] if len(healthName)>0: self.__AppendText(healthName) self.Hambre.SetText(healthName) except IndexError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery) return if health>0: if battery==0: self.__AppendText(locale.NEEFD_REST) self.Descansar.SetText("Cansado") try: fileName=self.FILE_DICT[health*10+battery] pogresoactual=self.PORCIENTO_BARRA[health*10+battery] BarraActual=self.BARRA_BARRA[health*10+battery] except KeyError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - KeyError" % (level, health, battery) try: for x in range(int(1),int(7)): self.Gauge3.AppendImage("d:/global/"+BarraActual+"/0"+str(x)+".tga") self.Gauge3.SetPosition(44, 3) self.Gauge3.SetPercentage(pogresoactual, 100) except: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - LoadError %s" % (level, health, battery, fileName, pogresoactual) self.SetScale(0.7, 0.7) def __AppendText(self, text): self.toolTip.AppendTextLine(text) self.toolTip.ResizeToolTip() #x=self.GetWidth()/2 #textLine = ui.TextLine() #textLine.SetParent(self) #textLine.SetSize(0, 0) #textLine.SetOutline() #textLine.Hide() #textLine.SetPosition(x, 40+len(self.textLineList)*16) #textLine.SetText(text) #self.textLineList.append(textLine) def OnMouseOverIn(self): #for textLine in self.textLineList: # textLine.Show() self.toolTip.ShowToolTip() def OnMouseOverOut(self): #for textLine in self.textLineList: # textLine.Hide() self.toolTip.HideToolTip() ¡Atención! Tabso en el adjunto hay un archivo que ya tiene el códigoLos archivos:(en adjunto)Captura de pantalla: Sí tienes un error no dudes en responder este post-- Cuando hablo de error es un error no de que no sepas implementar, no jodan con eso a estás alturas ya debes saber algo. ??? Quote Link to comment Share on other sites More sharing options...
Dilong Posted January 9, 2018 Report Share Posted January 9, 2018 Ya te dara ayuda alguien que desde el 2013 no ha entrado al foro Quote Link to comment Share on other sites More sharing options...
mtcosmos Posted January 10, 2018 Report Share Posted January 10, 2018 En 9/1/2018 a las 17:51, Dilong dijo: Ya te dara ayuda alguien que desde el 2013 no ha entrado al foro Pero alomejor otro tiene idea... nose xd Break 1 Quote Link to comment Share on other sites More sharing options...
mtcosmos Posted January 10, 2018 Report Share Posted January 10, 2018 En 9/1/2018 a las 17:51, Dilong dijo: Ya te dara ayuda alguien que desde el 2013 no ha entrado al foro self.CB.SetPosition arreglado Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.