// Path 1
void main()
{
    object oWP=GetWaypointByTag("MERC_MERCHSPAWN");
    int nR=d4();
    string sS="merch"+IntToString(nR);
    object oMerch=CreateObject(OBJECT_TYPE_CREATURE,sS,GetLocation(oWP));
    SetLocalInt(oMerch,"nPath",GetLocalInt(GetPCSpeaker(),"nMercPath"));
    SetLocalObject(oMerch,"oGuardian",GetPCSpeaker());
    SetLocalInt(oMerch,"nFee",GetLocalInt(GetPCSpeaker(),"nMercFee"));
    SetAILevel(oMerch,AI_LEVEL_NORMAL);
    AssignCommand(oMerch,ExecuteScript("merchant_escort",oMerch));
    SetLocalObject(GetPCSpeaker(),"oEscortMerchant",oMerch);
    SetLocalInt(oMerch,"nState",0);
}