#include "pqj_inc"
void main()
{
// Give the speaker some gold
GiveGoldToCreature(GetPCSpeaker(), 150);
// Give the speaker some XP
GiveXPToCreature(GetPCSpeaker(), 200);
// Remove items from the player's inventory
object oItemToTake;
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "ChickenHead");
if(GetIsObjectValid(oItemToTake) != 0)
DestroyObject(oItemToTake);
// Set the variables
SetLocalInt(GetPCSpeaker(), "p002state", 300);
// Get the PC who is in this conversation.
object oPC = GetPCSpeaker();
// Update the player's journal.
AddPersistentJournalQuestEntry("p002", 3, oPC, FALSE);
object oTarget;
// Close and lock "DOOR_TO_CHICKEN_HOUSE".
oTarget = GetObjectByTag("DOOR_TO_CHICKEN_HOUSE");
AssignCommand(oTarget, ActionCloseDoor(oTarget));
SetLocked(oTarget, TRUE);
}