Code indentation is honoured if you toggle Rich Text mode off, or use a browser such as Firefox which is compatible with Bioware's rich text tool (Drupal?). I guess that's what Lazarus Magni meant? For example,
void main()
{
// Talk while sitting
// Put in first action of conversation
// Also used OnSpawn
object oChair = GetLocalObject(OBJECT_SELF, "MyChair");
string sNPC = GetTag(OBJECT_SELF);
if (oChair == OBJECT_INVALID)
oChair = GetNearestObjectByTag("Chair" + sNPC);
if (oChair == OBJECT_INVALID)
oChair = GetNearestObjectByTag("Chair");
//Make sure no one is in chair, if not sit-down.
if(!GetIsObjectValid(GetSittingCreature(oChair)))
{
SetLocalObject(OBJECT_SELF, "MyChair", oChair);
ClearAllActions(); //This is so he don't spin in his chair, following you.
ActionSit(oChair);
}
}