// After the Valek > Rizan Battle
// Valek moving his HQ
#include "z_cutscene_sourc"
void main()
{
    int nCutVal;
    location lPC = GetLocation(GetWaypointByTag("RELOCATE_PC"));
    location lVal = GetLocation(GetWaypointByTag("RELOCATE_VAL"));
    object oPC = GetPCSpeaker();
    object oVal = GetObjectByTag("Valek");
    object oAnim = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
    object oDomin = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
    object oFamiliar = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
    object oHench = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC);
    object oSummon = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
    CutFadeToBlack(nCutVal, 3.0, oPC);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectCutsceneParalyze(), oPC, 13.8f);


    object oItem = GetFirstObjectInArea();
    while (GetIsObjectValid(oItem))
    {
        if(oItem != oPC && oItem != oVal && oItem != oAnim && oItem != oDomin && oItem != oFamiliar && oItem != oHench && oItem != oSummon)
        {
            CutSetPlotFlag(nCutVal, 6.0, oItem, FALSE);
            CutDestroyObject(nCutVal, 6.1, oItem);
        }
      oItem = GetNextObjectInArea(oPC);
    }

    CutJumpToLocation(nCutVal, 8.2, oPC, lPC);
    CutJumpToLocation(nCutVal, 8.2, oVal, lVal);
    CutFadeFromBlack(nCutVal, 9.0, oPC);
    CutSpeakString(nCutVal, 12.5, oVal, "It appears that you are not above getting your hands dirty... I like that quality in an ally.");
    CutPlayAnimation(nCutVal, 12.6, oVal, ANIMATION_FIREFORGET_BOW, 1.2);

    effect eEffectCheck = GetFirstEffect(oPC);
    while (GetIsEffectValid(eEffectCheck))
    {
      if (GetEffectType(eEffectCheck) == EFFECT_TYPE_CUTSCENE_PARALYZE)
      DelayCommand(13.8f, RemoveEffect(oPC, eEffectCheck));
      eEffectCheck = GetNextEffect(oPC);
    }

    CutActionStartConversation(nCutVal, 14.0, oVal, oPC, "c_valek2");
}

