Aantioch_Infernum/_module/nss/dragonsreward.nss
Jaysyn904 22947ad4b6 Initial Upload
Initial Upload
2023-08-08 16:22:17 -04:00

34 lines
1.1 KiB
Plaintext

void main()
{
if (GetTag(GetItemActivated()) == "dragonsreward")
{
object oPC=GetItemActivator();
object oTarget = GetItemActivatedTarget();
effect eVisual = EffectVisualEffect(VFX_FNF_SUNBEAM);
string sSoundName = "c_dragnold_bat2";
object oArea=GetArea(oPC);
int nOutside = GetIsAreaNatural(oArea);
int nSurface = GetIsAreaAboveGround(oArea);
if (!GetIsObjectValid(oTarget)) return;
if (nOutside == AREA_ARTIFICIAL)
{
SendMessageToPC(oPC,"You cannot use this item here or at this time!");
return;
}
if (nSurface == AREA_UNDERGROUND)
{
SendMessageToPC(oPC,"You cannot use this item here or at this time!");
return;
}
// Apply effects
DelayCommand(1.0, AssignCommand(oTarget, SpeakString("What the hells that!!???", TALKVOLUME_TALK)));
AssignCommand(oTarget, DelayCommand(2.0, PlaySound(sSoundName)));
DelayCommand(2.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget));
DelayCommand(2.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(105, DAMAGE_TYPE_FIRE, DAMAGE_POWER_NORMAL), oTarget));
}
}