The party's gold is pooled but not their XP, so there's no trigger that could identify the combined XP total. Possibly some crude hack using both XPGT() and NumInPartyAliveGT(), but it might be easier to use LevelPartyGT() instead of XP, that way you can decide what level (or hitdice) of enemies to use. There are mods that scale such spawns accordingly - possibly BGSpawn and Tutu's own spawn system - take a look at those scripts. You'd need a bunch of fairly similar script blocks to do the checks and spawning, but that is (IIRC) what those scripts do also.
Thanks for that. For now, though, let's assume that they attack as specified above. I still need to know how high their levels should be to pose a significant threat to a party of 6.