From Bulbapedia, the community-driven Pokémon encyclopedia.
The Rare Candy Cheat is probably one of the most infamous glitches in the Generation I Pokémon games. It gives the trainer nearly unlimited Rare Candies (or whatever item is in the sixth slot of the bag).
It is a side effect of the Missingno. bug, where the amount of the sixth item in a player's bag, not necessarily a Rare Candy, is set to 127. By using all of these but one and repeating the bug, the player can have an infinite amount of that item.
As the trainer will often encounter Pokémon over level 100 that are hard to escape from while executing the Missingno. glitch, it could be a good idea to clone Poké Dolls.
Performing the glitch
- A Pokémon that knows Fly.
- A Pokémon that knows Surf.
- Party members level 50 or higher (varies)
- At least one of the item to be cloned (for the purposes of this explanation, we shall use a Rare Candy).
- At least five other items in the bag.
- Talk to the Old Man located North of Viridian City. Allow him to demonstrate how to catch a Pokémon.
- Once he is finished, immediately Fly to Cinnabar Island.
- Make sure that the Rare Candy is in the sixth slot of the bag.
- Surf up and down along the east coast of the island where the water is touching the land. Whether Missingno. can be encountered depends on the player's name; other Pokémon may appear instead. Continue Surfing along the coast until Missingno. appears (assuming that the player's entered name will cause a Missingno. encounter). Some names may not cause Missingno. to appear. If so, you will eventually find 'M and it will suffice.
- Defeat, run, or catch Missingno. or 'M.
After the battle, open the menu and view the items currently in the bag. If done correctly, the game should show "?8" or "?5" as the amount of Rare Candies in the bag (? being a glitch character).
The glitch can be done both with Rare Candies and with any other item. The most useful items to copy are arguably Master Balls, Nuggets, expensive items such as Full Restores and Revives, or unique TMs. Key items, such as the Bicycle, can also be duplicated; it is very difficult to get rid of duplicated key items. Even Fossils and Old Ambers can be duplicated, potentially allowing a player to revive limitless quantities of Kabuto/Omanyte and Aerodactyl, which would not be able to happen again until Generation IV.
Cause of the glitch
Every Pokémon has a "Pokédex byte" that tells the game whether it has been seen or caught. A value of 0 means the Pokémon hasn't been seen or caught, 128 means it's been seen, and 255 means it's been caught.
Missingno.'s Pokédex byte is in the same location as the byte that stores how many of the 6th item is in the bag. This is why, when Missingno. is encountered, the sixth item slot is set to 128 (or 255 if it is captured). The glitchy box symbol is a result of the game attempting to display a number greater than 99.