iHero Posted January 19, 2012 Author Share Posted January 19, 2012 **Client~Side**At the end of Type End Type PlayerRec before add:``` Resets As Long```Search by:``` Call SetPlayerPK(i, Buffer.ReadLong)```Add bellow:``` Call SetPlayerResets(i, Buffer.ReadLong)```Search by:```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 Suberrorhandler: HandleError "SetPlayerPK", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```Add below:```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 Functionerrorhandler: HandleError "GetPlayerResets", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerResets", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```**Serve~Side**At the end of Type End Type PlayerRec before add:``` Resets As Long```Search by:``` Buffer.WriteLong GetPlayerPK(index)```Add bellow:``` Buffer.WriteLong GetPlayerResets(index)```At the end of Sub CheckPlayerLevelUp before the End Sub, add:``` If GetPlayerLevel(index) = 1000 Then ' Mude o 1000 para o level nessessario para resetar Call PlayerMsg(index, "Congratulations " & GetPlayerName(index) & " you have just reset", 15) Call SendAnimation(1, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)) ' 'Change the number 1 for the number of which appeared to reset animation Call SetPlayerLevel(index, 1) 'Return to level 1 Call SetPlayerExp(index, 1) 'Return to experience 1 Call setplayerResets(index, GetPlayerResets(index) + 1) Call SendPlayerData(index) 'Save the player Call SendEXP(index) 'Saves the experience of the player End If```Search by:```Sub SetPlayerPK(ByVal index As Long, ByVal PK As Long) Player(index).PK = PKEnd Sub```Add bellow:```Function GetPlayerResets(ByVal index As Long) As Long If index > MAX_PLAYERS Then Exit Function GetPlayerResets = Player(index).ResetsEnd FunctionSub SetPlayerResets(ByVal index As Long, ByVal Resets As Long) Player(index).Resets = ResetsEnd Sub```Credits:iHero Link to comment Share on other sites More sharing options...
Robin Posted January 19, 2012 Share Posted January 19, 2012 Hello Comic Sans MS. Link to comment Share on other sites More sharing options...
iHero Posted January 19, 2012 Author Share Posted January 19, 2012 Hehe, sorry, but there is some problem with the power, if I want to retreat. Link to comment Share on other sites More sharing options...
Justn Posted January 19, 2012 Share Posted January 19, 2012 Whats the purpose of using this? :confused: Link to comment Share on other sites More sharing options...
iHero Posted January 19, 2012 Author Share Posted January 19, 2012 Well, there are several games that use a "system" that when you reach the level X it returns to the initial level, this is a complete system of this "system" they use. Link to comment Share on other sites More sharing options...
Domino_ Posted January 20, 2012 Share Posted January 20, 2012 Resets are counting? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now