#include "x4_inc_functions"
int StartingConditional()
{
    object oPC = GetPCSpeaker();
    string sAreaString = GetLocalString(GetArea(OBJECT_SELF), "AreaString");
    ClearAllActions();
    SetLocalString(oPC, "AreaString", GetLocalString(GetArea(OBJECT_SELF), "AreaString"));
    AssignCommand(oPC, ClearAllActions());
    object oArea = GetArea(OBJECT_SELF);
    SetCustomToken(700, IntToString(GetLocalInt(oPC, "Miles")));

    int nMiles;
    string sDifficulty = GetLocalString(GetModule(), "mDiffExplo");
    if (sDifficulty == "COMMONER") nMiles = 3;
    if (sDifficulty == "ADVENTURER") nMiles = 5;
    if (sDifficulty == "HERO") nMiles = 7;
    if (sDifficulty == "LEGEND") nMiles = 10;
    if (sDifficulty == "DEMIGOD") nMiles = 15;
    int nTravelled = GetLocalInt(oPC, "Miles");

    ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectCutsceneImmobilize(), oPC);

    string sTextPL = "Mozesz kontynuowac swoja podroz.";
    string sTextENG = "You may continue your journey.";

    if (GetLocalInt(oArea, "DiscoveredVillage") == TRUE)
    {
        sTextPL = sTextPL + " W oddali widzisz unoszacy sie dym, prawdopodobnie znajduje sie tam jakas wioska.";
        sTextENG = sTextENG + " You see some smoke in the distance, it is likely there is a village there.";
    }
    if (GetLocalInt(oArea, "DiscoveredDungeon") == TRUE)
    {
        sTextPL = sTextPL + " Spostrzegasz niedaleko wejscie do jakiegos lochu.";
        sTextENG = sTextENG + " You notice an entrance to a dungeon nearby.";
    }
    if (GetCampaignInt(CharacterDB(oPC), "QUEST_ACTIVE") == TRUE && nTravelled >= nMiles)
    {
        string sDB = CharacterDB(oPC);
        string sEntry = IntToString(GetCampaignInt(sDB, "QUEST_JOURNAL"));
        sEntry = GetStringRight(sEntry, 1);
        if (GetCampaignString(CharacterDB(oPC), "QUEST_REGION") == "greencoast" && GetStringLeft(sAreaString, 1) == "1" && sEntry == "1")
        {
            sTextPL = sTextPL + " Znajdujesz sie niedaleko miejsca, ktorego dotyczy przyjete przez ciebie zadanie.";
            sTextENG = sTextENG + "You are close to the location of your accepted task.";
        }
    }

    SetCustomToken(701, sTextPL);
    SetCustomToken(702, sTextENG);

    return TRUE;
}