Alenaldo Membro
Mensagens : 38 Moeda : 104 Pontos : 4 Data de inscrição : 05/01/2013 Idade : 31 Localização : São luis MA
| Assunto: Sistema de Resets Sáb Jan 05, 2013 12:49 pm | |
| - Citação :
- 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
- Citação :
- 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 Alenaldo por posta aki | |
|
Over~ Moderador.G
Mensagens : 149 Moeda : 214 Pontos : 11 Data de inscrição : 04/01/2013
| Assunto: Re: Sistema de Resets Sáb Jan 05, 2013 1:01 pm | |
| Muito bom obrigado por disponibilizar. | |
|
Warrior Admin
Mensagens : 164 Moeda : 1726 Pontos : 3 Data de inscrição : 30/08/2012 Idade : 33
| Assunto: Re: Sistema de Resets Sáb Jan 05, 2013 3:49 pm | |
| Nao acho isso legal pois deveria ter um botão resetar em vez de resetar automaticamente sacas ficaria mais legal ou escrever no xat /reset tipo mu online | |
|
Over~ Moderador.G
Mensagens : 149 Moeda : 214 Pontos : 11 Data de inscrição : 04/01/2013
| Assunto: Re: Sistema de Resets Sáb Jan 05, 2013 3:59 pm | |
| realmente warrior e causo o player não deseje resetar? Oque ele faria? Eis a questão. | |
|
Warrior Admin
Mensagens : 164 Moeda : 1726 Pontos : 3 Data de inscrição : 30/08/2012 Idade : 33
| Assunto: Re: Sistema de Resets Sáb Jan 05, 2013 4:04 pm | |
| Sim ficaria mais legal se a pessoa quisese ai tipo numa pag tivesse quantos resetes ele tinha e blabla nao seria?? | |
|
joaopaulo98 Membro
Mensagens : 2 Moeda : 2 Pontos : 0 Data de inscrição : 12/05/2014
| Assunto: Re: Sistema de Resets Seg maio 19, 2014 7:28 am | |
| que tutorial de vidente tem que prever onde fica os negocios | |
|
Conteúdo patrocinado
| Assunto: Re: Sistema de Resets | |
| |
|