One Character Command Chain

Hi, im trying to solve a rather small but puzzling problem.

The actor 1 has a sequence of inputs in every turn. Each turn he uses: Item -> Magic -> Skill (Just another kind of magic) -> and Normal Attack.

I mean, in every turn cycle he uses all those commands.

Sounds kinda easy to program but I couldn't do it. Can you help me please?

Things im considering:

*Consider the situation: IE: If Im in the Magic Phase and I cancel, I return to the Item Phase.

*Im using the Yanfly Engine Ace (The last version)

*Im not going to use [Action Times+] option just because it's going to complicate the coding of the script.

*I can solve the skipping part from one phase to the next by using a selectable item or skill that does nothing.

*The Guard Command is forbidden

Just remember:

Item -> Magic -> Skill (Just other kind of magic) -> and Normal Attack.   In that order. (The cancellation of one phase just brings you back to the prevoius phase.

Thanks beforehand.
By Magic and Skill im refering to: attachment related:

Reference.png

Original thread: https://forums.rpgmakerweb.com/threads/one-character-command-chain.25559/