Alenaldo Membro
Mensagens : 38 Moeda : 104 Pontos : 4 Data de inscrição : 05/01/2013 Idade : 31 Localização : São luis MA
| Assunto: Excesso de EXP Seg Jan 14, 2013 8:56 am | |
| O char pode ter mais exp do que o limite, quando ele está no nível máximo. Isso faz que, ao atingir certa quantia de Exp, o server feche. Para corrigir, localize o modPlayer > SetPlayerExp e adicione abaixo do Player(index).exp = exp este código: CÓDIGO: - Código:
-
If GetPlayerLevel(index) = MAX_LEVELS And Player(index).exp > GetPlayerNextLevel(index) Then Player(index).exp = GetPlayerNextLevel(index) Exit Sub End If No cliente, localize Function GetPlayerExp e adicione abaixo do End Function este código: CÓDIGO: - Código:
-
Function GetPlayerNextLevel(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 GetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(index) + 1) ^ 3 - (6 * (GetPlayerLevel(index) + 1) ^ 2) + 17 * (GetPlayerLevel(index) + 1) - 12) ' Error handler Exit Function errorhandler: HandleError "GetPlayerNextLevel", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function E adicione abaixo do Player(index).EXP, no Sub SetPlayerExp, este código: CÓDIGO: - Código:
-
If GetPlayerLevel(index) = MAX_LEVELS And Player(index).EXP > GetPlayerNextLevel(index) Then Player(index).EXP = GetPlayerNextLevel(index) Exit Sub End If Créditos: Raphael C. Créditos: A mim por postar | |
|