LoD_PRC8/_module/nss/fall_grave_kill.nss
Jaysyn904 94990edc60 Initial Upload
Initial Upload
2023-09-21 21:20:34 -04:00

50 lines
1.6 KiB
Plaintext

//:://////////////////////////////////////////////////
//:: fall_grave_kill
/*
Kills anyone who disturbs my grave
*/
//:://////////////////////////////////////////////////
//:: Created By: r3plica
//:: Created On: 21/01/2005
//:://////////////////////////////////////////////////
void Die(object oTarget, int DmgAmmount)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(DmgAmmount, DAMAGE_TYPE_NEGATIVE), oTarget);
}
void Harm(object oTarget)
{
ActionCastSpellAtObject(DURATION_TYPE_INSTANT, oTarget, SPELL_POWER_WORD_KILL, METAMAGIC_ANY, TRUE, PROJECTILE_PATH_TYPE_DEFAULT, FALSE);
}
void main()
{
object oPC = GetLastUsedBy();
object oGrave = OBJECT_SELF;
object oKeeper = GetObjectByTag("CryptKeeper");
effect eBeam1 = EffectVisualEffect(VFX_FNF_IMPLOSION);
effect eBeam2 = EffectVisualEffect(VFX_FNF_SOUND_BURST);
effect eDie = EffectVisualEffect(VFX_IMP_DEATH);
//Cast Spells
ApplyEffectToObject(DURATION_TYPE_INSTANT, eBeam1, oGrave);
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBeam1, oGrave));
DelayCommand(3.0, SendMessageToPC(oPC, "You feel pure evil curse through your veins. You realise that these are your final moments alive!"));
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDie, oPC));
if (GetTag(oGrave) == "x0_tomb")
{
DelayCommand(4.0, Die(oPC, 10000));
}
else if (GetTag(oGrave) == "FallenGrave")
{
AssignCommand(oKeeper, ActionDoCommand(SpeakString("You shall not disturb my masters!")));
AssignCommand (oKeeper, ActionAttack(oPC));
DelayCommand(4.0, Harm(oPC));
}
}