this whole thing could be 10-15 lines...
on @*:TEXT:!lockdown*:#:{ if ($2 == help) { ... } elseif ($2 == orange) { if (!$3) { ... } elseif ($3 == off) { ... } } elseif ($2 == yellow) { if (!$3) { ... } elseif ($3 == off) { ... } } ; And so on }
or even shorter if you use $iif