Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.



 
InícioÚltimas imagensProcurarRegistarEntrar
Os que mais criam tópicos
Sonart
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
Alenaldo
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
Over~
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
Warrior
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
Caio~
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
SSO
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
newbie123
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
Jim
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
Kaue
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
yuri godinho
Mirage Creation - HP, MP e EXP em Porcentagem I_vote_lcapMirage Creation - HP, MP e EXP em Porcentagem I_voting_barMirage Creation - HP, MP e EXP em Porcentagem I_vote_rcap 
Entrar
Nome de usuário:
Senha:
Entrar automaticamente: 
:: Esqueci-me da senha

 

 Mirage Creation - HP, MP e EXP em Porcentagem

Ir para baixo 
AutorMensagem
Caio~
Membro
Membro
Caio~


Mensagens : 53
Moeda : 92
Pontos : 5
Data de inscrição : 07/01/2013
Idade : 26
Localização : Belém

Mirage Creation - HP, MP e EXP em Porcentagem Empty
MensagemAssunto: Mirage Creation - HP, MP e EXP em Porcentagem   Mirage Creation - HP, MP e EXP em Porcentagem Icon_minitimeSex Jan 11, 2013 11:02 am

- Descrição -

Nesse tutorial iremos aprender como deixar as barras de HP, MP e EXP (também na janela do personagem) em porcentagem. O tutorial é bem simples, basta prestar atenção para não colocar o código de HP em MP, pois é bem parecido ^^.

- Tutorial -

Abra o Client~Side e na modHandleData proucure pela Private Sub HandlePlayerHp. Nela, proucure por esta parte: HPBar_Text. Substitua a linha toda dela por essa:
Código:
        HPBar_Text = Round((Player(MyIndex).Vital(Vitals.HP) / Player(MyIndex).MaxVital(Vitals.HP) * 100), 2) & "%"

Agora na Private Sub HandlePlayerMp proucure por esta parte: MPBar_Text. Substitua a linha toda por essa:
Código:
        MPBar_Text = Round((Player(MyIndex).Vital(Vitals.MP) / Player(MyIndex).MaxVital(Vitals.MP) * 100), 2) & "%"

Agora substitua toda a Private Sub HandlePlayerExp por isso:
Código:
Private Sub HandlePlayerExp(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    Dim Buffer As clsBuffer
    Set Buffer = New clsBuffer
   
    Call Buffer.WriteBytes(Data())
   
    Player(MyIndex).Exp = Buffer.ReadLong
    Player(MyIndex).MaxExp = Buffer.ReadLong
   
    'GameWindow.Character.Surface(Stats.Stat_Count + 3).Text.Caption = StatNames(Stats.Stat_Count + 1) & Round((Player(MyIndex).Exp / Player(MyIndex).MaxExp * 100), 2) & "%"
   
    If Player(MyIndex).Exp > 0 Then
        EXPBar_MaxWidth = Int(((Player(MyIndex).Exp / GUIBar_Width) / (Player(MyIndex).MaxExp / GUIBar_Width)) * GUIBar_Width)
        EXPBar_Text = Round((Player(MyIndex).Exp / Player(MyIndex).MaxExp * 100), 2) & "%"
        GameWindow.Character.Surface(Stats.Stat_Count + 3).Text.Caption = StatNames(Stats.Stat_Count + 1) & Round((Player(MyIndex).Exp / Player(MyIndex).MaxExp * 100), 2) & "%"
    End If

End Sub

Pronto! Este tutorial foi testado.

- Créditos -

Caio~
Ir para o topo Ir para baixo
Caio~
Membro
Membro
Caio~


Mensagens : 53
Moeda : 92
Pontos : 5
Data de inscrição : 07/01/2013
Idade : 26
Localização : Belém

Mirage Creation - HP, MP e EXP em Porcentagem Empty
MensagemAssunto: Re: Mirage Creation - HP, MP e EXP em Porcentagem   Mirage Creation - HP, MP e EXP em Porcentagem Icon_minitimeDom Jan 13, 2013 8:30 pm

Tutorial atualizado.
Bug na porcentagem de EXP nos status corrigido. Siga o tutorial abaixo:

Substitua a sua Private Sub HandlePlayerExp por essa:
Código:
    Private Sub HandlePlayerExp(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
        Dim Buffer As clsBuffer
        Set Buffer = New clsBuffer
     
        Call Buffer.WriteBytes(Data())
     
        Player(MyIndex).Exp = Buffer.ReadLong
        Player(MyIndex).MaxExp = Buffer.ReadLong
     
        'GameWindow.Character.Surface(Stats.Stat_Count + 3).Text.Caption = StatNames(Stats.Stat_Count + 1) & Round((Player(MyIndex).Exp / Player(MyIndex).MaxExp * 100), 2) & "%"
     
        If Player(MyIndex).Exp > 0 Then
            EXPBar_MaxWidth = Int(((Player(MyIndex).Exp / GUIBar_Width) / (Player(MyIndex).MaxExp / GUIBar_Width)) * GUIBar_Width)
            EXPBar_Text = Round((Player(MyIndex).Exp / Player(MyIndex).MaxExp * 100), 2) & "%"
            GameWindow.Character.Surface(Stats.Stat_Count + 3).Text.Caption = StatNames(Stats.Stat_Count + 1) & Round((Player(MyIndex).Exp / Player(MyIndex).MaxExp * 100), 2) & "%"
        End If

    End Sub
Ir para o topo Ir para baixo
 
Mirage Creation - HP, MP e EXP em Porcentagem
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» Mirage Creation - Nível do NPC não aparecer quando for 0
» [Mirage Creation] Correção - Nome do NPC
» Mirage Creation - Diminuindo lag do autotile
» Mirage Creation - Adicionando panoramas
» Mirage Creation - NPC forte com cor de nome diferente

Permissões neste sub-fórumNão podes responder a tópicos
 :: Desenvolvimento de Jogos :: Engines :: DX8 Engine :: Tutoriais-
Ir para: