void main() { object oPlayer = GetLastUsedBy(); object oNewSeat=GetLocalObject(OBJECT_SELF,"seat"); if( GetIsPC( oPlayer ) ) { object oChair = OBJECT_SELF; if( GetIsObjectValid( oChair )) { vector vChair = GetPosition(OBJECT_SELF); vChair.z = 0.0; location lChair = Location(GetArea(OBJECT_SELF),vChair,GetFacing(OBJECT_SELF)); if (!GetIsObjectValid(oNewSeat)) { oNewSeat = CreateObject(OBJECT_TYPE_PLACEABLE, "jw_sit", lChair,FALSE); SetLocalObject(OBJECT_SELF,"seat",oNewSeat); } AssignCommand( oPlayer, ActionSit( oNewSeat ) ); } } }