Code:
<if Spell="autoset">
<action type="Command" when="Aftercast">input /ws "Dancing Chains"</action>
<cancelspell />
</if>
<if Spell="Dancing Chains">
<if status="idle">
<equip when="precast" set="Swag" />
<action type="Command">input /lockstyle on</action>
<action type="Command">wait 0.5; input /ws "Vulcan Shot"</action>
<cancelspell />
<return />
</if>
<elseif status="resting">
<equip set="Rest" />
<cancelspell />
<return />
</elseif>
<elseif status="engaged">
<equip set="TP" />
<cancelspell />
<return />
</elseif>
</if>
<if Spell="Vulcan Shot">
<equip set="Idle" />
<cancelspell />
</if>
The lockstyle message won't repeat itself unless you broke lockstyle by changing weapon, but this will otherwise work even for staff changes and whatnot if you can deal with the extra line of spam.