
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Welcome!
Don't use the trigger template, it's bugged.
I created my own "template" using colors. Simple yet efficient
Enemy SpawningBlah
CONDITIONS:Countdown is at most 0 Seconds
ACTIONSSet Countdown Timer to 30s
Create Zergling at Spawn
Order any unit Owned by Player 8 in Spawn attack to ZM1
Preserve Trigger
This will create units at the very game start. If you don't want that simply put another trigger above it that always sets the countdown to 30, not preserved.
Most of the spells cannot be detected directly, and those that can often don't tell you who cast it (Disruption Web, Dark Swarm).
Then there's EUDs, but since you are new you probably don't want that.
There's a lot of information about Spells and EUDs in the Wiki and Tutorials (Starcraft Menu on the top) and the forums. You should browse around and see what you can learn. Don't forget the Maplantis part. The link to it is stickied in the UMS Assistance forum.
But let me give a brief overview:
Spells like Ensnare can be detected by slowdown of the unit. But if there's a whole bunch of possible targets this gets next to impossible.
Spells like Storm just do damage which is not detectable, if there's other means doing damage.
Spells like Lockdown can be detected by hostile computer units converging on the target. Again this requires very specific environments which are usually not given.
But now we're getting to your friends:DWeb and DSwarm are detectable units. You can center on them, do your effects and remove them. The problem is if there are multiple players that can cast it you cannot know who cast it because they are always owned by Player 12 (Neutral). If that's necessary then you need to somehow physically seperate them or disable their spell ability when they get too close to each other (always center a large location on the defiler and check for other defilers in it). There's potentially more ways, but lets keep it simple here.
And Mindcontrol:
This one is pretty useful as it gives you the owner of the unit and thus the caster. But you're restricted to units that cannot be normally owned by any other player or you wouldn't be able to give it back to the correct owner.
The create/remove units problem is only partially solveable.
You have no way of knowing which are the one's you created 30s ago if they are not unique.
However you could for example create hero lings that look like normal lings. (same hp, damage, name, etc) and just remove all hero lings after those 30 seconds.
If you need methods of timing don't use waits, use
death counters.
About your last question:
Do you mean custom spells? Well then only creativity sets your boundaries (and sc of course

).
Look around the sections I mentioned, use the search with keyword "spells" I'm sure you'll find loads of Spell ideas.
Checking out UMS Theory and Ideas Forum (In UMS Mapping) would also probably be helpful for that matter.