I am renaming your variables to make more sense with this method
In your Repel common event, do this:
Code:
Control Variables [0010: Required Steps] = Steps
Control Variables [0010: Required Steps] += 100
Control Switches [0042: Repel in Use] = ON
In your parallel process common event, do this (using whatever new variable you have available, if 11 is already taken):
Code:
Wait 5 Frames
Control Variables [0011: Steps Taken] = Steps
If Variable [0011: Steps Taken] >= Variable [0010: Required Steps]
... do some stuff
When [Yes]
Control Variables [0010: Required Steps] = Steps
Control Variables [0010: Required Steps] += 100
So when you use the repellent, you're setting the variable to be the current steps + 100, which is when the repellent will wear off. Then every 5 frames you're checking to see how many steps the player has taken, and when they reach that number, it wears off.
The wait is because you don't need to do this 60 times per second. A wait of 5 frames allows the player to move 12 steps per second, which is unlikely. It also prevents your common event from causing lag (a parallel process with no wait is one of the most common causes of lag in games).
Doing the + 100 at the beginning also prevents the additional calculation every frame, which just reduces the work needed to be done by the parallel process event by a tiny bit.