Desineria RPG Maker
Você esta conectado na Desineria RPG Maker!

Participe do fórum, é rápido e fácil

Desineria RPG Maker
Você esta conectado na Desineria RPG Maker!
Desineria RPG Maker
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

sistema de contagen kill e death

Ir para baixo

sistema de contagen kill e death Empty sistema de contagen kill e death

Mensagem  wesleyhero Sex Nov 04, 2011 2:56 pm

Client~Side

Na Type PlayerRec, no final antes do End Type, adicione:
Código:
    Kill As Long
    Dead As Long

Procure por:
Código:
    Call SetPlayerPK(i, Buffer.ReadLong)

E abaixo adicione:
Código:
    Player(i).Kill = Buffer.ReadLong
    Player(i).Dead = Buffer.ReadLong

Serve~Side

Na Type PlayerRec, no final antes do End Type, adicione:
Código:
    Kill As Long
    Dead As Long

Na Sub AddChar e nela ache:
Código:
        Player(Index).Vital(Vitals.MP) = GetPlayerMaxVital(Index, Vitals.MP)

E abaixo adicione:
Código:
        Player(Index).Kill = 0
        Player(Index).Dead = 0

Agora na Sub PlayerAttackPlayer procure por:
Código:
        If exp = 0 Then
            Call PlayerMsg(victim, "You lost no exp.", BrightRed)
            Call PlayerMsg(attacker, "You received no exp.", BrightBlue)
        Else
            Call SetPlayerExp(victim, GetPlayerExp(victim) - exp)
            SendEXP victim
            Call PlayerMsg(victim, "You lost " & exp & " exp.", BrightRed)

E acima adicione:
Código:
        ' Kill e Dead
        Player(attacker).Kill = Player(attacker).Kill + 1
        Call PlayerMsg(attacker, "Agora você tem " & Player(attacker).Kill & " Kill's", BrightRed)
        Player(victim).Dead = Player(victim).Dead + 1
        Call PlayerMsg(victim, "Agora você tem " & Player(victim).Dead & " Dead's", BrightRed)

Na Function PlayerData procure por:
Código:
    Buffer.WriteLong GetPlayerPK(Index)

E abaixo adicione:
Código:
    Buffer.WriteLong Player(Index).Kill
    Buffer.WriteLong Player(Index).Dead


isso conta quantas vezes vc foi morto e quantos vc matou otimo para pvps tb ^^ clik no +
wesleyhero
wesleyhero
Moderador Global
Moderador Global

Mensagens : 11
Pontos : 33
Reputação : 9
Data de inscrição : 02/11/2011

Desineria RPG Maker
Nível de atividade Nível de atividade:
sistema de contagen kill e death Left_bar_bleue34/1000sistema de contagen kill e death Empty_bar_bleue  (34/1000)

Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos