void main()
{

object oPC = GetLastUsedBy();

object oSound = GetNearestObjectByTag("SoulGemVictory");

if (!GetIsPC(oPC)) return;

int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));

if (DoOnce==TRUE) return;

SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);

GiveXPToCreature(oPC, 250);

CreateItemOnObject("itemsoulgem", oPC);

SoundObjectPlay(oSound);

AddJournalQuestEntry("j_SoulGem", 2, oPC, TRUE, FALSE);

SetPlotFlag(OBJECT_SELF, FALSE);

DestroyObject(OBJECT_SELF, 0.0);
}

