When I go to bed I put my pill bottle in one place. When I take the pill in the morning, I put it in a different place. I’ve considered buying one of those timer bottle caps. They fit generic pill bottles and have timer built into the top. You can look at the timer and see how long it’s been since you opened the bottle last.
Bring it! I once wrote a basic program off of the random dungeon generator tables in the original Advanced Dungeons and Dragons - Dungeon Masters Guide using Atari BASIC.