Mew glitch

The Mew glitch (also known as Long-range Trainer glitch) is a glitch found in all of the Generation I core series games. It was first reported in 2002.JesseWorld - Bottom of page. Cheat posted on May 31, 2002 It is an extension of the Trainer-Fly glitch to specifically catch (hence its common name). Outside of Mew, this glitch famously allows players to easily catch any other Pokémon in the game and is the easiest way to catch many unique glitch Pokémon.
All of these methods work on the 3DS Virtual Console; however, any Mew obtained with the Mew glitch in all likelihood cannot be transported with Poké Transporter. This can, however, be bypassed through the use of arbitrary code execution, by changing Mew's OT to match that of the distributed Mew.How to trick Pokebank into thinking your Gen 1 Mew is the "legit" one from the event via arbitrary code execution with 8F. - reddit Another method to bypassing this check is to name the player "GF", and receive the trainer ID 22796 through luck, patience, RNG manipulationHow to Get A LEGIT Shiny Mew in Pokemon Sun and Moon! The Rarest Shiny Ever!? - YouTube or arbitrary code execution.Pokemon VC Red/Blue (UE) - Pokemon Bank compatible Mew & shiny Pokemon (8F arbitrary code execution)
==Explanation==
===Trainer-Fly glitch===
The Mew glitch works by exploiting a separate glitch called the Trainer-Fly glitch. The Trainer-Fly glitch is caused by encountering a Trainer that can battle the player at any point in the Trainer's line of sight and escape from them. These Trainers are nicknamed "Long-Range Trainers" due to the long distance that they can spot the player being defined as the maximum allowed by the game and will spot the player the moment that they appear on screen in the Trainer's line of sight. When the game draws any NPC on the screen, that NPC is first placed in their default direction (south) for one frame, before being updated to face their correct direction. For Long-Range Trainers, this causes their line of sight to point south for the first frame, before correcting to their intended direction. For that first frame, the player can still bring up the start menu and use any Field move or items from their bag. If the player uses or a similar move or item, then the player will be spotted by the Long-Range Trainer before the player flies away from them. This causes the game to believe that the player is starting a battle when they are not, causing various values to be read improperly and creating the core of the glitch. Specifically, the map script of the route the player left is set to a value where the game is constantly trying to display pre-battle text and start a battle.
The player must then battle a Trainer (not just a wild Pokémon, as this does not properly reset the values set upon flying away from the trainer to ones that do not cause issues) in between the escape and the final encounter, otherwise no encounter will appear. This is because the game requires the value that contains the ID of the enemy trainer in the overworld or the unmodified special stat of the enemy Pokémon to not be 0 if it is to start a battle, and at this point the game is in a state where the start menu is disabled and the A and B buttons only work for using the PC, making it impossible to talk to anyone or use moves outside of battle. Additionally, this Trainer must walk up to the player (have at least 1 tile in between the player and trainer); they cannot be talked to directly or walked immediately in front of to initiate the battle, or the game will . This is because the game is in a state where it is waiting for the trainer that is currently being engaged to finish moving so it can display their text and start the battle. If there is no space for the sprite to walk up to, then the game gets stuck in a loop that prevents the battle from occurring and the player from regaining control.
Afterward, the player will regain full control and be able to access the menu at will. Should the player return to the same location or floor as the Long-Range Trainer, the game will display the pre-battle text and start the battle. This pre-battle text is text using the textbox ID of the most recently seen textbox, which if doing a textbook Mew glitch is the start menu seen when the player goes to Fly to Lavender Town to go back to Route 8, resulting in the Start menu popping up on its own; this is good, as the Start menu is always safe to have pop up this way. After closing the menu, the game will immediately start a battle due to the game being in a state where it is constantly attempting to display enemy trainer text and start a battle, and ends up generating a battle with a wild Pokémon based on the Special stat of the Pokémon last battled and at a level based on the attack stage modifier of the Pokémon last battled. Note that if the Special stat of the Pokémon last battled happened to be between 200 and 255, the player will instead encounter an enemy trainer, as trainer IDs are stored on the same table as Pokémon IDs. This trainer will have a roster based on the attack stage modifier of the Pokémon last battled. Avoid fighting Pokémon with a Special stat of over 248 without a lookup table of trainer IDs to avoid fighting ZZAZZ glitch trainers, as they corrupt the game.
For the Mew Glitch, the reason why Mew specifically appears at the end is based on the relationship between its index number, which is 21, and the stat of the Pokémon last battled. In both of the above cases, the Youngster's level 17 Slowpoke and the Swimmer's level 16 , the last Pokémon in their respective parties, have a Special stat of 21. 
Any method of 'escape' from the Long-Range Trainer may be used, including and both and the Escape Rope if the Trainer is in a cave area.
==Methods==
===Method #1===
The first documented and most commonly known method to perform the Mew glitch involves the on , who is facing north towards the entrance, and the on who is facing north and has a on his team. The player must have defeated neither Trainer before and must also have a Pokémon who can use on their team.
The player must stand directly beneath the Underground Path entrance door, at which point the Gambler as mentioned earlier will be exactly one tile offscreen. It is recommended that the player save the game at this point in case a mistake occurs in a future step. The player then can begin the glitch by taking one step down, and then pressing and holding the Start button while the step is occurring. The Gambler will be scrolled onto the screen during this process and the player will enter his line of sight, but the start menu should appear before the Gambler "sees" the player.
From the start menu, the player must Fly away (with the most convenient location being Cerulean City). If the previous steps have been performed correctly, the Gambler will have the indicative exclamation mark appear above his head, but then the Fly animation will begin before he can walk up and challenge the player.
After landing in Cerulean City, the Start, A, and B buttons will not function properly, as the game believes that the player is about to be in a battle. From here, the player should walk to Route 25 and battle the aforementioned Youngster. Importantly, the Youngster must walk up to the player (must have at least 1 tile between the player and the Youngster when the player is spotted) to initiate the battle, or else the game will .
After battling the Youngster, the previously disabled buttons will now work again. The player must now return to Route 8 (with the most convenient method being Flying to Lavender Town and heading west), opening the start menu at least once along the way (Flying works). Upon entering the Route, the start menu will appear by itself; closing the menu will immediately begin a battle with a wild Level 7 Mew.
If the game is saved and reset during the glitch, or if any battle occurs between fighting the Youngster and encountering the Mew, the player must battle a Pokémon with a Special stat of 21 again for the glitch to work. If the player does anything that causes a non-start-menu textbox to appear onscreen (excluding anything in the start menu itself) or saves and resets the game, the player must open the start menu before entering route 8 to load its textbox ID (0) into memory. If the player returns to Route 8 after Flying but before battling, then the glitch will not work and the game must be reset to before Flying from the Gambler.
===Method #2===
This alternate method is sometimes known as the Quick Mew glitch, as it allows the player to obtain Mew at the earliest possible point in the game.
It is very similar to Method #1, except that the on west of Nugget Bridge should be used in place of the Route 8 Gambler, and the first in Cerulean Gym used in place of the Route 25 Youngster. As Fly is not available at this point in the game, the player must catch an and use its in place of Fly.
At the end of the glitch, the player should return to Route 24 rather than Route 8, as that is the area where the glitch began.
===Earlier Yellow method===
In , the player can first catch Mew before the Quick Mew glitch, using the exclusive Long-Range Trainer in Viridian Forest and the in Mt. Moon B2F.
Preparation:
# First, the player should skip fighting the second to last Bug Catcher in Viridan Forest.
# Next, the player should clear their way through Pewter City, , , and Mt. Moon stopping before the Super Nerd with the two fossils on Mt. Moon B2F. While doing this, the player should skip one Trainer on the way that can take at least one step to initiate battle.
# Next, the player should ensure they have 2 Escape Ropes. They can be purchased from the Pewter City Poké Mart. An Escape Rope can also be found on Mt. Moon 1F in the east area of the floor.
# Next, the player should go the Pokémon Center to save their location for the Escape Rope.
# Next, the player should configure their party. If the player's goal is to catch a Level 1 Mew, they should bring a Pokémon that knows and leave one spot open to prevent their game from locking up when attempting to remove Mew from the PC. The player should also build their team keeping in mind the trainer they skipped and the Super Nerd's rosters. The Super Nerd has a Level 12 , and . Finally, the player may want to bring a with or with and a lower level Pokémon to whittle down Mew's health to increase their chances of catching it. An example team could be with its speed to escape wild Pokémon, with Sleep Powder for Mew and to battle Grimer, to battle Voltorb, for Growl and its immunity against from Koffing's and a Level 6 to lower Mew's health.
Steps:
# First, the player should use the Trainer-Fly glitch and an Escape Rope to escape from the Bug Catcher Long-Range Trainer in Viridian Forest. At this point, the start menu is disabled. In addition, the player should skip going into the Route 4 Pokémon Center, so their location is not saved for the next Escape Rope.
# Next, the player should battle the trainer they skipped making sure to initiate combat, so the trainer has to walk at least 1 step to reach them. At this point, the start menu is re-enabled.
# Next, the player should go one step below the Super Nerd and open and close the start menu out of an abundance of caution.
# Next, the player should battle the Super Nerd, fainting their Grimer and Voltorb.
# Next, the player should battle the Super Nerd's Koffing which has a Special stat of 21 for Mew. Optionally with their Pokémon that knows Growl, the player can lower its attack to get a Mew lower than level 7.
# Once the Koffing has fainted and the battle has ended, the player, without moving, should use their Escape Rope to return to Pewter City. If any Pokémon battle is triggered after Koffing, the glitch will result in a Pokémon other than Mew.
# Finally, the player should head south to Viridian Forest avoiding the grass on . Once the player enters Viridian Forest, the start menu opens automatically. After the player closes the start menu, a wild Mew will attack.
Repercussions:
Once the player has battled the Mew, a missable object is removed from the map. For example, the Cerulean Cave guard or the officer outside the robbed house in Cerulean City is removed when using the Quick Mew glitch. In this version of the glitch, the Helix Fossil near the Super Nerd is removed leaving only the Dome Fossil. When the player selects the Dome Fossil, the Super Nerd will mime choosing the Helix Fossil like it is still there with no negative consequences. The player however will be completely unable to choose the Helix Fossil even if they try selecting where it should be. This point can also be walked past to skip fossil selection altogether and the game will continue on as normal.
For more information on the removal of missable objects, see the or TheZZAZZGlitch's post in this thread on Glitch City Archives.
===Other methods===
It is not required to use the or to escape from, and instead the player can use any long-range trainer to trigger the glitch, using any type of warping field move such as or . For the player to obtain Mew they need to fight a Pokémon with a special stat of 21 (the easiest way is to fight the on or the in Cerulean Gym, if the player hasn't previously fought either), then return to the route with the long-range trainer without fighting another Pokémon.
==Extensions==
The mechanics of the Mew glitch are rife with possibilities, making it one of the most useful glitches in the game.
===Extended Mew glitch===
As the Pokémon that appears from the glitch is based on the Special stat of the Pokémon last battled, the player can easily manipulate which species appears by battling a different Trainer, or even by encountering wild Pokémon after the escape and Trainer battle but before the encounter. For example, the at the top of the first floor of Mt. Moon has a level 11 with a Special stat of 22 last in her party, and so battling her last in the glitch will result in encountering a level 7 , whose index number is 22.
Each NPC-owned Pokémon has fixed DVs of 9 Attack, 8 Defense, 8 Speed, and 8 Special, and has no stat experience. The Special stat would then only depend on the Pokémon's species and level, therefore each time the player does the necessary steps for this glitch, the species will be the same. It can be calculated from a simplified stat formula:
Special = \left\lfloor {(Base + 8) \times 2 \times Level \over 100} \right\rfloor + 5 = \left\lfloor {(Base + 8) \times Level \over 50} \right\rfloor + 5
 do not affect the Pokémon encountered; only its level can be affected.
===Ditto glitch===
The easiest way to manipulate the last encountered Special stat when performing the glitch is to first obtain it on the player's own Pokémon, and battle a wild . Send out the Pokémon with the desired Special stat on itself, and wait for the wild Ditto to use . As the move Transform copies all of the target's stats, the Ditto will take on the Special stat of the Pokémon sent out. After defeating it or running away, proceed as normal, being sure to not battle any other Pokémon before the end of the glitch. The player must be sure not to catch it, because if the Ditto is captured, the result will be based on Ditto's Special instead. 
The Special stat on the player's own Pokémon can be caused either by natural leveling or by .
In , as wild Ditto can only be found in the basement of or Cerulean Cave, it is highly recommended to bring an Escape Rope or a Pokémon that knows Dig, to leave the Mansion immediately after battling the Ditto. If the player attempts to walk out of the Mansion and encounters another wild Pokémon on the first floor, its Special stat will overwrite that of the Ditto and cause a different Pokémon than the one desired to be encountered.
As it is easily possible for one's Special stat to exceed 190, the highest index number of a valid Pokémon, the Ditto glitch allows easy access to several glitch Pokémon for Special stats of 191 or higher. For example, in Red/Blue, a Special stat of 198 will lead to battling a ゥL ゥM 4. If the Special stat is between 200 and 255, the player will instead battle a glitch Trainer instead of a wild Pokémon. It is even possible to battle Professor Oak in this way. The Special stats 248, 251, 252, 254 or 255 (and sometimes 200 if Growl is used once or twice), plus 249, 250 and 253 in Pokémon Yellow, correspond to invalid and may lead to the memory-corrupting ZZAZZ glitch depending on the level/roster value (which defaults to 7; see level and roster manipulation). As the ZZAZZ glitch can be hazardous to the save file (specifically, overwriting a large portion of memory with hex 99, resulting in a heavily corrupted file that most likely cannot be saved), performing the Ditto glitch with these Special stats should be avoided.
Special stats of 256 or higher will wrap around to 0 and continue from there, as index numbers are limited to one byte. For example, a Special stat of 300 will yield exactly the same effects as a Special stat of 44. This is the only way to use the Ditto glitch to encounter Pokémon whose index values are less than 5 (as Special stats cannot normally go lower than that).
====List of encounter values====
:See also: List of Pokémon by index number in Generation I 
Glitch Trainers are in bold.
{| border=1 width="100%" align="center" class="sortable expandable" style="background: #FFF; border:1px solid #; border-collapse:collapse;"	
Pokémon 	stat
 	1
 	2
 	3
 	4
 	5
 	6
 	7
 	8
 	9
 	10
 	11
 	12
 	13
 	14
 	15
 	16
 	17
 	18
 	19
 	20
 	21
 	22
 	23
 	24
 	25
 	26
 	27
 	28
 	29
 	30
MissingNo. 	31
MissingNo. 	32
 	33
 	34
 	35
 	36
 	37
 	38
 	39
 	40
 	41
 	42
 	43
 	44
 	45
 	46
 	47
 	48
 	49
MissingNo. 	50
 	51
MissingNo. 	52
 	53
 	54
 	55
MissingNo. 	56
 	57
 	58
 	59
 	60
MissingNo. 	61
MissingNo. 	62
MissingNo. 	63
 	64
 	65
 	66
MissingNo. 	67
MissingNo. 	68
MissingNo. 	69
 	70
 	71
 	72
 	73
 	74
 	75
 	76
 	77
 	78
MissingNo. 	79
MissingNo. 	80
MissingNo. 	81
 	82
 	83
 	84
 	85
MissingNo. 	86
MissingNo. 	87
 	88
 	89
 	90
 	91
 	92
 	93
MissingNo. 	94
MissingNo. 	95
 	96
 	97
 	98
 	99
 	100
 	101
 	102
 	103
 	104
 	105
 	106
 	107
 	108
 	109
 	110
 	111
 	112
 	113
 	114
MissingNo. 	115
 	116
 	117
 	118
 	119
 	120
MissingNo. 	121
MissingNo. 	122
 	123
 	124
 	125
 	126
MissingNo. 	127
 	128
 	129
 	130
 	131
 	132
 	133
MissingNo. 	134
MissingNo. 	135
 	136
MissingNo. 	137
 	138
 	139
MissingNo. 	140
 	141
 	142
 	143
 	144
 	145
MissingNo. 	146
 	147
 	148
 	149
 	150
 	151
 	152
 	153
 	154
 	155
MissingNo. 	156
 	157
 	158
MissingNo. 	159
MissingNo. 	160
MissingNo. 	161
MissingNo. 	162
 	163
 	164
 	165
 	166
 	167
 	168
 	169
 	170
 	171
MissingNo. 	172
 	173
MissingNo. 	174
MissingNo. 	175
 	176
 	177
 	178
 	179
 	180
MissingNo. 	181
MissingNo. (Kabutops Fossil form) 	182
MissingNo. (Aerodactyl Fossil form)	183
MissingNo. (Ghost form) 	184
 	185
 	186
 	187
 	188
 	189
 	190
▶ A/4 4 	191
a/4 4Hy 	192
ゥ (C1)/♀ . 	193
ゥ .4/p p’ ’ 	194
h POKé/ゥ ( Z4 	195
PokéWTrainer/X ゥ- xゥ, 	196
(C5)/4. . 	197
ゥL ゥM 4/7g 	198
♀Pゥ ゥゥT/u 	199
 	200
 	201
 	202
 	203
 	204
 	205
 	206
 	207
 	208
 	209
 	210
 	211
 	212
 	213
 	214
 	215
 	216
 	217
 	218
 	219
 	220
 	221
 	222
 	223
 	224
 	225
Prof. Oak 	226
 	227
 	228
Giovanni 	229
 	230
 	231
 	232
Bruno 	233
Brock 	234
Misty 	235
Lt. Surge 	236
Erika 	237
Koga 	238
Blaine 	239
Sabrina 	240
 	241
 	242
 	243
Lorelei 	244
 	245
Agatha 	246
Lance 	247
===Level and roster manipulation===
A Pokémon encountered at the end of the Mew glitch most commonly appears at level 7. The reason for this is because, just as the previous Pokémon's Special stat corresponds to the index number of the encountered Pokémon, the previous Pokémon's attack stage modifier corresponds to the level of the encountered Pokémon. This attack stage is often expressed as ranging from -6 to +6, but is actually stored internally as a number ranging from 1 to 13, with 7 being the default. Therefore, if the player uses a move like once on the previous Pokémon, the encountered Pokémon will appear at level 6.Glitch City Research Institute's page about the Ditto glitch
Using Growl six times to minimize the attack stage modifier will result in encountering a level 1 Pokémon, which cannot normally be found and can lead to the experience underflow glitch. Conversely, or can raise the level of the Pokémon that will be encountered. However, if the previous Pokémon was a wild Pokémon that is caught, then the stage modifier will be reset to 0, leaving the encountered Pokémon to appear at level 7.
If the Ditto glitch is used and a glitch Trainer is encountered, the team that the uses corresponds to the attack stage modifier. This usually results in the game attempting to load the 7th possible party of that Trainer, which may not exist (for example, Trainer classes such as Brock, Misty, and Lance have only one valid party). If a Trainer with invalid party data is battled, the Trainer's team will likely contain glitch Pokémon. However, if the attack stage modifier is first lowered to 1, then the game will attempt to load a valid 1st party. Roster manipulation is most notable in the case of battling Professor Oak, who has three valid parties (corresponding to each of the first partner Pokémon) and so an attack stage modifier from 1 to 3 will allow the player to battle one of his otherwise inaccessible valid teams. When the game does load an 'out of bounds' roster, the game will take a team from the subsequent Trainer class or classes by index number, if one exists; for example, Bruno (233)'s roster #2 will be the same as Brock (234)'s roster #1, and Bruno (233)'s roster #7 will be the same as Blaine (239)'s roster #1 (as all Trainer classes from 233 to 239 contain only one valid party).
===Sub-Glitches===
====Snorlax skip glitch====
Several areas in the game contain 'removable objects', or a list of sprites that can be permanently deleted from the area. This list includes all item balls, various NPCs such as the Team Rocket Grunts that block buildings in Saffron City, and, importantly, any one-time stationary wild Pokémon, such as the legendary birds. Whenever a player enters an area, if the area contains any removable objects, then the game will load the list from that area into memory.
Whenever the player encounters a wild Pokémon, the game checks to see if it was generated from a random encounter table. If it was not, then the game assumes that the player must be battling a one-time stationary encounter. When making this assumption, the game will automatically delete a stationary sprite from the list of removable objects for the area, to prevent the player from encountering the one-time Pokémon again.
The key is that a wild Pokémon encountered through the Mew glitch has not been generated from a random encounter table, and thus the game will assume that the player is battling a stationary encounter and attempt to delete a sprite. However, if the player is currently not in an area that contains any removable objects, the game will simply use whatever list is currently in memory - namely, the list from the most recent area the player was in that contained removable objects. This behavior can be used to bypass various obstacles in the game, most notably allowing the player to remove the on and thus skipping not only the Pokémon Tower in Lavender Town (as the player no longer has to pick up the Poké Flute), but also the entirety of , , and Rock Tunnel, as well as postponing the Cerulean Gym and the S.S. Anne until the end of the game (as the player no longer needs to get access to Route 9).
To perform the above particular Snorlax skip glitch (assuming the goal is to complete the game as fast as possible), the player must first enter Route 12 (from the side), to load its removable objects list into memory including Snorlax. The player must then head through Vermilion City and perform the Trainer-Fly glitch from a long-range Trainer on either or Route 11, escaping back to Vermilion City. The player can complete the Trainer-Fly glitch by battling any Trainer on Route 6 or 11 (whichever the long-range Trainer is not on) and returning to the other route to trigger the Special encounter. Upon battling whatever wild Pokémon was generated on Route 6, the game will attempt to delete a sprite from the removable objects list currently in memory. As Route 11, Vermilion City, and Route 6 are all free of removable objects, the list currently in memory will be that of Route 12, and the Snorlax will disappear after the battle ends.
When performing the Mew glitch in general, care must be taken to avoid accidentally deleting an undesired sprite. If the list of removable objects in memory at the time of the Special encounter does not properly contain a stationary Pokémon encounter sprite as expected, the game may end up deleting item balls if the player has not picked them up already or other desirable objects, like NPCs that are needed to progress.
====Mew glitch without a long-range Trainer====
If there is tall grass in the tile immediately in front of a Trainer's line of sight, or a Trainer is in a cave, then the 'Trainer-Fly' effect can be initiated even if that Trainer is not a long-range Trainer. This can only occur if the player is lucky enough to generate a (natural) wild encounter on the exact tile immediately in front of the Trainer. If the player then blacks out from this wild battle, they will be warped back to the Pokémon Center as normal, but the Trainer will see the player before they warp back (the "!" is visible very briefly during the blackout animation).
A number of glitch items enable the player to move around on the map without being seen by Trainers; if the glitch item's effect is disabled while in front of a Trainer, then a Trainer-Fly effect can begin.
====Text box errors and variations====
This can be also one of the side-effects of the Mew glitch. If the player causes a text box to pop up before returning to the area where the long-range Trainer was escaped from, such as by talking to an NPC or reading a sign, then something other than the start menu will pop up at the end of the glitch, due to having a textbox ID other than 0 saved into memory. This is typically dialogue from Trainers on the route, which may be followed by a wild Pokémon battle, after which the player will no longer be able to move. Alternately, the text may be from interacting with a sign or an item; in the latter case, the item will appear in the player's inventory and disappear from the route as if they had picked it up normally. This may also allow the player to obtain items that are not currently on the route. Finally, instead of a visible text box, the player may trigger other glitches, such as glitch songs or 0 ERROR. Glitch songs are caused by invalid glitch textboxes that contain text script sound commands, and 0 Error is caused by any text box whose text script initiates a trainer battle, as it overrides the battle spawned by the Mew glitch and increments the map script to an invalid state.
====No Trainers remaining====
=====One long-range Trainer remaining=====
As the method written above requires the player to battle another Trainer (in a different area) after escaping from the long-range Trainer, this can cause problems if all possible Trainers have been defeated. The Elite Four can be rebattled indefinitely, but as the A button to talk to characters remains nonfunctional until a Trainer has been defeated, it is not possible to challenge them directly. Nor can the player directly save the game as the start menu cannot be opened.
To remedy this, after escaping the long-range Trainer, the player must visit a PC and save the game indirectly by switching boxes. (The A and B buttons remain functional for the PC.) After saving, the player must reset the game. This makes the Start, A, and B buttons functional again-the game no longer thinks the player is about to battle a trainer, although it is still waiting for an NPC to finish moving.
At this point, several methods can be used to complete the glitch:
* As implied above, the player can now defeat the entire Elite Four and . Professor Oak walks at the end of this.
* As the above method is tedious, a much simpler alternate method is to simply go to Pewter City and talk to the NPC who brings the player to the Museum (the player must choose No to his question, so he will walk the player there). When he is done moving, the game is done waiting. However, the player must encounter a Pokémon after this to get an actual Special stat loaded into memory. The Start menu must also be flashed after this, to prevent a possible text box error (see above).
* As the Museum person is vulnerable to the Snorlax skip glitch side effect (see above), the above method may fail to work after being used once. An even simpler alternate method is to simply push any Strength boulder, which will count as an NPC moving because apparently, Strength boulders are NPCs. (No other HMs behave this way as none of them move sprites or objects.)
Note that as long as the player has at least one undefeated Trainer in a different area than the long-range Trainer, they can avoid having to do any of the above indefinitely, as all that is needed is for an NPC to finish a movement script that disables player input for the duration of the script and for a Special stat to be loaded into memory. It is not necessary to defeat another Trainer after escaping, only battle one, so a player can deliberately lose to a Trainer and continue with the glitch, and that Trainer will remain battleable. However, if the player loses to that Trainer and then goes back to the area of the long-range Trainer and battles a Pokémon with this glitch, the long-range Trainer will no longer be battleable.
=====No Trainers to escape from at all=====
Using the "dry" variation of the item underflow glitch, which does not require an event that takes an item from the player's item pack (it is not required to have a Fossil or have the Saffron guards be thirsty), the player can obtain a stored PC item counter of 255.
This glitch (requiring a ×255 item slot) can be set up without any long-range Trainers thanks to MissingNo./'M (00) and the old man glitch in Red and Blue, or Yellow MissingNo. and the - (move) corruption effect in Pokémon Yellow. When the quantity of an item has been increased by 128, it can be tossed or used up until 127 items remain and the duplication of the sixth item can be repeated to obtain 255 items.
The only known way to obtain the "-" move as the first move in Pokémon Yellow without a long-range Trainer needed is through trading. For example, the player can trade over a Ditto that had its first and second moves swapped while under Transform from Pokémon Red and Blue.
The item and quantities beyond slot 50 represent unrelated variables in the games, such as the events in certain maps. For maps with Trainers, a value of 01 essentially means that the player has set up a 'Special stat encounter' on that route.
For example; one item, item 100 represents the data for two such maps. The item in item 100 controls whether the player has a Special stat encounter on . The quantity in item 100 controls whether the player has a Special stat encounter on . If the player has not set up the Mew glitch on any of these routes, then these values will not be 01 (presumably 00).
However, the values can easily be manipulated. For example, if the quantity of PC item 100 is 0 (essentially 256), the player can toss 255 to change the quantity to ×1 and set up a Special stat encounter in Route 24.
It is still required for the player to encounter a wild Pokémon to get the Special stat encounter they want. As usual, a wild can be used to Transform into a Pokémon with the relevant Special stat and store it in memory.
==External links==
* Yellow Version
==References==
==In other languages==
Language	Name 	Translation 	Origin
Japanese	ｆｉｆｔｈ法 	"fifth method" 	Named after user ｆｉｆｔｈヽ(´ー｀)ノ◆Ｆｉ３ＰＪＴＺＫＬＱ who posted about it on 2ch. (source)
Japanese	とくしゅエンカウント 	"Special encounter"	Named after the fact the last Special in memory determines the encounter. (source) Less common than 「ｆｉｆｔｈ法」.
==Related articles==
Category:Glitches
de:Mew-Glitch
fr:Bug du Croupier
it:Glitch di Mew
zh:夢幻（漏洞）