void main()
{
    object oFarmDoor =  GetObjectByTag("dt_TownToFarm");
    object oFarmer = GetObjectByTag("Farmer01");
    AssignCommand(oFarmer, ActionDoCommand(SetLocalInt(GetModule(), "nGoingToFarmDoorFlag", 1)));
    AssignCommand(oFarmer, ActionForceMoveToObject(oFarmDoor));
    AssignCommand(oFarmer, ActionDoCommand(SetLocked(oFarmDoor, 0)));
    AssignCommand(oFarmer, ActionSpeakString("Go on in, and be nice to the old man!", TALKVOLUME_TALK));
    AssignCommand(oFarmer, ActionForceMoveToObject(GetObjectByTag("POST_Farmer01")));
    AssignCommand(oFarmer, ActionDoCommand(SetLocalInt(GetModule(), "nFarmDoorOpenedFlag", 1)));
    AssignCommand(oFarmer, ActionDoCommand(SetLocalInt(GetModule(), "nGoingToFarmDoorFlag", 0)));
}
