The Trainer escape glitch, also known as the Trainer-Fly glitch or Mew glitch (though the Mew glitch may refer to one specific type of the Trainer escape glitch that lets the player encounter Mew) is a glitch in Pokémon Red, Blue and Yellow (as well as the Japanese versions) that usually involves the player escaping from a 'long range Trainer'.
In Japan, it's referred to as fifth's method (Japanese: fifth法) named after "fifthヽ(´ー｀)ノ◆Fi3PJTZKLQ" who found it and posted about it on 2ch, or Special encounter glitch (Japanese: とくしゅエンカウント).
A long range Trainer is a Trainer that can be forced one tile off screen from either the first tile north/south or west/east of them and will walk up to the Trainer and challenge them to a battle when they appear.
The player doesn't actually have to use a long-range Trainer. Firstly, the Rival's effect caused by certain glitch items will allow the player to escape from more Trainer challenges.
Additionally, in Viridian Forest, if you get a wild Pokémon encounter on the tile that the last Bug Catcher sees you and black out, it will also cause the Trainer escape glitch (see the Viridian Forest method section).
Initial steps of the glitch
Before performing this glitch, you will need to have a long-range Trainer that you haven't beaten before, or a Trainer that can have a "!" mark over their head if you have an item that causes the Rival's effect, or to have not beaten the aforementioned Bug Catcher in Viridian Forest before (this is only possible near the beginning of the game).
Additionally, at least one available Trainer that walks up to you from a route other than the long-range Trainer is recommended to make this glitch desirable, but this is not needed if you have access to the Elite Four and can beat them (see the unlimited Trainer escape glitch section for more information).
Perhaps the most commonly used long-range Trainers are a Jr. Trainer♂ on Route 24 (north of Cerulean City) and a Gambler on Route 8 (left of Lavender Town/east of Saffron City). See the screenshots below:
You will need a Pokémon with Fly, Teleport, Dig, or an Escape Rope if it is possible to use it in the place where the Trainer is (an Escape Rope or Dig is essential for the Viridian Forest wild encounter method)
Once you've chosen a long range or one of the Trainers you can escape from using the RIVAL's effect, or decided to use the Viridian Forest wild encounter method, follow these steps:
Long-range Trainer method
- Make it so that the long-range Trainer is one tile off the screen, but you can walk back to them.
- While walking back to them, hold down the Start menu to open the menu and delay the Trainer from walking up to you until the menu is closed.
- Fly, Teleport, Dig, or Escape Rope away. Your destination to make this glitch desirable should be where a Trainer that walks up to you is within reasonable walking distance unless you want to pull off the Elite Four method of the unlimited Trainer escape glitch.
Rival's effect method
- Face away from the "!" mark Trainer and use the Rival's effect causing item, then close the menus. Your sprite and the Trainer's sprite should disappear.
- Move left/right or north/south so that you're in that Trainer's field of vision. If you can't, try another position or another Trainer.
- Do not move, then Fly, Teleport, Dig, or Escape Rope away. Your destination to make this glitch desirable should be where a Trainer that walks up to you is within reasonable walking distance.
Viridian Forest wild encounter method
This trick is only possible if you haven't beaten the final Bug Catcher in Viridian Forest and haven't beat Blue on Route 22 (west of Viridian City).
It is the only known way to get level 100 Pokémon before Brock in Pokémon Red and Blue without grinding for an extremely long time or skipping Brock (see the getting Pokémon at level 100 section), because a long-range Trainer in Virdian Forest is present in Pokémon Yellow but not in Pokémon Red and Blue.
- Have your black out location set to Viridian City or Pallet Town. If you need to, heal your Pokémon at the Pokémon Center/your house to set the black out location.
- Get your Pokémon poisoned by a Weedle, but have enough health to be able to get to the Trainer as shown in the picture below.
- Save the game a tile away south of him, and hope that you encounter a wild Pokémon in his field of vision. If you don't succeed, reset the game and try again.
After performing the steps above, the Special stat encounter or text box ID matching (described below) part of the glitch for when you return to Viridian Forest can be activated by either saving and restarting or winning against/losing to your rival on Route 22 (west of Virdian City).
Special stat encounter
The main use of the Trainer escape glitch is the Special stat encounter part of it. This trick can be performed after completing one of the Trainer escape methods above in the 'initial steps of the glitch' section and this may temporarily remove the ability to open the start menu.
After completing the method, encounter a Trainer and either win or lose to them. This will bring the ability to use the start menu back. This may be enough to get the Special stat encounter to work. When it works, upon returning to the route you escaped from the Trainer, a text box will pop up and after closing it you will encounter a Pokémon that had the Special stat of the last Pokémon in memory.
Its level depends on the attack stage of the opponent, which is 7 by default, but can be lowered through the use of Growl, by 1 stage at a time.
The attack stage can also be rose to 8 through the use of an X Attack or rose up to 9 through Swords Dance if you use have Ditto transform via the Ditto trick (described below). Once the Ditto transforms, it can also get boosted attack stages by using Swords Dance itself, up to 13 (+6), and the attack stage can still be lowered with Growls.
If the Special stat encounter doesn't work, make sure that the start menu is the last text box opened in memory before returning to the route and try encountering a wild Pokémon after encountering the Trainer.
All Trainer Pokémon yields
As Trainer Pokémon have minimum DVs and no stat experience by default, a certain Pokémon belonging to a Trainer will always load the same Special stat into memory.
See this image by wwwxxyy and Ryumaster for a full list of Trainer Pokémon yields. Note that it is extremely large.
The Mew trick or 'Mew glitch' is a specific variation of the Special stat encounter part of the Trainer escape glitch that allows you to fight and capture a level 7 Mew. In fact, because of this, Mew is often associated with the Trainer escape glitch.
1. The player must not have beaten any of these trainers who are circled in the picture.
2. Go in front of the Gambler shown in the picture. The player must approach him from in front of the house, then Fly quickly before the player is seen by him.
3. Fly to Cerulean City, then go and battle the Youngster in the maze to Bill's house (in the north). Make sure he walks up to the player, as if the player goes too close to him or directly talks to him, the game will lock up.
4. Fly to Lavender Town.
5. Walk back to the route to the left.
6. Press B when the menu pops up.
7. Mew will appear, at level 7.
The Ditto trick (also known 'Mew glitch method #4', even though Mew is not the only Pokémon that can be encountered with it) is one of the most useful glitches in the first generation of the main series Pokémon games, and it can be used to obtain non-freezing glitch Pokémon with index numbers greater than hex:00 but lower than hex:C8 (dec:200), because index numbers that are 200 or greater bring up Trainers (see the Encountering Trainers section for more information).
This glitch takes advantage of Ditto's Transform instead of requiring that specific Trainers be encountered.
For this glitch you'll need to prepare a Pokémon with the Special stat modulo 256 of the Pokémon or Trainer you want (see the Big List to see what special stats give which Pokémon or Trainers by choosing a decimal index number).
Modulo 256 means that the index numbers loop back to 0 after 255, so a Special stat of 257 would give Rhydon, the Pokémon with an index number of 01, and so forth.
You cannot use the glitch to encounter 'M (00) or 3TrainerPoké.
After following one of the methods in the above "initial steps of the glitch" method except for the Viridian Forest blackout method and then following most of the steps (returning to the route you flew away from is excluded for the moment) described in the "Special stat encounter" method, you should go encounter Ditto and have it transform into the Pokémon with your desired Special stat.
In Pokémon Red and Blue, Ditto can be found on the route east of Fuschia City and in the Unknown Dungeon, while in Yellow, Ditto can be found in the Pokemon Mansion on Cinnabar Island, or in the Unknown Dungeon.
After the Ditto transforms into your Pokémon with the desired Special stat, run away or defeat the Ditto. Then go back (this is easiest with Fly) to the place where you escaped from the Trainer, without encountering any Pokémon or Trainers on the way, and make sure that the start menu is the last text box in memory. The Pokémon that you encounter will have an index number that is the same as your Pokémon's Special stat, but Special stats modulo 256 between (inclusively) 200 and 255 will turn into Trainers.
As mentioned above, trying to encounter a Pokémon with an index number (Special stat modulo 256) greater than 199 will bring up a Trainer. See the Big List for possible Trainers, but note that the group of Trainers noted as causing the ZZAZZ glitch is not entirely accurate. See the ZZAZZ glitch article for Trainers that can cause the ZZAZZ glitch for a neutral attack stage.
The attack stage of the Ditto equates to the roster number of the Trainer you encounter. For example, if one wanted to encounter Prof. Oak's first roster, they would need the Ditto to transform into a Pokémon with a Special stat of 226 and then use Growl six times. To encounter his second roster, the player would have to use Growl five times, and so forth. Prof. Oak's fourth and beyond rosters are rosters from later Trainer classes, firstly, the Scientist.
If this value was too high, you'd encounter glitch teams, but this is impossible for this Trainer through the Ditto trick. It is possible to encounter glitch teams through the Ditto trick for Trainers like Agatha (Special 246) or Lance (Special 247) though, who are near the end of the Trainer classes and only have one valid roster each.
Getting Pokémon at level 100 with this trick
- Main article: Experience underflow glitch
The level of the Pokémon encountered through the Special stat encounter is equal to the Attack modifier (not the stat itself) of the last enemy Pokémon at the conclusion of the battle. Stat modifiers start at 7, hence why most Pokémon reported from the Trainer escape glitch are at level 7. The range of stat modifiers is from 1 to 13. In addition, Pokémon with a "Medium Slow" growth rate (Mew and all 3-stage evolutionary lines excluding Butterfree, Beedrill, and Dragonite), due to a bug in the algorithm (1.2L3 - 15L2 + 100L - 140) used to calculate these Pokémon's experience points, have negative experience at levels below 2 (-140 at level 0, -54 at level 1). However, since level values are read as unsigned (i.e. non-negative) integers, this actually equates to a rather large positive number (16,777,076 and 16,777,162, respectively). If this Pokémon gains enough experience in battle to stay below 1 (i.e. less than 54), the game will recalculate its level based on experience, forcing the Pokémon to level 100, the maximum level that can be attained in battle. A video of this is located here: 
- Main article: Remove Snorlax glitch
Removing Snorlax is a sub-glitch of the Trainer escape glitch that lets the player remove one of the two Snorlax without the Poké Flute, which can be pulled off by accessing the route that the Snorlax is on in the middle of the Special encounter glitch.
See the main article for more information.
Infinite Trainer escape glitch
If you lose to the Trainer you battle after flying away, that Trainer will not be used up, and neither will the the Trainer you flew away from, meaning that the glitch can be repeated an unlimited number of times as long as you have one spare Trainer that can walk up to you other than the Elite Four and Blue. It is a good idea to use only a low level Pokémon with Fly.
If you have no available Trainers that can walk up to you, the player can change boxes after flying away, reset the game, and then defeat the Elite Four and Blue. Then, the player can encounter the Ditto and get the Pokémon they want. Encountering no Pokémon after the player is sent back to Pallet Town will not let the player encounter any Pokémon; the start menu will pop up if it was the last message box, but no Pokémon will appear.
This method can be pulled off without any Trainer at all and on Routes without long-range Trainers (as soon as at least one Trainer is present on the map). It also doesn't require a Pokémon with Fly / Teleport / ...
- A stack of 255 items
- Access to Cerulean City
For the method on how to obtain a stack of 255 items, see this article.
WARNING : It is NOT recommended to have any items in your PC except two cheap items.
- Deposit the 255 items in your PC.
- Have your first PC slots as follows : Cheap item 1 x??, Cheap item 2 x??, Items x255.
- Toss / withdraw the first item [Number of items in your PC -2] times.
- Swap item slots 1 and 2 twice.
- Item 1's quantity should be 0.
- WARNING : from now onwards, do NOT mess up with items beyond the 50th, as you may corrupt your save file !
- Scroll to item number 100, which should be "j." x00 ("x." x00 in Yellow).
- Toss 255 of it to turn it into "j." x01 ("x." x01 in Yellow).
- Perform the glitch normally using the Mew / Ditto / text box matching method, and go north of Cerulean City to get the encounter (do not forget to flash the START menu).
Alternately, if the player tossed Master Ball x255 in the PC, swapping the resulting Master Ball x00 with the "j." x00 ("x." x00 in Yellow) will trigger the encounter on Route 8 instead of Route 24. Swapping Master Ball x01 will trigger encounters in both Routes (separately).
Text box ID matching
After performing the initial steps of the Trainer escape glitch and beating or losing to a Trainer that will walk up to you, the text box you get after returning to the route is the same ID as the last text box in memory (this can be viewed by checking the memory address CF13). For text boxes other than the start menu (00), you may get glitched text and/or error codes after returning to the route, and some of these bring up an undefeated Trainer or freeze the game.
If the equivalent text box brought up an undefeated Trainer, it may cause the walking lag glitch (see the article for steps).
Walking lag glitch
- Main article: Walking lag glitch
The walking lag glitch causes walking lag, with possible random sound effects being played or freezes (depending on your coordinates) when you return to the route you escaped from a Trainer (after following the finite or infinite Special stat encounter glitch).
It may be caused by text box matching dialog for an undefeated Trainer and defeating them, or the following method:
1. Perform the 'fly away' part of the Trainer escape glitch.
2. Change boxes and reset the game.
3. Return to the original route where the player flew away and defeat any Trainer.
Trade NPC Pokémon and resulting Pokémon
For some reason, when you talk to a trade NPC after enabling a potential Special stat encounter (so an instant encounter when you return to the route you escaped from), it will change the Pokémon you encounter to be no longer based on the Special stat, but rather, the identifiers of the fifth and sixth characters (including end name markers) of the trade Pokémon's nickname, but encountering a wild Pokémon or Trainer afterwards will 'overwrite' the Pokémon to be based on the enemy's Special stat again.
This trick does not work in the Japanese Pokémon Red/Green/Blue.
The player does not have to make a trade, and the glitch will work even if the trade has been done.
The fifth character controls the species, and the sixth character controls the level. It is possible to obtain certain Pokémon over level 100 this way. Below are the possible encounters.
- Route 2 - Abra for Mr. Mime (MARCEL): Level 139 Snorlax
- Route 5 - Nidoran♂ for Nidoran♀ (SPOT): Level 80 Missingno. (50h, Dec: 80)
- Route 11 - Nidorino for Nidorina (TERRY): Level 80 Starmie
- Route 18 - Slowbro for Lickitung (MARC): Level 80 Missingno. (50h, Dec: 80)
- Cerulean City - Poliwhirl for Jynx (LOLA): Level 80 Missingno. (50h, Dec: 80)
- Vermilion City - Spearow for Farfetch'd (DUX): Level 80 Missingno. (50h, Dec: 80)
- Cinnabar Island - Raichu for Electrode (DORIS): Level 80 Missingno. (92h, Dec: 146)
- Cinnabar Island - Venonat for Tangela (CRINKLES): Level 139 Kingler
- Cinnabar Island - Ponyta for Seel (SAILOR): Level 145 Clefable
- Route 2 - Clefairy for Mr. Mime (MILES): Level 80 Missingno. (92h, Dec: 146)
- Route 5 - Cubone for Machoke (RICKY): Level 80 Starmie
- Route 11 - Lickitung for Dugtrio (GURIO): Level 80 Clefable
- Route 18 - Tangela for Parasect (SPIKE): Level 80 Snorlax
- Cinnabar Lab - Golduck for Rhydon (BUFFY): Level 80 Starmie
- Cinnabar Lab - Growlithe for Dewdong (CEZANNE): Level 141 Electrode
- Cinnabar Lab - Kangaskhan for Muk (STICKY): Level 152 Kingler