Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
72
_module/nss/jw_dirge_aoe.nss
Normal file
72
_module/nss/jw_dirge_aoe.nss
Normal file
@@ -0,0 +1,72 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dirge: Heartbeat
|
||||
//:: jw_dirge_aoe
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creates an AOE that removes the strength of the enemnies
|
||||
of the caster over a 30ft radius around the caster
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 8, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "jw_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eStr=EffectAbilityDecrease(ABILITY_STRENGTH,2);
|
||||
effect eDex=EffectAbilityDecrease(ABILITY_DEXTERITY,2);
|
||||
effect eVis=EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
effect eLink = EffectLinkEffects(eStr, eDex);
|
||||
eLink = EffectLinkEffects(eVis, eLink);
|
||||
effect eHit=EffectVisualEffect(VFX_IMP_HEAD_ODD);
|
||||
object oCaster=GetObjectByTag("PR_Zacharias");
|
||||
|
||||
//debug
|
||||
object oCreator=GetAreaOfEffectCreator();
|
||||
//AssignCommand(oCreator,SpeakString("I am the creator"));
|
||||
|
||||
|
||||
float fDelay;
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
|
||||
if((!GetIsFriend(oTarget, oCreator))&&(oTarget!=oCreator))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_STORM_OF_VENGEANCE));
|
||||
//Make an SR Check
|
||||
fDelay = GetRandomDelay(0.5, 2.0);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHit, oTarget));
|
||||
if(!ScrollResist(GetAreaOfEffectCreator(), oTarget, fDelay))
|
||||
{
|
||||
|
||||
//AssignCommand(oTarget,SpeakString("Resist failed"));
|
||||
//Make a saving throw check
|
||||
if(WillSave(oTarget, 22, SAVING_THROW_TYPE_CHAOS, oCaster) == 0)
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(5)));
|
||||
//signCommand(oTarget,SpeakString("Save failed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
//signCommand(oTarget,SpeakString("Save passed"));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//signCommand(oTarget,SpeakString("resist passed"));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user