Convidado Convidado
| Assunto: Sistema de Resets Qua 30 Nov 2011, 20:15 | |
| Client~SideNo 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~SideNo 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 |
|
Convidado Convidado
| Assunto: Re: Sistema de Resets Qua 30 Nov 2011, 20:26 | |
| 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 ! |
|
Convidado Convidado
| Assunto: Re: Sistema de Resets Qua 30 Nov 2011, 20:46 | |
| Sim, mas esse é diferente, ele conta os resets do player na conta |
|
Conteúdo patrocinado
| Assunto: Re: Sistema de Resets | |
| |
|