26 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

void main()
{
// Remove items from the player's inventory
object oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "px_strangekey");
object oForge = OBJECT_SELF;
if((GetIsObjectValid(oItemToTake) == TRUE) && (GetObjectByTag("px_prototype_wargolem")!=OBJECT_INVALID))
{
object oTarget = GetObjectByTag("px_prototype_wargolem");
effect eDec = EffectSpellFailure(100, SPELL_SCHOOL_GENERAL);
DestroyObject(oItemToTake);
SetLocalInt(OBJECT_SELF, "sBurn", 1);
AssignCommand(oForge, DelayCommand(0.2,ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
SoundObjectStop(GetNearestObjectByTag("fr_pax_forge"));
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDec, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SOUND_BURST),oForge,10.0);
AssignCommand(oForge, DelayCommand(60.0,ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
}
else
SpeakString("[The Forge is not hot enough to melt your key yet.]",TALKVOLUME_TALK);
}