Writing a rule script
To create a rule script, you can use any text editor and then copy the script into the Script tab of the Rule editor window, or you can enter script text directly into the Script tab.
When designing rule scripts, consider the options described in Planning edit checks.