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

30 lines
780 B
Plaintext

void main()
{
object oPC = GetLastHostileActor();
if (!GetIsPC(oPC)) return;
if (GetTag(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC)) != "SthennosHeart")
return;
effect eEffect;
eEffect = EffectDamage(60, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, GetObjectByTag("Sthennos"));
object oTarget;
oTarget = GetObjectByTag("Sthennos");
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_FROST_S), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_FROST_S), GetLocation(oTarget));
}