Random events.

So I had the idea of adding random events to my game.

Would this method work?

A variable changes to a random value between 1 and 100 every in-game hour (orange time system defined) via a common event.

Then i place events that auto run on entry to a map if the variable value matches and after running use a self switch to disable themselves.

Is this a good solution and how can I make a random number generator?
the control variable command contains the RM's random functions
the control variable command contains the RM's random functions

Thank you

Original thread: https://forums.rpgmakerweb.com/threads/random-events.78647/