¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.


Todo sobre AO
 
ÍndiceÚltimas imágenesBuscarRegistrarseConectarse

 

 Ver vida de los usuarios

Ir abajo 
AutorMensaje
Agus
Admin



Mensajes : 69
Fecha de inscripción : 01/07/2008

Ver vida de los usuarios Empty
MensajeTema: Ver vida de los usuarios   Ver vida de los usuarios EmptyVie Ago 01, 2008 7:38 pm

Bien, como lo estan pidiendo por el foro, acá lo dejo, con dos formas, como el de los NPCs:


Se ve la VidaActual/VidaTotal.
Se ve el estado del usuario (herido, malherido, etc...)

Buscamos en el modulo Extra (GameLogic.bas), dentro del Sub LookAtTile, lo siguiente:

Citación :
If FoundChar = 1 Then ' ¿Encontro un Usuario?

If UserList(TempCharIndex).flags.AdminInvisible = 0 Or UserList(UserIndex).flags.Privilegios = PlayerType.Dios Then

If UserList(TempCharIndex).DescRM = "" Then
If EsNewbie(TempCharIndex) Then
Stat = " <NEWBIE>"
End If

If UserList(TempCharIndex).Faccion.ArmadaReal = 1 Then
Stat = Stat & " <Ejercito real> " & "<" & TituloReal(TempCharIndex) & ">"
ElseIf UserList(TempCharIndex).Faccion.FuerzasCaos = 1 Then
Stat = Stat & " <Legión oscura> " & "<" & TituloCaos(TempCharIndex) & ">"
End If

If UserList(TempCharIndex).GuildIndex > 0 Then
Stat = Stat & " <" & Guilds(UserList(TempCharIndex).GuildIndex).GuildName & ">"
End If

If Len(UserList(TempCharIndex).Desc) > 1 Then
Stat = "Ves a " & UserList(TempCharIndex).name & Stat & " - " & UserList(TempCharIndex).Desc
Else
Stat = "Ves a " & UserList(TempCharIndex).name & Stat
End If

If UserList(TempCharIndex).flags.PertAlCons > 0 Then
Stat = Stat & " [CONSEJO DE BANDERBILL]" & FONTTYPE_CONSEJOVesA
ElseIf UserList(TempCharIndex).flags.PertAlConsCaos > 0 Then
Stat = Stat & " [CONSEJO DE LAS SOMBRAS]" & FONTTYPE_CONSEJOCAOSVesA
Else
If UserList(TempCharIndex).flags.Privilegios > 0 Then
Stat = Stat & " <GAME MASTER> ~0~185~0~1~0"
ElseIf Criminal(TempCharIndex) Then
Stat = Stat & " <CRIMINAL> ~255~0~0~1~0"
Else
Stat = Stat & " <CIUDADANO> ~0~0~200~1~0"
End If
End If
Else
Stat = UserList(TempCharIndex).DescRM & " " & FONTTYPE_INFOBOLD
End If

If Len(Stat) > 0 Then _
Call SendData(SendTarget.ToIndex, UserIndex, 0, "||" & Stat)

FoundSomething = 1
UserList(UserIndex).flags.TargetUser = TempCharIndex
UserList(UserIndex).flags.TargetNPC = 0
UserList(UserIndex).flags.TargetNpcTipo = eNPCType.Comun
End If

End If

Ahora debemos elegir de que forma deseamos visualisar. Para la primer forma, reemplazamos todo eso por lo siguiente:

Citación :
If FoundChar = 1 Then ' ¿Encontro un Usuario?

If UserList(TempCharIndex).flags.AdminInvisible = 0 Or UserList(UserIndex).flags.Privilegios = PlayerType.Dios Then

If UserList(TempCharIndex).DescRM = "" Then
If EsNewbie(TempCharIndex) Then
Stat = " <NEWBIE>"
End If

If UserList(TempCharIndex).Faccion.ArmadaReal = 1 Then
Stat = Stat & " <Ejercito real> " & "<" & TituloReal(TempCharIndex) & ">"
ElseIf UserList(TempCharIndex).Faccion.FuerzasCaos = 1 Then
Stat = Stat & " <Legión oscura> " & "<" & TituloCaos(TempCharIndex) & ">"
End If

If UserList(TempCharIndex).GuildIndex > 0 Then
Stat = Stat & " <" & Guilds(UserList(TempCharIndex).GuildIndex).GuildName & ">"
End If

If Len(UserList(TempCharIndex).Desc) > 1 Then
Stat = "Ves a " & UserList(TempCharIndex).name & Stat & " - " & UserList(TempCharIndex).Desc
Else
Stat = "Ves a " & UserList(TempCharIndex).name & Stat
End If

Stat = Stat & " [" & UserList(TempCharIndex).Stats.MinHP & "/" & UserList(TempCharIndex).Stats.MaxHP & "]"

