How do you catch Jirachi without using a Masterball in Pokemon?

you buy 99 normal poke ballos and just keep trying to cath him