Flag Guy

I need help on getting flags because I do not how to get flags

Did you buy your secret base in Metchi Town?

Did you create a user for trading pokemon in your Dexnav?

In your secret base (I assume you have one since you know the flag guy) go into your friend safari, then beyond that, in the upper border, there’s a cave. Go in the cave. Here you have to login with your trading username (register one if you don’t have it) and then you’re free to go in any base, either a random one or a specific one if you know the trading name of the user.
Inside other bases, you must find the friend safari and where there should be the cave to reach other bases, there’s the flag.

Hopefully this is clear (•̀ᴗ•́)و ̑̑