using(ScriptAPI)
{
	AddUShort("MapObjectID");
	AddPaddedString("Charname",20);
	StartNode("CharCoords");
	AddUInt("PosX");
	AddUInt("PosY");
	AddByte("Rotation");
	EndNode(1);
	State = AddByte("State");
	AddByte("Job");
	switch(State)
	{
		case 1:
		case 2:
		case 3:
			StartNode("Shape");
			AddByte("Race");
			AddByte("CharClass");
			AddByte("Gender");
			AddByte("HairType");
			AddByte("HairColor");
			AddByte("FaceType");
			EndNode(0);
			
			StartNode("Equipment");
			AddUShort("Hat");
			AddUShort("Mouth");
			AddUShort("RightHand");
			AddUShort("Body");
			AddUShort("LeftHand");
			AddUShort("Pant");
			AddUShort("Boot");
			AddUShort("AccBoot");
			AddUShort("AccPant");
			AddUShort("AccBody");
			AddUShort("AccHeadA");
			AddUShort("MiniMon_R");
			AddUShort("Eye");
			AddUShort("AccLeftHand");
			AddUShort("AccRightHand");
			AddUShort("AccBack");
			AddUShort("CosEff");
			AddUShort("AccHip");
			AddUShort("MiniMon");
			AddUShort("AccShield");
			EndNode(0);
		    break;
		case 4: // 
	}
}