Controlled randomization of an event part

This time I have a math thingy 🙂

I want a part of an event to occur randomly, but the chance of it occuring needs to increase with every "draw".

So when the player participates in an event for the first time, his chance at winning is 0%
2nd time - 10%
3rd time - 20%
and so on, until it reaches 100%

And once the player wins, the chance drops to 0% again.

Ideas?
Use a variable to keep track of how many times they have played the game, and have the chance to win be Number of times played * 10%. Then, once they win, reset the variable to 0.

Probably could be done as follows:

Chance to win = Variable value * 10. (store in a new variable this value).
Random = a number from 1 - 100 (store in a new variable, I just call it random)
If Random >= chance to win
You win, give prize and reset the variable to 0.
else
you lose, add one to the variable keeping track of the times you've played the game.
Thanks to you I knew where to start, with the multiple variables. However, I ended up with a bit different approach:

Variable 1 = times played
Variable 2 = random between 0 and 10
Variable 2 = Variable 2 + Variable 1
If Variable 2 =< 10
lose and Variable 1 = Variable 1 + 1
Else
win and Variable 1 = 0

Works like a charm 🙂

Original thread: https://forums.rpgmakerweb.com/threads/controlled-randomization-of-an-event-part.84277/