Sistema de Resets
Página 1 de 1 • Compartilhe •
Sistema de Resets
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
Ricardo- Mensagens : 42
Re: Sistema de Resets
Muito Bom Ricardo!, alem de eu nao entender nada disso '-', mais tipo eu axo q esse sistema de reset ja tem postado, ainda deve ter muitos, tipo tem de resets automatico e um monte eu axo :$, seila
por min vc merece meu Cred !
por min vc merece meu Cred !

Re: Sistema de Resets
Sim, mas esse é diferente, ele conta os resets do player na conta 

Ricardo- Mensagens : 42

» Hoppi Hotel - Sistema Lucrativo - Habbo Pirata - Gratis - Eventos - Promoções - Vagas na Equipe
» Habbo Sistema Lucrativo - Sem Lag - Totalmente Novo - Wireds 100& - Cassinos - Raros Semanais
» Novo sistema da Receita
» Sistema de Moedas & Lojinha
» Como Criar Mice 1.175 Com Sistema De Moedas !!
» Habbo Sistema Lucrativo - Sem Lag - Totalmente Novo - Wireds 100& - Cassinos - Raros Semanais
» Novo sistema da Receita
» Sistema de Moedas & Lojinha
» Como Criar Mice 1.175 Com Sistema De Moedas !!
Página 1 de 1
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum