MV Creating event behaviour that appears 1 time per map with Eli Self Variables

I am creating a mining system at my game using Eli Self Variables and Self Switches. What I want to do is that the player should interact with the stone with a pick, interacting with it many times. I want the game to randomize if stairs will appear after the stone is picked or not. This system is inspired by Stardew Valley mining system. But there's a problem with the execution of my idea.
I am also incorporating self variables to randomize between a specific kind of resource (stone, ore, diamonds, etc) which has been done but I had this problem with the stairs anyways

The stairs appear multiple times
and I think it's because the plugin treats it like two independent events. The wanted behaviour of the event is to make the stairs appear randomly after the stone is picked. But there should be 1 stairs per map, and the stairs position/event should reset if the player leaves the map. But no multiple stairs. Only 1 per map (unless the player leaves it then it resets)

I'll be waiting for your help and advice on this
Not sure about those plugins, but you don't need them for that. On the last hit you just roll your rng variable then:

Code:
If variable "ladder rng" = x
    if Switch "Ladder" = Off
        Self switch x = ON (this should turn on a new page on the ore event that is the ladder)
        Switch "Ladder" = ON

Then upon leaving the mine in any way, or when you go down a floor, turn the "Ladder" switch back off. The else brach is probably not even needed tbh, I just put it there for clarification
Not sure about those plugins, but you don't need them for that. On the last hit you just roll your rng variable then:

Code:
If variable "ladder rng" = x
    if Switch "Ladder" = Off
        Self switch x = ON (this should turn on a new page on the ore event that is the ladder)
        Switch "Ladder" = ON

Then upon leaving the mine in any way, or when you go down a floor, turn the "Ladder" switch back off. The else brach is probably not even needed tbh, I just put it there for clarification

Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/creating-event-behaviour-that-appears-1-time-per-map-with-eli-self-variables.178691/