No... And you cannot edit attributes directly, or add new types either... Or overwrite existing functions and templates. I am afraid that that means that technique will not work. Sorry, I should have checked that before posting.
I would suggest an attribute on the player that holds what he is stood on, rather than flags on the objects, but have a flag on the thing on the shelf that indicates if it has been taken off the shelf.
On the Script tab of the game object, put this in for script to run when entering a room, so the player is not still stood on something when going somewhere else.
player.stoodon = null
For the book, set it to be scenery. Then, on the Inventory tab, set the Take behaviour to be a script:
if (GetBoolean(book, "takenfromshelf")) {
msg ("Taken.")
book.parent = player
}
else if (player.stoodon = null) {
msg ("The shelf is too high, you canot reach the book.")
}
else {
msg ("Taken.")
book.parent = player
book.takenfromshelf = true
}
For the shelf, set its description to be a script:
if (GetBoolean(book, "takenfromshelf")) {
msg ("The shelf is empty.")
}
else {
msg ("On the shelf you can see a book.")
}
Then add two new commands (if off-line, I would recommend verbs, but verbs have issues on-line too). The first line of the first script needs to include every object the player can stand on; I have assumed objects called "stool" and "ladder".
Command pattern
stand on #object#;stand #object#;get on #object#;up on #object#
standon
if (not object = stool and not object = ladder) {
msg ("You cannot stand on " + GetDisplayName (object) + "!")
}
else if (player.stoodon = object) {
msg ("You are already on it!")
}
else {
if (not player.stoodon = null) {
msg ("First you get down from " + GetDisplayName (player.stoodon) + ".")
}
if (not object.parent = game.pov.parent) {
msg ("You put down " + GetDisplayName (object) + " on the ground.")
object.parent = game.pov.parent
}
msg ("You stand on " + GetDisplayName (object) + ".")
player.stoodon = object
}
Command pattern
get off #object#;off #object#;down from #object#;get down from #object#
getoff
if (player.stoodon = object) {
msg ("You get off " + GetDisplayName (object) + ".")
player.stoodon = null
}
else {
msg ("You are not on it!")
}