Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker

Estamos de volta o/ ... Ou não.Eu amo a -Dark
Doações para o fórum abertas, clique aqui e saiba mais.
Últimos assuntos
» Ainda temos gente aqui?
Sistema de resets (automático) EmptyQui 25 Nov 2021, 14:04 por Halt

» [Dúvida] Como tirar a porcentagem de esquiva
Sistema de resets (automático) EmptySex 19 Nov 2021, 17:14 por Halt

» Pokémon Genesis Online! (PGO)
Sistema de resets (automático) EmptyQua 05 Jul 2017, 18:08 por Lexar

» Tileset Converter to MV
Sistema de resets (automático) EmptySex 12 maio 2017, 14:07 por Douggi

» Pack Resources, Sprites e etc
Sistema de resets (automático) EmptyQua 23 Dez 2015, 12:30 por raydengv

» Download RPG Maker 2003 + RTP em português
Sistema de resets (automático) EmptyTer 22 Dez 2015, 11:14 por ::KimMax::

» Fantasy Art Online
Sistema de resets (automático) EmptyDom 18 Out 2015, 18:42 por daviih123

» Você vai ter medo do Nerve gear?
Sistema de resets (automático) EmptySáb 25 Jul 2015, 17:02 por Kirito-kun

» O Barato é louco
Sistema de resets (automático) EmptySáb 27 Jun 2015, 16:26 por Halt

» Download RPG Maker 2000 + RTP em português
Sistema de resets (automático) EmptyQui 21 maio 2015, 20:28 por Wismael


Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir para baixo  Mensagem [Página 1 de 1]

1Sistema de resets (automático) Empty Sistema de resets (automático) Qui 10 Jan 2013, 16:58

Halt

Halt
Administrador
Administrador
Ricardo escreveu:

Client~Side

No final da Type PlayerRec antes do End Type adicione:

Código:
    Resets As Long

Procure por:

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

E abaixo adicione:

Código:
    Call SetPlayerResets(i, Buffer.ReadLong)

Procure por:

Código:
Sub SetPlayerPK(ByVal Index As Long, ByVal PK As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler


    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).PK = PK
   
    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerPK", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

E abaixo adicione:

Código:
Function GetPlayerResets(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler


    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerResets = Player(Index).Resets
   
    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerResets", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function


Sub SetPlayerResets(ByVal Index As Long, ByVal Resets As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler


    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Resets = Resets
   
    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerResets", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Serve~Side

No final da Type PlayerRec antes do End Type adicione:

Código:
    Resets As Long

Procure por:

Código:
    Buffer.WriteLong GetPlayerPK(index)

E abaixo adicione:

Código:
    Buffer.WriteLong GetPlayerResets(index)

No final da Sub CheckPlayerLevelUp, antes do End Sub, adicione:

Código:
    If GetPlayerLevel(index) = 1000 Then ' Mude o 1000 para o level nessessario para resetar
        Call PlayerMsg(index, "Parabens " & GetPlayerName(index) & "você acaba  de resetar", 15)
        Call SendAnimation(1, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)) ' Mude o número 1 para o número da animção que aparecera ao resetar
        Call SetPlayerLevel(index, 1) 'Volta para o level 1
        Call SetPlayerExp(index, 1) ' Traz a experiencia do player para 1
        Call setplayerResets(index, GetPlayerResets(index) + 1)
        Call SendPlayerData(index)  ' Salva o player
        Call SendEXP(index)  ' Salva a experiencia do player
    End If

Procure por:

Código:
Sub SetPlayerPK(ByVal index As Long, ByVal PK As Long)
    Player(index).PK = PK
End Sub

E abaixo adicione:

Código:
Function GetPlayerResets(ByVal index As Long) As Long
    If index > MAX_PLAYERS Then Exit Function
    GetPlayerResets = Player(index).Resets
End Function


Sub SetPlayerResets(ByVal index As Long, ByVal Resets As Long)
    Player(index).Resets = Resets
End Sub

Créditos:

Ricardo

https://arenarpgmaker.forumeiros.com

Ver o tópico anterior Ver o tópico seguinte Ir para o topo  Mensagem [Página 1 de 1]

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