<Set="Gearset1|Gearset2"> is piping the Gearset1 and Gearset2. The gearset on the right most takes priority if there are any conflicts between two gearsets.
For example,
MNKTP: rancor collar, thaumas coat
Impetus: tantra body +2
If you pipe MNKTP|Impetus, you will wear rancor collar, tantra body +2 (Impetus gearset has priority over MNK gearset)
In this xml, i use <Set="MNKTP|$Impetus">. When impetus is triggered or up, it will change the variable "impetus" to impetus. So impetus gear set will take priority over MNKTP. When impetus is not up, the variable "impetus" will change to blank. But as you don't have any gears in blank gearset, so it will just use the MNKTP gearset instead.
Put this section at the beginning of your rules:
Code
<if BuffActive="Impetus"> <!-- Added this -->
<var cmd="set Impetus Impetus" /> <!-- Added this -->
</if>
<else>
<var cmd="set Impetus Blank" /> <!-- Added this -->
</else>
Followed by this section:
Code
<if spell="Autoset">
<if status="idle">
<action type="equip" when="idle" set="MNKIdle"/>
</if>
<elseif status="engaged">
<action type="equip" when="engaged|aftercast" set="MNKTP|$Impetus"/> <!-- Added this -->
</elseif>
<elseif status="resting">
<action type="equip" when="resting" set="MNKResting"/>
</elseif>
</if>
Also remove <if spell="autoset"></if>
Change all the set="MNKTP" to set="MNKTP|$Impetus"
You do not need to lock melee gaiters+2 after counterstance.
Sometimes when it is laggy, you will notice that impetus gear is not equipped immediately. So I use the following impetus macro:
/ja "Impetus" <me>
/wait 1
/ja "Focus" <me>
Hope this helps.