Jump to content

[SG]Interfaz de caballo[Horse gui]


Zeler

Mensajes recomendados

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: Imagen enviadaSí 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.
Enlace para comentar
Compartir en otros sitios

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.

 

Imagen enviada

 

Un saludo, gracias.

Enlace para comentar
Compartir en otros sitios

  • 4 years later...
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: Imagen enviadaSí 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.

 ???

Enlace para comentar
Compartir en otros sitios

Unirse a la conversación

Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.

Guest
Responder a este tema...

×   Has pegado contenido con formato .   Eliminar formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incorporado automáticamente.   Mostrar un enlace en su lugar

×   Se ha restaurado el contenido anterior. .   Borrar editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...