The priority suggestion is a very good one, me thinks.
Although I wouldn't use this script myself because I don't want a particular status to be overriden by this script.
Maybe to compensate for this another suggestion would be to add a warning dialog which pops up (as the top most window), counting down from a given number of seconds (can be an option too*) before it sets your status to the one you've provided. Selectable per contact of course.
* and with this you could also add the time-delay suggestion someone requested. Setting this to 0 and no warning pops up and the status is set immediatly. Setting it to eg 5 secs for a particular contact and the status will be set in 5 seconds if that particular contact signs in.
And if another contact signs in during the time the popup warning is shown the popup is automatically dismissed (and/or a new popup is shown if needed).