If UserList(TempCharIndex).flags.PertAlCons > 0 Then
Stat = Stat & " [CONSEJO DE BANDERBILL]" & FONTTYPE_CONSEJOVesA
ElseIf UserList(TempCharIndex).flags.PertAlConsCaos > 0 Then
Stat = Stat & " [CONSEJO DE LAS SOMBRAS]" & FONTTYPE_CONSEJOCAOSVesA
Else
If UserList(TempCharIndex).flags.Privilegios > 0 Then
Stat = Stat & " <GAME MASTER> ~0~185~0~1~0"
ElseIf Criminal(TempCharIndex) Then
Stat = Stat & " <CRIMINAL> ~255~0~0~1~0"
Else
Stat = Stat & " <CIUDADANO> ~0~0~200~1~0"
End If
End If
Else
Stat = UserList(TempCharIndex).DescRM & " " & FONTTYPE_INFOBOLD
End If

If Len(Stat) > 0 Then _
Call SendData(SendTarget.ToIndex, UserIndex, 0, "||" & Stat)

FoundSomething = 1
UserList(UserIndex).flags.TargetUser = TempCharIndex
UserList(UserIndex).flags.TargetNPC = 0
UserList(UserIndex).flags.TargetNpcTipo = eNPCType.Comun
End If

End If

Para la segunda forma, reemplazamos todo eso por lo siguiente:

Citación :
If FoundChar = 1 Then ' ¿Encontro un Usuario?

If UserList(TempCharIndex).flags.AdminInvisible = 0 Or UserList(UserIndex).flags.Privilegios = PlayerType.Dios Then

If UserList(TempCharIndex).DescRM = "" Then
If EsNewbie(TempCharIndex) Then
Stat = " <NEWBIE>"
End If

If UserList(TempCharIndex).Faccion.ArmadaReal = 1 Then
Stat = Stat & " <Ejercito real> " & "<" & TituloReal(TempCharIndex) & ">"
ElseIf UserList(TempCharIndex).Faccion.FuerzasCaos = 1 Then
Stat = Stat & " <Legión oscura> " & "<" & TituloCaos(TempCharIndex) & ">"
End If

If UserList(TempCharIndex).GuildIndex > 0 Then
Stat = Stat & " <" & Guilds(UserList(TempCharIndex).GuildIndex).GuildName & ">"
End If

If Len(UserList(TempCharIndex).Desc) > 1 Then
Stat = "Ves a " & UserList(TempCharIndex).name & Stat & " - " & UserList(TempCharIndex).Desc
Else
Stat = "Ves a " & UserList(TempCharIndex).name & Stat
End If

If UserList(TempCharIndex).Stats.MinHP < (UserList(TempCharIndex).Stats.MaxHP * 0.05) Then
Stat = Stat & " [Agonizando]"
ElseIf UserList(TempCharIndex).Stats.MinHP < (UserList(TempCharIndex).Stats.MaxHP * 0.1) Then
Stat = Stat & " [Casi muerto]"
ElseIf UserList(TempCharIndex).Stats.MinHP < (UserList(TempCharIndex).Stats.MaxHP * 0.25) Then
Stat = Stat & " [Muy Malherido]"
ElseIf UserList(TempCharIndex).Stats.MinHP < (UserList(TempCharIndex).Stats.MaxHP * 0.5) Then
Stat = Stat & " [Herido]"
ElseIf UserList(TempCharIndex).Stats.MinHP < (UserList(TempCharIndex).Stats.MaxHP * 0.75) Then
Stat = Stat & " [Levemente herido]"
ElseIf UserList(TempCharIndex).Stats.MinHP < (UserList(TempCharIndex).Stats.MaxHP) Then
Stat = Stat & " [Sano]"
Else
Stat = Stat & " [Intacto]"
End If

If UserList(TempCharIndex).flags.PertAlCons > 0 Then
Stat = Stat & " [CONSEJO DE BANDERBILL]" & FONTTYPE_CONSEJOVesA
ElseIf UserList(TempCharIndex).flags.PertAlConsCaos > 0 Then
Stat = Stat & " [CONSEJO DE LAS SOMBRAS]" & FONTTYPE_CONSEJOCAOSVesA
Else
If UserList(TempCharIndex).flags.Privilegios > 0 Then
Stat = Stat & " <GAME MASTER> ~0~185~0~1~0"
ElseIf Criminal(TempCharIndex) Then
Stat = Stat & " <CRIMINAL> ~255~0~0~1~0"
Else
Stat = Stat & " <CIUDADANO> ~0~0~200~1~0"
End If
End If
Else
Stat = UserList(TempCharIndex).DescRM & " " & FONTTYPE_INFOBOLD
End If

If Len(Stat) > 0 Then _
Call SendData(SendTarget.ToIndex, UserIndex, 0, "||" & Stat)

FoundSomething = 1
UserList(UserIndex).flags.TargetUser = TempCharIndex
UserList(UserIndex).flags.TargetNPC = 0
UserList(UserIndex).flags.TargetNpcTipo = eNPCType.Comun
End If

End If

Y así debería funcionar. Espero que les sirva!
Volver arriba Ir abajo
https://recompilacionao.forosactivos.com
 
Ver vida de los usuarios
Volver arriba 
Página 1 de 1.
 Temas similares
-
» Ver vida de Npc's

Permisos de este foro:No puedes responder a temas en este foro.
 :: Argentum Online :: Programación :: 0.11.5-
Cambiar a: