One person chair

The code behind a one-person chair.

Realm-wide properties:


This is just a simple line of code that makes sure that people aren't still counted as 'sitting' when the age is empty.

Location properties:
Place these in the location you'd like the chair to be.

Normal description [$if is_sat==ObjectId(players.player)] You could [stand up|chair_stand]. [$elif not is_sat] You could [sit in the chair|chair_sit]. [$else] players.name(players.player(is_sat)) is sitting in the chair. [$end] More description

Note that you can place  in front of things you want to appear when the person is sitting. For example, this: [$if is_sat==ObjectId(players.player)] Behind you is the door that leads back out into the middle of the house. [$else] Behind you is the door that leads back [out into the middle of the house|back]. [$end] would make sure that the person sitting down can't leave without first standing up.

if not is_sat: is_sat = ObjectId(players.player) event("You sit in the chair.", text("[$name] sits down in the chair."))

if is_sat==ObjectId(players.player): is_sat = False event("You stand up.", text("[$name] stands up."))



if is_sat == ObjectId(players.player): is_sat = False

A big thanks to Pavitra for helping me out on this one.