I was using this code in some Pokemons and end with random Moves on same Pokemon or Relearn Moves with legal problems
.OT_Friendship=255
.Move1_PPUps=3
.Move2_PPUps=3
.Move3_PPUps=3
.Move4_PPUps=3
.IV_HP=31
.IV_ATK=31
.IV_DEF=31
.IV_SPA=31
.IV_SPD=31
.IV_SPE=31
.PKRS_Strain=1
.PKRS_Days=3
.Moves=$suggest
.RelearnMoves=$suggest
.EncryptionConstant=$rand
.PID=$rand