[C++] Full Renewal For Safebox Password System

  • INTRODUCTION & PROBLEM


    Hello, I have been wanting to renew the safebox password system in the game for a long time, I wanted to deal with it as soon as I had time, I think the resulting code is useful, so I am sharing it with you so that everyone can use it.


    WHY & WHAT DID WE CHANGE?


    Many controls were missing within the functions, I think that giving too much freedom to the players in systems where such players can make choices by entering a text may pave the way for the possibility of abuse. Innovations and controls were added both for this and for situations related to the password security of the players. Let's briefly look at what we did;


    - The password can only consist of digits.

    - The password can consist of a maximum of 6 and a minimum of 4 digits.

    - If the player does not change his password and continues to use it as "000000", he will encounter a warning message that he must change his password every time he opens the safebox or mall.

    - The player must be near the storekeeper to change the password. (Those who do not prefer it can simply make it a comment line)

    - If the player writes his current password as his new password when changing his password, he will receive a warning and the process will not be completed.

    - If the player wants to change his password to "000000", game will be asked to choose another password and the process will not be completed.


    ATTENTION!


    For functions that need to be completely changed, remember that if there is a system or fix-related codes you are already using, you should make this change after adapting it to the function I have given.


    HOW TO DO?


    First, open the "char.cpp" file.


    Then open the "cmd_general.cpp" file.


    Lastly open the "locale_string.txt" file.


    Best Regards, MT2Dev.

    Bitte melden Sie sich an, um dieses Bild zu sehen.


    ©

    Einmal editiert, zuletzt von MT2Dev () aus folgendem Grund: Little correction.