This page explains alot about the common protection scripts. it also explains how to use 'Reaction level' variables.
I suggest you to try some codes from there, and if you face specific problems you can post it here. (don't forget to use the
[[b][/b]code] tag to keep code spacing, so it would be readable)