The best way to automate it is using autoexec.
in auotexec: <register event="losebuff_aftermath" silent="true">input /ma "Comet" <t></register>
in spellcast: <if spell="Comet">
then inside that you can follow it up with <if buffactive="Aftermath">
So the spell comet or whatever spell tickles your fancy becomes your new tp set. Your ingame macros to equip your tp set would be /ma "Comet" <me>.
Furthermore to adjust your tp set this way you establish variables which you change in your trigger spell.
example:
Code
<if mode="AND" EquipMain="Amanomurakumo" buffactive="aftermath">
<var cmd="set TPHead Zelus Tiara"/>
<var cmd="set TPNeck Ganesha's Mala"/>
<var cmd="set TPBody Unkai Domaru +2"/>
<var cmd="set TPWaist Bullwhip Belt"/>
<var cmd="set TPFeet Ace's Leggings"/>
<var cmd="set TPBack Misuuchi Kappa"/>
</if>
So your tp set would be something like
Code
<set name="Melee" BaseSet="Idle">
<ammo>Hagneia Stone</ammo>
<head>$TPHead</head>
<neck>$TPNeck</neck>
<lear>Unkai Mimikazari</lear>
<rear>Brutal Earring</rear>
<body>$TPBody</body>
<hands>Brego Gloves</hands>
<lring>Rajas Ring</lring>
<rring>Tyrant's Ring</rring>
<back>$TPBack</back>
<waist>$TPWaist</waist>
<legs>Unkai Haidate +2</legs>
<feet>$TPFeet</feet>
</set>
At the end of the if I put <cancelspell/> so you don't actually try to cast comet.
If I lost you at all feel free to PM me.