Here is a little hack-ish type thing that should work (assuming I understand what you want to do). You can try this by copying it to a new game script - replace the boilerplate that Quest creates.
<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="healthtest">
<gameid>17c62dbe-f8bf-427c-9382-e18eceaf95ba</gameid>
<version>1.0</version>
<showhealth />
<firstpublished>2013</firstpublished>
<start type="script">
game.pov.origchangedhealth = game.pov.changedhealth
game.pov.changedhealth = game.pov.mychangedhealth
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<mychangedhealth type="script"><![CDATA[
do (this, "origchangedhealth")
if (this.health <= 10) {
msg ("You're on death's door. Better heal yourself soon!")
}
]]></mychangedhealth>
</object>
</object>
<command name="pain">
<pattern>pain</pattern>
<script>
player.health = game.pov.health - 5
msg("Your health is now " + game.pov.health)
</script>
</command>
</asl>
The "changedhealth" script is called whenever the health attribute changes. Unfortunately, that script is set inline down in the core in InitPOV. But you can assign scripts all you want. In this case, in the game start script, the changedhealth script is saved elsewhere in the player object, and a new one is set. Then in this new one, it invokes the old one (to keep the old behavior) and then does the less-than-10 check. You could skip the "saving the old" code if you wish to just incorporate the existing healthchanged code into your own. That is here:
if (this.health > 100) {
this.health = 100
}
else if (this.health <= 0) {
this.health = 0
if (HasScript(game, "onhealthzero")) {
do (game, "onhealthzero")
}
}
Let me know if any of this makes sense or if you need further help.