With a Masterball
Lilycove lottery
The MasterBall is located in Team Magma's base in Lilycove City.
Team Magma Hideout
use gamesharkDCEEEC34AFEADC26 masterball is pc
In team magma's base near lilycove city
after you beat the seventh gym, if you follow the gameplay, you'll get it
There is no way to buy any masterballs in any Pokemon version. However, you can have a Pokemon from another version trade over a masterball, and in ruby, sapphire, and emerald, you can get a second masterball at the lilycove dept. store lottery.
You get it from a guy at the top of a big building in the first town you get to
Assuming you already know where to get the masterball from the Lilycove Team Aqua (magma in ruby i think) Base, the only other place where you can get a masterball is by winning the grandprize in the lottery run by the Lilycove depatment store. Though I wouldn't hold my breath if I were you... its not likely you'll win the masterball :P
probably action replay but you can just buy a firered leafgreen sapphire or ruby and just save the masterball you get from them and give them to one of your Pokemon and migrate it
Each Pokemon game has one Masterball..