MZ Advanced Random Dialogues / Better Random Variables Plugin (MZ)

Something we all hate in a game is when NPCs keep telling us the same quote over and over again so, in order to fix this issue, we can simply use variables to have a randomness factor in our dialogues but, at the same time, nothing stops the random number to be the same for ten times in a row.
What I am asking here is if there's any plugin that prevents variables from being given the same value for a set number of times.
For example :

Quote #5 is used;
For the following eight (just as an example here) interactions, prevents quote #5 from being used;

A plugin that allows to achieve this would benefit so many games that you can't even count them all.
Just for the context, my game has a "tollerance" mechanic for a character, with ten different levels and 31 quotes for each level.
They are a lot, but nothing prevents MZ from giving me the same one over and over again XD (in testing it's happening so many times...).
Another moment where this factor would be of great help are battle dialogues, where characters may say the same thing over and over again :/
create a variable array or make an array with numbers 1-10,
than remove the random number after shuffle, and it repeat 1x.
once the array is empty, refill it again, so it only repeats 1x every 10x.

that is maybe the best approach, there are scriptcalls how to do it,
but while they are asked for MV, I'm pretty sure it works in MZ as well
as they are mostly equal.
create a variable array or make an array with numbers 1-10,
than remove the random number after shuffle, and it repeat 1x.
once the array is empty, refill it again, so it only repeats 1x every 10x.

that is maybe the best approach, there are scriptcalls how to do it,
but while they are asked for MV, I'm pretty sure it works in MZ as well
as they are mostly equal.
Me stupid, how do i do it?
Here's one way:
If you want to draw without replacement, you can use Array#splice to remove selected entries from the array so they aren't there next time, e.g. (source):
Spoiler: event example + script call
◆If:Script:!$gameVariables.value(1).length ◆Comment:No scenes remaining in list, or not initialised yet. ◆Control Variables:#0001 Blessings/Curses = [1,2,3,4,5] ◆ :End ◆Comment:Take a random number from the array and store in variable 2. ◆Script:var scList = $gameVariables.value(1); : :var r = Math.randomInt(scList.length); : :var scId = scList.splice(r, 1)[0]; : :$gameVariables.setValue(2, scId); ◆Text:None, Window, Bottom : :Selected scene \v[2]!
JavaScript:
var scList = $gameVariables.value(1);
var r = Math.randomInt(scList.length);
var scId = scList.splice(r, 1)[0];
$gameVariables.setValue(2, scId);
Technical details:
There's also a tutorial over here, which covers various approaches:
Here's one way:

There's also a tutorial over here, which covers various approaches:
Thank you! Will try it when back home from university

Original thread: https://forums.rpgmakerweb.com/threads/advanced-random-dialogues-better-random-variables-plugin-mz.162049/