If you have any problems with previous "Befriend Yo-kai without fail" code, try this:
00622E34 E1A00000
This should have less side effects.
And if you'd like to choose a Yo-kai to befriend, this might help:
00622E14 E1A00000
00622E24 E3A00000
00622E28 E1A00000
This code boosts effects of foods...