This is going to be more than the answer you expected, and yet not what you were looking for. I don't like short answers, so you get a long one. But since no one else has responded to you, I guess it's better than no answer. Plus, free bump in case someone else wants to share a complete XML.
There are two ways you can equip a stacked Rudra set when you have SA or TA: the buffactive way or the variable way. The former is the easier, but has issues if you hit your WS faster than Spellcast can register SA or TA from the game.
The buffactive method: Use a basic if/else condition to determine which set to use (replacing your lines 283-286):
Code
<elseif spell="Rudra's Storm">
<castdelay delay=".2" />
<if buffactive="Sneak Attack">
<equip when="precast" set="Rudra-SA" />
</if>
<elseif buffactive="Trick Attack">
<equip when="precast" set="Rudra-TA" />
</elseif>
<else>
<equip when="precast" set="Rudra" />
</else>
</elseif>
And, of course, make two new sets called Rudra-SA and Rudra-TA.
The problem is if you hit your macros fast enough, you'll find yourself WSing in your unstacked set. I didn't feel like making myself go a second slower just to accommodate this issue, so I used variables to prevent this from happening.
Variable method:
1. Create a variable that you will use to tell if SA or TA are on. We'll make the default value "no," meaning neither SA nor TA are on. This code can go anywhere inside <spellcast> but outside of the other tags (ex. you can put it right before <rules> or <sets>):
Code
<variables>
<var name="WSStack">no</var>
</variables>
2. Assign this variable the proper values under certain conditions (from your lines 243-254):
Code
<if spell="Sneak Attack">
<!-- Normal SA gear. -->
<equip when="precast" set="SA" />
<equip when="midcast" set="TH" />
<aftercastdelay delay="7" />
<var cmd="set WSStack SA"/>
</if>
<elseif spell="Trick Attack">
<!-- Normal TA gear. -->
<equip when="precast" set="TA" />
<equip when="midcast" set="TH" />
<aftercastdelay delay="7" />
<var cmd="set WSStack TA"/>
</elseif>
NOTE: I suggest changing your "Sneak Attack" set name to SA and "Trick Attack" set name to TA. It's just more simple, and I changed it in the code above. You'll see why on the last step.
3. Use this variable in your Rudra rules ($ denotes that you are using a self-defined variable):
Code
<elseif spell="Rudra's Storm">
<castdelay delay=".2" />
<equip when="precast" set="Rudra-$WSStack" />
</elseif>
The three sets this can use are Rudra-SA, Rudra-TA, and Rudra-no (unstacked set). So be sure to use these names for your sets.
4. You have to change the variable WSStack back to "no" when SA and TA are off. You can replace lines 314-319 with this:
Code
<if status="idle">
<equip when="Idle|Aftercast" set="Idle" />
</if>
<elseif status="engaged">
<if BuffActive="Sneak Attack|Trick Attack">
<equip when="Engaged|Aftercast" set="$WSStack" />
</if>
<else>
<equip when="Engaged|Aftercast" set="TP" />
<var cmd="set WSStack no"/>
</else>
</elseif>
The code above will check if SA or TA are on while you are engaged--if at least one of them are, it will equip either SA or TA set (whichever one you assigned to $WSStack last). With this, you could take out the aftercastdelay on your SA/TA sets, which I presume are there to delay the change back into TP gear before you get the chance to hit the mob. If neither SA or TA are on, it will equip your TP set and set $WSStack back to no.
Three weak points:
1. If you fail SA or TA (on recast or something), but still WS directly after, you will WS in stacked set.
2. This doesn't consider SATA WS sets, which seem pointless to me, so I didn't bother. It can be easily modified to support this.
3. You're going to have to create some way to force Spellcast to read through the rules again if you either take longer than 7 seconds to get SA/TA off, or if you take out the aftercastdelay altogether on your SA/TA rules. For example, you can /ja trigger1 <me>, and the aftercast will put you back into TP gear.
Other notes:
1. You can use this same variable for your other WS sets. For example, you can model Evis the same way (equip set="Evis-$WSStack" and create three sets called Evis-no, Evis-SA, and Evis-TA).
2. I forgot what else I was going to say.