I gave him the link to a routine for making new items, and that's exactly what it does.
Idk if you're hacking Ruby or Emerald, but what I do with that item is:
I create a repel with a script that simply sets the repel variable to the amount of steps it needs, so like, if it's repel, I make the var = 100, super repel = 200, etc. (AND, most importantly, set a new var and make it 1 if they use a repel, 2 if they use a super repel, and 3 if they use a max. you'll see why) Then when it reaches 0, the rom does the repel wore off script, and if you change that script, you can check which the player last used, by checking that var, checking if they have any more, then if they do ask if you want to use another one of the same kind. Hope that explains it, and if not, I'd be glad to explain it in Spanish.
Btw, it's doubt haha :)