//::///////////////////////////////////////////////
//:: FileName jhr_at_haspaar2
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 7/5/2002 2:56:27 AM
//:://////////////////////////////////////////////
#include "nw_i0_tool"
#include "jhr_i0_partyfunc"
void main()
{
    object oSpeaker = GetPCSpeaker();
    SetLocalInt(GetModule(), "nHaspaarsRewardGiven", 1);
    // Give the speaker some gold
    RewardPartyGP(200, GetPCSpeaker());

    // Give the speaker some XP
    RewardPartyXP(300, GetPCSpeaker());

    // Give a horde key to each party member
    //CreateItemOnObject("hordechestkey", GetPCSpeaker(), 1);
    GiveItemToEveryPartyMember(oSpeaker, "hordechestkey");

    //Set flag so that cave exit goes to "Vethboro Battle"
    SetLocalInt(GetModule(), "nBattleFlag", 1);

    //If player got Clucky, move Clucky outside Epilogue inn
    if (GetLocalInt(GetModule(), "nCluckyActiveFlag") == 1)
    {
        AssignCommand(GetObjectByTag("jhr_chicken"), ActionJumpToObject(GetObjectByTag("WP_OUTSIDE_INN_EPILOGE")));
    }

    // Remove items from the player's inventory
    //object oItemToTake;
    //oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "ChieftainsBelt");
    //if(GetIsObjectValid(oItemToTake) != 0)
    //    DestroyObject(oItemToTake);

    TakeItemFromParty(oSpeaker, "ChieftainsBelt");

    //oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "KeytoGoblinLair");
    //if(GetIsObjectValid(oItemToTake) != 0)
    //    DestroyObject(oItemToTake);

    TakeItemFromParty(oSpeaker, "KeytoGoblinLair");
    ExecuteScript("jhr_deererase", OBJECT_SELF);
}
