More than 999 events?

I have a problem with a gameplay on my map.

On this map, when the player walks a step, there is an event with a variable +1.
When the variable is +13 (common event) : you die. There are some places that allow you to rest in order to reset your energy (variable =0) and continue the progression.
The problem is: I can't put more than 999 events of my map.

So, I have 2 questions:
Can I realize this gameplay differently than by copying and pasting thousands of events?
If no, how to put more than 999 events?
You could do this with regions (the R tile) and a region common event plug-in. Basically, mark one region the area where the variable goes up, and one region where you reset it. Then, set up the two common events for those regions (see the directions in the plug-in, it will vary depending on what plug-in you use). Should work, and you will need a lot less events.
Oh, thank you !!!!
I found.
I'll just leave this here.

Code:
//=============================================================================
// LaurentEnergy.js
//=============================================================================

/*:
 * @plugindesc Quick overwrite of the player's moveStraight function to add to a variable when on a certain region, game over if the variable is 13, and reset the variable to 0 when on a certain other region.
 *
 * @param Fatigue region
 * @desc The region ID which will add to the fatigue variable.
 * @default 254
 *
 * @param Reset region
 * @desc The region ID which will reset the fatigue variable.
 * @default 255
 *
 * @param Fatigue variable
 * @desc The ID of the variable that will track fatigue.
 * @default 1
 *
 * @param Fatigue limit
 * @desc The variable value at which a game over will occur.
 * @default 13
 *
 * @author John Clifford (Trihan)
 *
 * @help
 *
 * Plug and play, turn the plugin on.
 *
 * TERMS OF USE
 * This plugin is free to use for any purpose. Credit is appreciated but unnecessary.
 *
 */

(function() {
    var currentScriptPath = document.currentScript.src;
    var startIndex = currentScriptPath.lastIndexOf('/') + 1;
    var numChars = currentScriptPath.lastIndexOf('.') - startIndex;
    var currentScriptName = currentScriptPath.substr(startIndex, numChars);
    var parameters = PluginManager.parameters(currentScriptName);
   
    var fatigueRegion = Number(parameters['Fatigue region']);
    var resetRegion = Number(parameters['Reset region']);
    var fatigueVar = Number(parameters['Fatigue variable']);
    var fatigueLimit = Number(parameters['Fatigue limit']);
   
    _Game_Player_moveStraight = Game_Player.prototype.moveStraight;
    Game_Player.prototype.moveStraight = function(d) {
        _Game_Player_moveStraight.call(this, d);
        if ($gamePlayer.regionId() === fatigueRegion) {
            $gameVariables.setValue(fatigueVar, $gameVariables.value(fatigueVar) + 1);
            if ($gameVariables.value(fatigueVar) === fatigueLimit) {
                SceneManager.goto(Scene_Gameover);
            }
        } else if ($gamePlayer.regionId() === resetRegion) {
            $gameVariables.setValue(fatigueVar, 0);
        }
    };
})();

Original thread: https://forums.rpgmakerweb.com/threads/more-than-999-events.75413/