Horsefly Swamp update
Creatures & encounter tables to support Horsefly swamp expansion.
This commit is contained in:
14
_module/nss/acid_cloud1.nss
Normal file
14
_module/nss/acid_cloud1.nss
Normal file
@@ -0,0 +1,14 @@
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetEnteringObject();
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
if ( !GetIsEnemy(oTarget,oCaster) || oTarget == oCaster )
|
||||
return;
|
||||
|
||||
effect eAcid = EffectDamage(d6(6),DAMAGE_TYPE_ACID);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eAcid,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
21
_module/nss/acid_cloud2.nss
Normal file
21
_module/nss/acid_cloud2.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
void main()
|
||||
{
|
||||
effect eAcid;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
|
||||
while ( GetIsObjectValid(oTarget ) )
|
||||
{
|
||||
if ( GetIsEnemy(oTarget,oCaster) )
|
||||
{
|
||||
eAcid = EffectDamage(d6(6),DAMAGE_TYPE_ACID);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eAcid,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
8
_module/nss/acid_cloud_aura.nss
Normal file
8
_module/nss/acid_cloud_aura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
effect eAOE = EffectAreaOfEffect(AOE_PER_FOGACID,"acid_cloud1","acid_cloud2","null");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,HoursToSeconds(100));
|
||||
}
|
232
_module/nss/advanced_ai.nss
Normal file
232
_module/nss/advanced_ai.nss
Normal file
@@ -0,0 +1,232 @@
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void DoPhysical( object oTarget )
|
||||
{
|
||||
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
|
||||
{
|
||||
oTarget = GetNearestEnemy();
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
}
|
||||
object oEquip = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
|
||||
if ( GetDistanceToObject(oTarget) > FeetToMeters(20.0) )
|
||||
{
|
||||
if ( !GetIsObjectValid( oEquip ) || !GetWeaponRanged( oEquip ) )
|
||||
ActionEquipMostDamagingRanged();
|
||||
ActionAttack(oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !GetIsObjectValid( oEquip ) || GetWeaponRanged( oEquip ) )
|
||||
ActionEquipMostDamagingMelee();
|
||||
TalentMeleeAttack(oTarget);
|
||||
}
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
// ActionCastFakeSpellAtLocation(SPELL_SUMMON_SHADOW,GetLocation(OBJECT_SELF));
|
||||
|
||||
|
||||
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
|
||||
// SpeakString("Running script " + sScript,TALKVOLUME_SHOUT);
|
||||
|
||||
// ClearAllActions();
|
||||
if ( sScript != "" )
|
||||
ExecuteScript(sScript,OBJECT_SELF);
|
||||
|
||||
// SetCreatureOverrideAIScriptFinished();
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
return;
|
||||
}
|
||||
|
||||
/* if ( d6() == 1 ) // in case they get busy-stuck, also to add randomness
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"busy",FALSE);
|
||||
return;
|
||||
} */
|
||||
// Don't inturupt actions in progress
|
||||
|
||||
|
||||
if ( GetCurrentAction() == ACTION_CASTSPELL )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetLocalInt(OBJECT_SELF,"physical") )
|
||||
{
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder);
|
||||
return;
|
||||
}
|
||||
// Haste = Super awesome;
|
||||
if ( !GetHasEffect(EFFECT_TYPE_HASTE ) && ( GetHasSpell(SPELL_HASTE) ||
|
||||
GetHasSpell(SPELL_MASS_HASTE) ) )
|
||||
{
|
||||
// SpeakString("Time for haste!!!");
|
||||
|
||||
if ( GetHasSpell(SPELL_MASS_HASTE) )
|
||||
{
|
||||
ClearActions(1001);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
ActionCastSpellAtObject(SPELL_MASS_HASTE,OBJECT_SELF);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetHasSpell(SPELL_HASTE) )
|
||||
{
|
||||
ClearActions(1001);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
ActionCastSpellAtObject(SPELL_HASTE,OBJECT_SELF);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
SpeakString("WTF HASTE ERROR!!!");
|
||||
}
|
||||
|
||||
// Get those summons in there!
|
||||
if ( GetHasSpell(SPELL_ELEMENTAL_SWARM) )
|
||||
{
|
||||
ClearAllActions();
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
PlayVoiceChat(VOICE_CHAT_HELP);
|
||||
ActionCastSpellAtObject(SPELL_ELEMENTAL_SWARM,OBJECT_SELF);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( TalentSummonAllies() )
|
||||
{
|
||||
// SpeakString("Come to my side! Battle awaits!");
|
||||
PlayVoiceChat(VOICE_CHAT_HELP);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Hostile targeting actions
|
||||
if ( !GetIsObjectValid(oIntruder) || !GetIsReactionTypeHostile(oIntruder) )
|
||||
{
|
||||
oIntruder = GetNearestPerceivedEnemy();
|
||||
if ( !GetIsObjectValid(oIntruder) )
|
||||
return;
|
||||
}
|
||||
|
||||
// Dispel Casters
|
||||
if ( !GetLocalInt(OBJECT_SELF,"Dispel_once") &&
|
||||
( GetLevelByClass(CLASS_TYPE_SORCERER, oIntruder) >= 10 ||
|
||||
GetLevelByClass(CLASS_TYPE_WIZARD, oIntruder) >= 10 ||
|
||||
GetLevelByClass(CLASS_TYPE_CLERIC, oIntruder) >= 10 ||
|
||||
GetLevelByClass(CLASS_TYPE_SORCERER, oIntruder) >= 10 ||
|
||||
GetLevelByClass(CLASS_TYPE_DRUID, oIntruder) >= 10 ) )
|
||||
{
|
||||
if ( GetHasSpell(SPELL_MORDENKAINENS_DISJUNCTION) ||
|
||||
GetHasSpell(SPELL_GREATER_DISPELLING) ||
|
||||
GetHasSpell(SPELL_DISPEL_MAGIC) ||
|
||||
GetHasSpell(SPELL_GREATER_SPELL_BREACH) ||
|
||||
GetHasSpell(SPELL_LESSER_SPELL_BREACH) )
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"Dispel_once",1);
|
||||
// SpeakString("I will dispel you!!");
|
||||
if ( GetHasSpell(SPELL_GREATER_SPELL_BREACH) )
|
||||
{
|
||||
ClearActions(1001);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
ActionCastSpellAtObject(SPELL_GREATER_SPELL_BREACH,oIntruder);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetHasSpell(SPELL_LESSER_SPELL_BREACH) )
|
||||
{
|
||||
ClearActions(1001);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
ActionCastSpellAtObject(SPELL_LESSER_SPELL_BREACH,oIntruder);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetHasSpell(SPELL_MORDENKAINENS_DISJUNCTION) )
|
||||
{
|
||||
ClearActions(1001);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
ActionCastSpellAtObject(SPELL_MORDENKAINENS_DISJUNCTION,oIntruder);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetHasSpell(SPELL_GREATER_DISPELLING) )
|
||||
{
|
||||
ClearActions(1001);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
ActionCastSpellAtObject(SPELL_GREATER_DISPELLING,oIntruder);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetHasSpell(SPELL_DISPEL_MAGIC) )
|
||||
{
|
||||
ClearActions(1001);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
ActionCastSpellAtObject(SPELL_DISPEL_MAGIC,oIntruder);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
SpeakString("WTF! Dispel Error!");
|
||||
}
|
||||
}
|
||||
|
||||
// Melee up sometimes!
|
||||
|
||||
|
||||
if ( d10() == 10 )
|
||||
{
|
||||
switch ( d4() )
|
||||
{
|
||||
case 1:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
|
||||
break;
|
||||
case 2:
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
break;
|
||||
case 3:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
break;
|
||||
case 4:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
|
||||
break;
|
||||
}
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"physical",1);
|
||||
DelayCommand(24.0,SetLocalInt(OBJECT_SELF,"physical",0));
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
8
_module/nss/airlessaura.nss
Normal file
8
_module/nss/airlessaura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
//Set and apply AOE object
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_UNEARTHLY,"airlessaura1","airlessaura2","airlessaura3");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100));
|
||||
}
|
14
_module/nss/airlessaura1.nss
Normal file
14
_module/nss/airlessaura1.nss
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "inc_suffocate"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
object oTarget = GetEnteringObject();
|
||||
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
Suffocate(oTarget);
|
||||
}
|
||||
}
|
18
_module/nss/airlessaura2.nss
Normal file
18
_module/nss/airlessaura2.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "inc_suffocate"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
Suffocate(oTarget);
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
12
_module/nss/airlessaura3.nss
Normal file
12
_module/nss/airlessaura3.nss
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "inc_suffocate"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
//Get the object that is exiting the AOE
|
||||
object oTarget = GetExitingObject();
|
||||
|
||||
GiveBreath(oTarget);
|
||||
}
|
221
_module/nss/anaxim_ai.nss
Normal file
221
_module/nss/anaxim_ai.nss
Normal file
@@ -0,0 +1,221 @@
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
int AttackRanged(object oTarget,int nBonus)
|
||||
{
|
||||
int nRoll = d20();
|
||||
if ( nRoll == 20 && !GetIsImmune(oTarget,IMMUNITY_TYPE_CRITICAL_HIT) )
|
||||
return 2;
|
||||
nRoll += nBonus;
|
||||
int nAC = GetAC(oTarget);
|
||||
|
||||
if ( nRoll >= nAC )
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DoSpecialRangedAttack( object oTarget, object oCaster )
|
||||
{
|
||||
|
||||
SetFacingPoint(GetPosition(oTarget));
|
||||
ActionPlayAnimation(ANIMATION_LOOPING_CONJURE1,1.0,2.0);
|
||||
|
||||
effect eBeam;
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
|
||||
int nDam = d6(10);
|
||||
|
||||
// float fAngle = GetAngleBetweenLocations(GetLocation(oCaster),GetLocation(oTarget));
|
||||
// SetFacing(fAngle);
|
||||
|
||||
|
||||
int nTouch = TouchAttackRanged(oTarget);
|
||||
if ( nTouch == 2 && !GetIsImmune(oTarget,IMMUNITY_TYPE_CRITICAL_HIT))
|
||||
nDam *= 2;
|
||||
|
||||
effect eDamage = EffectDamage(nDam,DAMAGE_TYPE_ELECTRICAL);
|
||||
|
||||
if ( !nTouch )
|
||||
{
|
||||
eBeam = EffectBeam(VFX_BEAM_LIGHTNING,oCaster,BODY_NODE_CHEST,TRUE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBeam,oTarget,1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
eBeam = EffectBeam(VFX_BEAM_LIGHTNING,oCaster,BODY_NODE_CHEST);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBeam,oTarget,1.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget);
|
||||
}
|
||||
|
||||
int nCount;
|
||||
effect eImp = EffectVisualEffect(VFX_COM_BLOOD_SPARK_MEDIUM);
|
||||
effect eDam;
|
||||
effect eMIRV = EffectVisualEffect(359);
|
||||
|
||||
float fDist = GetDistanceBetween(OBJECT_SELF, oTarget);
|
||||
float fDelay = fDist/(3.0 * log(fDist) + 2.0);
|
||||
float fTime;
|
||||
float fDelay2 = 0.0;
|
||||
|
||||
for ( nCount = 1; nCount <= 6; nCount ++ )
|
||||
{
|
||||
nDam = d6(2)+12;
|
||||
nTouch = AttackRanged(oTarget,30);
|
||||
if ( nTouch == 2 )
|
||||
nDam *= 2;
|
||||
|
||||
DelayCommand(fDelay2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eMIRV, oTarget));
|
||||
if ( nTouch )
|
||||
{
|
||||
eDam = EffectDamage(nDam,DAMAGE_TYPE_PIERCING,DAMAGE_POWER_PLUS_EIGHT);
|
||||
fTime = fDelay;
|
||||
fDelay2 += 0.1;
|
||||
fTime += fDelay2;
|
||||
|
||||
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eImp, oTarget));
|
||||
|
||||
|
||||
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
// Play the sound of a dart hitting
|
||||
DelayCommand(fTime, PlaySound("cb_ht_dart1"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DoPhysical( object oTarget, object oCaster )
|
||||
{
|
||||
if ( d4() == 4 )
|
||||
{
|
||||
ClearAllActions();
|
||||
ActionCastSpellAtObject(SPELLABILITY_CONE_SONIC,oTarget,METAMAGIC_ANY,TRUE);
|
||||
return;
|
||||
}
|
||||
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
|
||||
{
|
||||
oTarget = GetNearestEnemy();
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
}
|
||||
// object oEquip = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
|
||||
if ( GetDistanceToObject(oTarget) > FeetToMeters(20.0) )
|
||||
{
|
||||
// if ( !GetIsObjectValid( oEquip ) || !GetWeaponRanged( oEquip ) )
|
||||
// ActionEquipMostDamagingRanged();
|
||||
// ActionAttack(oTarget);
|
||||
SetLocalInt(OBJECT_SELF,"Acting",1);
|
||||
DoSpecialRangedAttack(oTarget,oCaster);
|
||||
DelayCommand(6.0,SetLocalInt(OBJECT_SELF,"Acting",0));
|
||||
DelayCommand(6.1,DetermineCombatRound());
|
||||
}
|
||||
else
|
||||
{
|
||||
// if ( !GetIsObjectValid( oEquip ) || GetWeaponRanged( oEquip ) )
|
||||
// ActionEquipMostDamagingMelee();
|
||||
TalentMeleeAttack(oTarget);
|
||||
}
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetLocalInt(OBJECT_SELF,"Acting") )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
/* if ( d6() == 1 ) // in case they get busy-stuck, also to add randomness
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"busy",FALSE);
|
||||
return;
|
||||
} */
|
||||
// Don't inturupt actions in progress
|
||||
|
||||
|
||||
if ( GetCurrentAction() == ACTION_CASTSPELL )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetLocalInt(OBJECT_SELF,"physical") )
|
||||
{
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
// Haste = Super awesome;
|
||||
// Get those summons in there!
|
||||
int nSummonCount = GetLocalInt(OBJECT_SELF,"SummonCount");
|
||||
if ( !GetIsObjectValid(GetAssociate(ASSOCIATE_TYPE_SUMMONED)) && nSummonCount < 4 )
|
||||
{
|
||||
nSummonCount++;
|
||||
SetLocalInt(OBJECT_SELF,"SummonCount",nSummonCount);
|
||||
ClearAllActions();
|
||||
ActionCastFakeSpellAtLocation(SPELL_SUMMON_CREATURE_IX,GetLocation(OBJECT_SELF));
|
||||
effect eSummon = EffectSummonCreature("NW_GOLIRON",VFX_FNF_SUMMON_MONSTER_3,1.0);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eSummon,GetLocation(OBJECT_SELF),HoursToSeconds(24));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Hostile targeting actions
|
||||
if ( !GetIsObjectValid(oIntruder) || !GetIsReactionTypeHostile(oIntruder) )
|
||||
{
|
||||
oIntruder = GetNearestPerceivedEnemy();
|
||||
if ( !GetIsObjectValid(oIntruder) )
|
||||
return;
|
||||
}
|
||||
|
||||
if ( d3() == 3 )
|
||||
{
|
||||
ClearAllActions();
|
||||
ActionCastSpellAtObject(SPELLABILITY_CONE_SONIC,oIntruder,METAMAGIC_ANY,TRUE);
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
// Melee up sometimes!
|
||||
|
||||
if ( d6() == 6 )
|
||||
{
|
||||
switch ( d4() )
|
||||
{
|
||||
case 1:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
|
||||
break;
|
||||
case 2:
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
break;
|
||||
case 3:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
break;
|
||||
case 4:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
|
||||
break;
|
||||
}
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"physical",1);
|
||||
DelayCommand(24.0,SetLocalInt(OBJECT_SELF,"physical",0));
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
28
_module/nss/angelofdecay_ai.nss
Normal file
28
_module/nss/angelofdecay_ai.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
// ActionCastFakeSpellAtLocation(SPELL_SUMMON_SHADOW,GetLocation(OBJECT_SELF));
|
||||
|
||||
ExecuteScript("rotaura",OBJECT_SELF);
|
||||
|
||||
// SetCreatureOverrideAIScriptFinished();
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
107
_module/nss/aod_hb.nss
Normal file
107
_module/nss/aod_hb.nss
Normal file
@@ -0,0 +1,107 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: NW_C2_DEFAULT1
|
||||
/*
|
||||
Default OnHeartbeat script for NPCs.
|
||||
|
||||
This script causes NPCs to perform default animations
|
||||
while not otherwise engaged.
|
||||
|
||||
This script duplicates the behavior of the default
|
||||
script and just cleans up the code and removes
|
||||
redundant conditional checks.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: Copyright (c) 2002 Floodgate Entertainment
|
||||
//:: Created By: Naomi Novik
|
||||
//:: Created On: 12/22/2002
|
||||
//:://////////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_generic"
|
||||
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"AURA_STATE",0);
|
||||
// * if not runnning normal or better Ai then exit for performance reasons
|
||||
if (GetAILevel() == AI_LEVEL_VERY_LOW) return;
|
||||
|
||||
// Buff ourselves up right away if we should
|
||||
if(GetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY))
|
||||
{
|
||||
// This will return TRUE if an enemy was within 40.0 m
|
||||
// and we buffed ourselves up instantly to respond --
|
||||
// simulates a spellcaster with protections enabled
|
||||
// already.
|
||||
if(TalentAdvancedBuff(40.0))
|
||||
{
|
||||
// This is a one-shot deal
|
||||
SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY, FALSE);
|
||||
|
||||
// This return means we skip sending the user-defined
|
||||
// heartbeat signal in this one case.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(GetHasEffect(EFFECT_TYPE_SLEEP))
|
||||
{
|
||||
// If we're asleep and this is the result of sleeping
|
||||
// at night, apply the floating 'z's visual effect
|
||||
// every so often
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_SLEEPING_AT_NIGHT))
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SLEEP);
|
||||
if(d10() > 6)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we have the 'constant' waypoints flag set, walk to the next
|
||||
// waypoint.
|
||||
else if ( GetWalkCondition(NW_WALK_FLAG_CONSTANT) )
|
||||
{
|
||||
WalkWayPoints();
|
||||
}
|
||||
|
||||
// Check to see if we should be playing default animations
|
||||
// - make sure we don't have any current targets
|
||||
else if ( !GetIsObjectValid(GetAttemptedAttackTarget())
|
||||
&& !GetIsObjectValid(GetAttemptedSpellTarget())
|
||||
// && !GetIsPostOrWalking())
|
||||
&& !GetIsObjectValid(GetNearestSeenEnemy()))
|
||||
{
|
||||
if (GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL) || GetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE) ||
|
||||
GetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE))
|
||||
{
|
||||
// This handles special attacking/fleeing behavior
|
||||
// for omnivores & herbivores.
|
||||
DetermineSpecialBehavior();
|
||||
}
|
||||
else if (!IsInConversation(OBJECT_SELF))
|
||||
{
|
||||
if (GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS)
|
||||
|| GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS_AVIAN)
|
||||
|| GetIsEncounterCreature())
|
||||
{
|
||||
PlayMobileAmbientAnimations();
|
||||
}
|
||||
else if (GetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS))
|
||||
{
|
||||
PlayImmobileAmbientAnimations();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Send the user-defined event signal if specified
|
||||
if(GetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_HEARTBEAT));
|
||||
}
|
||||
|
||||
ExecuteScript("prc_npc_hb", OBJECT_SELF);
|
||||
}
|
||||
|
21
_module/nss/aodrottingtouch.nss
Normal file
21
_module/nss/aodrottingtouch.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if (( nRace == RACIAL_TYPE_CONSTRUCT ) || ( nRace == RACIAL_TYPE_ELEMENTAL )
|
||||
|| ( nRace == RACIAL_TYPE_UNDEAD ))
|
||||
return;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DISEASE_S);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_S);
|
||||
int nDam = d6()+6;
|
||||
effect eRot = EffectDamage(nDam);
|
||||
effect eHeal = EffectHeal(5);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eRot,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oOrigin);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oOrigin);
|
||||
}
|
251
_module/nss/atropal_ai.nss
Normal file
251
_module/nss/atropal_ai.nss
Normal file
@@ -0,0 +1,251 @@
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
#include "nw_i0_spells"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoTouchAttack(object oTarget, object oCaster )
|
||||
{
|
||||
ActionPlayAnimation(ANIMATION_LOOPING_GET_MID,1.0,2.0);
|
||||
|
||||
int nDam = 5;
|
||||
int nHeal = 20;
|
||||
int nRoll = TouchAttackMelee(oTarget,TRUE);
|
||||
|
||||
if ( nRoll == 0 )
|
||||
return;
|
||||
|
||||
// improved critical gives 19-20
|
||||
if ( !GetIsImmune(oTarget,IMMUNITY_TYPE_CRITICAL_HIT) && ( nRoll == 2 || ( nRoll == 1 && d20() == 20 )) )
|
||||
{
|
||||
effect eNegative = EffectDamage(d6(),DAMAGE_TYPE_NEGATIVE);
|
||||
|
||||
// crit hit, overwhelming critical
|
||||
nDam *= 2;
|
||||
nHeal *= 2;
|
||||
int nDC = 10 + GetHitDice(oCaster) / 2 + GetAbilityModifier(ABILITY_STRENGTH,oCaster);
|
||||
FloatingTextStringOnCreature("Devastating Critical!",oTarget);
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_FORT,oTarget,nDC,SAVING_THROW_TYPE_NONE,oCaster) )
|
||||
{
|
||||
effect eHP = EffectDamage(GetMaxHitPoints(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHP,oTarget);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eNegative,oTarget);
|
||||
}
|
||||
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_ABILITY_DECREASE) )
|
||||
return;
|
||||
|
||||
effect eHeal = EffectHeal(nHeal);
|
||||
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_L);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION,nDam);
|
||||
eCon = SupernaturalEffect(eCon);
|
||||
eCon = ExtraordinaryEffect(eCon);
|
||||
|
||||
int bKillEm = FALSE;
|
||||
if ( !GetIsPC(oTarget) || GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES
|
||||
|| GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT )
|
||||
bKillEm = TRUE;
|
||||
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_FORT,oTarget,59,SAVING_THROW_TYPE_NONE,oCaster) )
|
||||
{
|
||||
int nCon = GetAbilityScore(oTarget,ABILITY_CONSTITUTION);
|
||||
if ( ( nCon - nDam ) < 3 && bKillEm )
|
||||
{
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHP = EffectDamage( 9999 , DAMAGE_TYPE_MAGICAL , DAMAGE_POWER_PLUS_TWENTY);
|
||||
effect eDeath = EffectDeath();
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHP,oTarget);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eCon,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHealVis,oCaster);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* void DoEnergyDrainRay(object oTarget, object oCaster )
|
||||
{
|
||||
int nRoll = TouchAttackRanged(oTarget,TRUE);
|
||||
|
||||
effect eBeam;
|
||||
if ( nRoll == 0 )
|
||||
{ // miss
|
||||
eBeam = EffectBeam(VFX_BEAM_EVIL,oCaster,BODY_NODE_CHEST,TRUE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBeam,oTarget,1.5);
|
||||
return;
|
||||
}
|
||||
|
||||
int nDrain = 4;
|
||||
int nHeal = 40;
|
||||
|
||||
if ( !GetIsImmune(oTarget,IMMUNITY_TYPE_CRITICAL_HIT) && ( nRoll == 2 || ( nRoll == 1 && d20() == 20 )) )
|
||||
{
|
||||
nDrain *= 2;
|
||||
nHeal *= 2;
|
||||
}
|
||||
|
||||
eBeam = EffectBeam(VFX_BEAM_EVIL,oCaster,BODY_NODE_CHEST);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBeam,oTarget,1.5);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eDrain = EffectNegativeLevel(nDrain);
|
||||
eDrain = SupernaturalEffect(eDrain);
|
||||
eDrain = ExtraordinaryEffect(eDrain);
|
||||
|
||||
|
||||
effect eHeal = EffectHeal(nHeal);
|
||||
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_L);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDrain,oTarget);
|
||||
if ( !GetIsImmune(oTarget,IMMUNITY_TYPE_NEGATIVE_LEVEL) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHealVis,oCaster);
|
||||
}
|
||||
|
||||
} */
|
||||
|
||||
void DoEnergyDrainRay( object oTarget, object oCaster )
|
||||
{
|
||||
ActionCastSpellAtObject(SPELLABILITY_BOLT_LEVEL_DRAIN,oTarget,METAMAGIC_ANY,TRUE);
|
||||
}
|
||||
void DoPhysical( object oTarget, object oCaster )
|
||||
{
|
||||
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
|
||||
{
|
||||
oTarget = GetNearestEnemy();
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
}
|
||||
if ( GetDistanceToObject(oTarget) > FeetToMeters(20.0) )
|
||||
{
|
||||
// SetLocalInt(OBJECT_SELF,"Acting",1);
|
||||
DoEnergyDrainRay(oTarget,oCaster);
|
||||
// DelayCommand(6.0,SetLocalInt(OBJECT_SELF,"Acting",0));
|
||||
// DelayCommand(6.1,DetermineCombatRound());
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionMoveToObject(oTarget,TRUE);
|
||||
SetLocalInt(OBJECT_SELF,"Acting",1);
|
||||
DelayCommand(0.1,DoTouchAttack(oTarget,oCaster));
|
||||
DelayCommand(3.0,DoTouchAttack(oTarget,oCaster));
|
||||
DelayCommand(6.0,SetLocalInt(OBJECT_SELF,"Acting",0));
|
||||
DelayCommand(6.1,DetermineCombatRound());
|
||||
}
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
|
||||
ExecuteScript(sScript,OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
}
|
||||
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetLocalInt(OBJECT_SELF,"Acting") == 1 )
|
||||
{
|
||||
// SpeakString("I am acting! rawr!");
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
/* if ( d6() == 1 ) // in case they get busy-stuck, also to add randomness
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"busy",FALSE);
|
||||
return;
|
||||
} */
|
||||
// Don't inturupt actions in progress
|
||||
|
||||
|
||||
if ( GetCurrentAction() == ACTION_CASTSPELL )
|
||||
{
|
||||
// SpeakString("I am casting! Rawr!");
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetLocalInt(OBJECT_SELF,"physical") )
|
||||
{
|
||||
// SpeakString("Time to die!");
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
// Haste = Super awesome;
|
||||
// Get those summons in there!
|
||||
int nSummonCount = GetLocalInt(OBJECT_SELF,"SummonCount");
|
||||
if ( !GetIsObjectValid(GetAssociate(ASSOCIATE_TYPE_SUMMONED)) && nSummonCount < 5 )
|
||||
{
|
||||
nSummonCount++;
|
||||
SetLocalInt(OBJECT_SELF,"SummonCount",nSummonCount);
|
||||
ClearAllActions();
|
||||
ActionCastFakeSpellAtLocation(SPELL_SUMMON_CREATURE_IX,GetLocation(OBJECT_SELF));
|
||||
effect eSummon = EffectSummonCreature("Nightcrawler",VFX_FNF_SUMMON_MONSTER_3,1.0);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eSummon,GetLocation(OBJECT_SELF),HoursToSeconds(24));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Hostile targeting actions
|
||||
if ( !GetIsObjectValid(oIntruder) || !GetIsReactionTypeHostile(oIntruder) )
|
||||
{
|
||||
oIntruder = GetNearestPerceivedEnemy();
|
||||
if ( !GetIsObjectValid(oIntruder) )
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Melee up sometimes!
|
||||
|
||||
if ( d6() == 6 )
|
||||
{
|
||||
switch ( d4() )
|
||||
{
|
||||
case 1:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
|
||||
break;
|
||||
case 2:
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
break;
|
||||
case 3:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
break;
|
||||
case 4:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
|
||||
break;
|
||||
}
|
||||
|
||||
// SpeakString("DIEDIEIDE");
|
||||
SetLocalInt(OBJECT_SELF,"physical",1);
|
||||
DelayCommand(24.0,SetLocalInt(OBJECT_SELF,"physical",0));
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
8
_module/nss/atropal_aura.nss
Normal file
8
_module/nss/atropal_aura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
//Set and apply AOE object
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_CIRCGOOD,"atropal_aura1","atropal_aura2","atropal_aura3");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100));
|
||||
}
|
39
_module/nss/atropal_aura1.nss
Normal file
39
_module/nss/atropal_aura1.nss
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eDrain = EffectNegativeLevel(10);
|
||||
effect eDeath = EffectDeath();
|
||||
effect eBoost = EffectTurnResistanceIncrease(20);
|
||||
eBoost = EffectLinkEffects(eBoost,EffectRegenerate(20,6.0));
|
||||
object oTarget = GetEnteringObject();
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if ( GetLocalInt(oTarget,"NEAura") )
|
||||
return;
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
if ( nRace != RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
// if ( GetHitDice(oTarget) <= 10 )
|
||||
// {
|
||||
// location lWight = GetLocation(oTarget);
|
||||
// ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oTarget);
|
||||
// ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
// CreateObject(OBJECT_TYPE_CREATURE,"nw_wight",lWight);
|
||||
// return;
|
||||
// }
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDrain,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
}
|
||||
if ( nRace == RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBoost,oTarget);
|
||||
}
|
||||
SetLocalInt(oTarget,"NEAura",1);
|
||||
}
|
48
_module/nss/atropal_aura2.nss
Normal file
48
_module/nss/atropal_aura2.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eDrain = EffectNegativeLevel(10);
|
||||
effect eDeath = EffectDeath();
|
||||
effect eBoost = EffectTurnResistanceIncrease(20);
|
||||
eBoost = EffectLinkEffects(eBoost,EffectRegenerate(20,6.0));
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if ( GetLocalInt(oTarget,"NEAura") )
|
||||
{
|
||||
oTarget = GetNextInPersistentObject();
|
||||
break;
|
||||
}
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
if ( nRace != RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
// if ( GetHitDice(oTarget) <= 10 )
|
||||
// {
|
||||
// location lWight = GetLocation(oTarget);
|
||||
// ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oTarget);
|
||||
// ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
// CreateObject(OBJECT_TYPE_CREATURE,"nw_wight",lWight);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDrain,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
// }
|
||||
}
|
||||
}
|
||||
if ( nRace == RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBoost,oTarget);
|
||||
}
|
||||
SetLocalInt(oTarget,"NEAura",1);
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
55
_module/nss/atropal_aura3.nss
Normal file
55
_module/nss/atropal_aura3.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
//Get the object that is exiting the AOE
|
||||
object oTarget = GetExitingObject();
|
||||
int bValid = FALSE;
|
||||
int bRegen = FALSE;
|
||||
int bTurn = FALSE;
|
||||
effect eAOE;
|
||||
int nEffectType;
|
||||
object oPC = GetFirstPC();
|
||||
// SendMessageToPC(oPC,"neaura3: OBJECT_SELF = " + GetName(OBJECT_SELF) +
|
||||
// " Creator = " + GetName(GetAreaOfEffectCreator(OBJECT_SELF)) );
|
||||
|
||||
if(GetLocalInt(oTarget,"NEAura"))
|
||||
{
|
||||
//Search through the valid effects on the target.
|
||||
eAOE = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eAOE) && bValid == FALSE)
|
||||
{
|
||||
// SendMessageToPC(oPC,"EffectCreator is "+ GetName(GetEffectCreator(eAOE)));
|
||||
|
||||
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator(OBJECT_SELF))
|
||||
{
|
||||
nEffectType = GetEffectType(eAOE);
|
||||
if ( (nEffectType == EFFECT_TYPE_REGENERATE) ||
|
||||
(nEffectType == EFFECT_TYPE_TURN_RESISTANCE_INCREASE) ||
|
||||
(nEffectType == EFFECT_TYPE_NEGATIVELEVEL) )
|
||||
{
|
||||
//If the effect was created by the Acid_Fog then remove it
|
||||
if(GetEffectSpellId(eAOE) == -1)
|
||||
{
|
||||
RemoveEffect(oTarget, eAOE);
|
||||
if ( nEffectType == EFFECT_TYPE_NEGATIVELEVEL )
|
||||
bValid = TRUE;
|
||||
if ( nEffectType == EFFECT_TYPE_TURN_RESISTANCE_INCREASE )
|
||||
bTurn = TRUE;
|
||||
if ( nEffectType == EFFECT_TYPE_REGENERATE )
|
||||
bRegen = TRUE;
|
||||
if ( bTurn && bRegen )
|
||||
bValid = TRUE;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next effect on the target
|
||||
eAOE = GetNextEffect(oTarget);
|
||||
}
|
||||
SetLocalInt(oTarget,"NEAura",0);
|
||||
}
|
||||
}
|
55
_module/nss/atropaltouch.nss
Normal file
55
_module/nss/atropaltouch.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
|
||||
void DoConDamage(object oTarget, object oCaster)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
int nDam = 5;
|
||||
effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION,nDam);
|
||||
|
||||
effect eHeal = EffectHeal(20);
|
||||
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_L);
|
||||
|
||||
int bKillEm = FALSE;
|
||||
if ( !GetIsPC(oTarget) || GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES
|
||||
|| GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT )
|
||||
bKillEm = TRUE;
|
||||
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_FORT,oTarget,59,SAVING_THROW_TYPE_NONE,oCaster) )
|
||||
{
|
||||
int nCon = GetAbilityScore(oTarget,ABILITY_CONSTITUTION);
|
||||
if ( ( nCon - nDam ) < 3 && bKillEm )
|
||||
{
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHP = EffectDamage( 9999, DAMAGE_TYPE_MAGICAL , DAMAGE_POWER_PLUS_TWENTY);
|
||||
effect eDeath = EffectDeath();
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHP,oTarget);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eCon,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHealVis,oCaster);
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
object oCaster = OBJECT_SELF;
|
||||
|
||||
/* int bIsPoisoned = GetLocalInt(oTarget,"IsPoisoned");
|
||||
if ( bIsPoisoned )
|
||||
return; */
|
||||
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_ABILITY_DECREASE) )
|
||||
{
|
||||
SendMessageToPC(oTarget,"Immune to ability drain.");
|
||||
return;
|
||||
}
|
||||
|
||||
DelayCommand(0.1,DoConDamage(oTarget,oCaster));
|
||||
|
||||
}
|
45
_module/nss/aura_ai.nss
Normal file
45
_module/nss/aura_ai.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
// ActionCastFakeSpellAtLocation(SPELL_SUMMON_SHADOW,GetLocation(OBJECT_SELF));
|
||||
|
||||
|
||||
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
|
||||
// SpeakString("Running script " + sScript,TALKVOLUME_SHOUT);
|
||||
|
||||
// ClearAllActions();
|
||||
ExecuteScript(sScript,OBJECT_SELF);
|
||||
|
||||
// SetCreatureOverrideAIScriptFinished();
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
return;
|
||||
}
|
||||
if ( TalentSummonAllies() )
|
||||
{
|
||||
// SpeakString("Calling TalentSummonAllies!");
|
||||
// SpeakString("Summoned Monster = " + GetName(GetAssociate(ASSOCIATE_TYPE_SUMMONED)) );
|
||||
|
||||
// SpeakString("Come to my side! Battle awaits!");
|
||||
PlayVoiceChat(VOICE_CHAT_HELP);
|
||||
// SetLocalInt(OBJECT_SELF,"busy",TRUE);
|
||||
// ActionDoCommand(SetLocalInt(OBJECT_SELF,"busy",FALSE));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
31
_module/nss/blaspheme_bite.nss
Normal file
31
_module/nss/blaspheme_bite.nss
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoStrDamage( object oTarget )
|
||||
{
|
||||
int nDam = d6();
|
||||
effect eStr = EffectAbilityDecrease(ABILITY_STRENGTH, nDam);
|
||||
eStr = SupernaturalEffect(eStr);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eStr,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
int nAlign = GetAlignmentGoodEvil(oTarget);
|
||||
if ( nAlign == ALIGNMENT_EVIL )
|
||||
return;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eDaze = EffectDazed();
|
||||
effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eDaze,eVis2);
|
||||
eLink = EffectLinkEffects(eLink,eDur);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
// ApplyEffectToObject(DURATION_TYPE_PERMANENT,eStr,oTarget);
|
||||
DelayCommand(0.1, DoStrDamage(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oTarget,RoundsToSeconds(1));
|
||||
}
|
12
_module/nss/bleakaura.nss
Normal file
12
_module/nss/bleakaura.nss
Normal file
@@ -0,0 +1,12 @@
|
||||
void main()
|
||||
{
|
||||
//Set and apply AOE object
|
||||
effect eCold = EffectDamageShield(0,DAMAGE_BONUS_1d6,DAMAGE_TYPE_COLD);
|
||||
eCold = SupernaturalEffect(eCold);
|
||||
eCold = ExtraordinaryEffect(eCold);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCold, OBJECT_SELF);
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_FROST,"bleakaura1","bleakaura2","rotaura2");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100));
|
||||
}
|
35
_module/nss/bleakaura1.nss
Normal file
35
_module/nss/bleakaura1.nss
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_HEALING_S);
|
||||
effect eHeal = EffectHeal(10);
|
||||
object oTarget = GetEnteringObject();
|
||||
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
int nDam;
|
||||
|
||||
if ( PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 16, SAVING_THROW_TYPE_COLD, oCaster) )
|
||||
nDam = d6();
|
||||
else
|
||||
nDam = d6(2);
|
||||
if ( nDam > 0 )
|
||||
{
|
||||
effect eDam = EffectDamage(nDam,DAMAGE_TYPE_COLD);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDam,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
int nFlag = GetLocalInt(oCaster,"AURA_STATE");
|
||||
if ( nFlag == 0 )
|
||||
{
|
||||
SetLocalInt(oCaster,"AURA_STATE",1);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oCaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
39
_module/nss/bleakaura2.nss
Normal file
39
_module/nss/bleakaura2.nss
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDam;
|
||||
effect eDam;
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_HEALING_S);
|
||||
effect eHeal = EffectHeal(10);
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
|
||||
if ( PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 16, SAVING_THROW_TYPE_COLD, oCaster) )
|
||||
nDam = d6();
|
||||
else
|
||||
nDam = d6(2);
|
||||
if ( nDam > 0 )
|
||||
{
|
||||
eDam = EffectDamage(nDam,DAMAGE_TYPE_COLD);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDam,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
int nFlag = GetLocalInt(oCaster,"AURA_STATE");
|
||||
if ( nFlag == 0 )
|
||||
{
|
||||
SetLocalInt(oCaster,"AURA_STATE",1);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oCaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
46
_module/nss/bloodcall.nss
Normal file
46
_module/nss/bloodcall.nss
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoConDamage(object oTarget, object oOrigin )
|
||||
{
|
||||
int nKillEm = 0;
|
||||
if ( (!GetIsPC( oTarget ) ) || ( GetGameDifficulty() >= GAME_DIFFICULTY_CORE_RULES ) )
|
||||
{
|
||||
nKillEm = 1;
|
||||
}
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBeam = EffectBeam(VFX_BEAM_SILENT_EVIL,oOrigin,BODY_NODE_CHEST);
|
||||
int nDam = d4();
|
||||
effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION, nDam);
|
||||
eCon = SupernaturalEffect(eCon);
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_ABILITY_DECREASE) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eCon,oTarget);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetAbilityScore(oTarget,ABILITY_CONSTITUTION) - nDam < 3 && nKillEm )
|
||||
{
|
||||
int nHitPoints = GetCurrentHitPoints(oTarget);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHitDamage = EffectDamage(nHitPoints, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHitDamage, oTarget);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eCon,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBeam,oTarget,1.5);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if ( nRace == RACIAL_TYPE_UNDEAD || nRace == RACIAL_TYPE_CONSTRUCT ||
|
||||
nRace == RACIAL_TYPE_OOZE || nRace == RACIAL_TYPE_ELEMENTAL )
|
||||
return;
|
||||
|
||||
DelayCommand(0.1,DoConDamage(oTarget,oOrigin));
|
||||
}
|
66
_module/nss/bloodspawn.nss
Normal file
66
_module/nss/bloodspawn.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_spawn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default On Spawn script
|
||||
|
||||
|
||||
2003-07-28: Georg Zoeller:
|
||||
|
||||
If you set a ninteger on the creature named
|
||||
"X2_USERDEFINED_ONSPAWN_EVENTS"
|
||||
The creature will fire a pre and a post-spawn
|
||||
event on itself, depending on the value of that
|
||||
variable
|
||||
1 - Fire Userdefined Event 1510 (pre spawn)
|
||||
2 - Fire Userdefined Event 1511 (post spawn)
|
||||
3 - Fire both events
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner, Georg Zoeller
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||||
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// User defined OnSpawn event requested?
|
||||
int nSpecEvent = GetLocalInt(OBJECT_SELF,"X2_USERDEFINED_ONSPAWN_EVENTS");
|
||||
|
||||
// Pre Spawn Event requested
|
||||
if (nSpecEvent == 1 || nSpecEvent == 3 )
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
}
|
||||
|
||||
/* Fix for the new golems to reduce their number of attacks */
|
||||
|
||||
int nNumber = GetLocalInt(OBJECT_SELF,CREATURE_VAR_NUMBER_OF_ATTACKS);
|
||||
if (nNumber >0 )
|
||||
{
|
||||
SetBaseAttackBonus(nNumber);
|
||||
}
|
||||
|
||||
// Execute default OnSpawn script.
|
||||
ExecuteScript("nw_c2_default9", OBJECT_SELF);
|
||||
|
||||
|
||||
//Post Spawn event requeste
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF);
|
||||
|
||||
|
||||
}
|
85
_module/nss/bonesubsumption.nss
Normal file
85
_module/nss/bonesubsumption.nss
Normal file
@@ -0,0 +1,85 @@
|
||||
//#include "x0_i0_spells"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void doSubmDamage(object oTarget)
|
||||
{
|
||||
/* object oDebug = GetObjectByTag("LookHere");
|
||||
if ( oDebug != OBJECT_INVALID )
|
||||
{
|
||||
effect eDeb = EffectVisualEffect(VFX_IMP_DOOM);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeb,oDebug);
|
||||
} */
|
||||
int nKillEm = 0;
|
||||
if ( (!GetIsPC( oTarget ) ) || ( GetGameDifficulty() >= GAME_DIFFICULTY_CORE_RULES ) )
|
||||
{
|
||||
nKillEm = 1;
|
||||
}
|
||||
int nRoll = d4(2);
|
||||
effect eStr = EffectAbilityDecrease(ABILITY_STRENGTH,nRoll);
|
||||
int nTargetAbility = GetAbilityScore(oTarget, ABILITY_STRENGTH);
|
||||
if ( ( (nTargetAbility - nRoll) < 3) && nKillEm )
|
||||
{
|
||||
int nHitPoints = GetCurrentHitPoints(oTarget);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DESTRUCTION);
|
||||
effect eHitDamage = EffectDamage(nHitPoints, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHitDamage, oTarget);
|
||||
}
|
||||
|
||||
nRoll = d4(2);
|
||||
effect eDex = EffectAbilityDecrease(ABILITY_DEXTERITY,nRoll);
|
||||
|
||||
nRoll = d4(2);
|
||||
effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION,nRoll);
|
||||
eStr = ExtraordinaryEffect(eStr);
|
||||
eDex = ExtraordinaryEffect(eDex);
|
||||
eCon = ExtraordinaryEffect(eCon);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eStr,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDex,oTarget);
|
||||
int nType = GetRacialType(oTarget);
|
||||
if ( nType != RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
nTargetAbility = GetAbilityScore(oTarget, ABILITY_CONSTITUTION);
|
||||
if ( ( (nTargetAbility - nRoll) < 3) && nKillEm )
|
||||
{
|
||||
int nHitPoints = GetCurrentHitPoints(oTarget);
|
||||
effect eHitDamage = EffectDamage(nHitPoints, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHitDamage, oTarget);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eCon,oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
// object oSpellOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
// Must check to see if target has bones
|
||||
int nRaceType = GetRacialType(oTarget);
|
||||
if (( nRaceType == RACIAL_TYPE_ELEMENTAL ) || ( nRaceType == RACIAL_TYPE_CONSTRUCT )
|
||||
|| ( nRaceType == RACIAL_TYPE_OOZE ) )
|
||||
return;
|
||||
// Ghosts don't have bones :P
|
||||
int nAppearType = GetAppearanceType(oTarget);
|
||||
if (( nAppearType == APPEARANCE_TYPE_ALLIP ) || ( nAppearType == APPEARANCE_TYPE_LANTERN_ARCHON )
|
||||
|| ( nAppearType == APPEARANCE_TYPE_SHADOW ) || ( nAppearType == APPEARANCE_TYPE_SHADOW_FIEND )
|
||||
|| ( nAppearType == APPEARANCE_TYPE_SPECTRE ) || ( nAppearType == APPEARANCE_TYPE_WRAITH ))
|
||||
return;
|
||||
int nSave;
|
||||
// Will save for undead, fort for everyone else
|
||||
if ( nRaceType == RACIAL_TYPE_UNDEAD )
|
||||
nSave = WillSave( oTarget, 22 );
|
||||
else
|
||||
nSave = FortitudeSave( oTarget, 22 );
|
||||
if ( nSave )
|
||||
return;
|
||||
effect eVis = EffectVisualEffect(VFX_COM_CHUNK_RED_LARGE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
DelayCommand(0.1,doSubmDamage(oTarget));
|
||||
|
||||
}
|
53
_module/nss/boneyard_ai.nss
Normal file
53
_module/nss/boneyard_ai.nss
Normal file
@@ -0,0 +1,53 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Custom AI Demo Template
|
||||
//:: x2_ai_demo
|
||||
//:: Copyright (c) 2003 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This is a template for those who want to
|
||||
override the standard combat AI NWN uses.
|
||||
|
||||
The code in this file effectivly replaces
|
||||
the DetermineCombatRound() function in
|
||||
nw_i0_generic.nss, which is the core of the
|
||||
NWN combat AI.
|
||||
|
||||
To override the default AI with this or any
|
||||
other AI script you created, you can either
|
||||
call the SetCreatureOverrideAIScript from
|
||||
x2_inc_switches
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Georg Zoeller
|
||||
//:: Created On: 2003-08-21
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
int bSummoned = GetLocalInt(OBJECT_SELF,"bones");
|
||||
if ( !bSummoned )
|
||||
{
|
||||
// ActionCastFakeSpellAtLocation(SPELL_SUMMON_SHADOW,GetLocation(OBJECT_SELF));
|
||||
|
||||
ExecuteScript("summon_skelies",OBJECT_SELF);
|
||||
|
||||
// SetCreatureOverrideAIScriptFinished();
|
||||
SetLocalInt(OBJECT_SELF,"bones",1);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
66
_module/nss/boneyard_ud.nss
Normal file
66
_module/nss/boneyard_ud.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_userdef
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default On User Defined Event script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||||
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
void main()
|
||||
{
|
||||
int nUser = GetUserDefinedEventNumber();
|
||||
|
||||
if(nUser == EVENT_HEARTBEAT ) //HEARTBEAT
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_PERCEIVE) // PERCEIVE
|
||||
{
|
||||
object oPC = GetFirstPC();
|
||||
FloatingTextStringOnCreature("Boneyard spotted you!",oPC);
|
||||
location lTarget = GetLocation(OBJECT_SELF);
|
||||
ActionCastSpellAtLocation(806,lTarget);
|
||||
}
|
||||
else if(nUser == EVENT_END_COMBAT_ROUND) // END OF COMBAT
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_DIALOGUE) // ON DIALOGUE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_ATTACKED) // ATTACKED
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_DAMAGED) // DAMAGED
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1007) // DEATH - do not use for critical code, does not fire reliably all the time
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_DISTURBED) // DISTURBED
|
||||
{
|
||||
|
||||
}
|
||||
else if (nUser == EVENT_USER_DEFINED_PRESPAWN)
|
||||
{
|
||||
|
||||
}
|
||||
else if (nUser == EVENT_USER_DEFINED_POSTSPAWN)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
31
_module/nss/cha_drain.nss
Normal file
31
_module/nss/cha_drain.nss
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoChaDamage(object oTarget,object oOrigin)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_S);
|
||||
int nDam = d6();
|
||||
effect eRot = EffectAbilityDecrease(ABILITY_CHARISMA,nDam);
|
||||
effect eHeal = EffectHeal(5);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eRot,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oOrigin);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oOrigin);
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_ABILITY_DECREASE) )
|
||||
return;
|
||||
|
||||
if ( PRCMySavingThrow(SAVING_THROW_FORT,oTarget,18) )
|
||||
return;
|
||||
|
||||
DelayCommand(0.1,DoChaDamage(oTarget,oOrigin));
|
||||
}
|
8
_module/nss/charm_aura.nss
Normal file
8
_module/nss/charm_aura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_UNNATURAL,"charm_aura1","charm_aura2","null");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,HoursToSeconds(100));
|
||||
}
|
34
_module/nss/charm_aura1.nss
Normal file
34
_module/nss/charm_aura1.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetEnteringObject();
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
int nLevel = GetHitDice(oCaster);
|
||||
int nDC = 10 + nLevel / 2 + GetAbilityModifier(ABILITY_CHARISMA,oCaster);
|
||||
|
||||
|
||||
if ( nLevel > 20 )
|
||||
nLevel = 20;
|
||||
|
||||
float fDuration = HoursToSeconds(nLevel);
|
||||
|
||||
if ( !GetIsEnemy(oTarget,oCaster) || oTarget == oCaster )
|
||||
return;
|
||||
|
||||
effect eCharm = EffectCharmed();
|
||||
effect eImp = EffectVisualEffect(VFX_IMP_CHARM);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eCharm,eVis);
|
||||
eLink = EffectLinkEffects(eLink,eDur);
|
||||
|
||||
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,nDC,SAVING_THROW_TYPE_MIND_SPELLS,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eImp,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oTarget,fDuration);
|
||||
}
|
||||
}
|
36
_module/nss/charm_aura2.nss
Normal file
36
_module/nss/charm_aura2.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
int nLevel = GetHitDice(oCaster);
|
||||
int nDC = 10 + nLevel / 2 + GetAbilityModifier(ABILITY_CHARISMA,oCaster);
|
||||
|
||||
if ( nLevel > 20 )
|
||||
nLevel = 20;
|
||||
|
||||
float fDuration = HoursToSeconds(nLevel);
|
||||
|
||||
effect eCharm = EffectCharmed();
|
||||
effect eImp = EffectVisualEffect(VFX_IMP_CHARM);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eCharm,eVis);
|
||||
eLink = EffectLinkEffects(eLink,eDur);
|
||||
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
while ( GetIsObjectValid(oTarget) )
|
||||
{
|
||||
if ( oTarget != oCaster && GetIsEnemy(oTarget,oCaster) )
|
||||
{
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,nDC,SAVING_THROW_TYPE_MIND_SPELLS,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eImp,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oTarget,fDuration);
|
||||
}
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
132
_module/nss/chic_ai.nss
Normal file
132
_module/nss/chic_ai.nss
Normal file
@@ -0,0 +1,132 @@
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void DoPhysical( object oTarget, object oCaster )
|
||||
{
|
||||
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
|
||||
{
|
||||
oTarget = GetNearestEnemy();
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
}
|
||||
TalentMeleeAttack(oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
|
||||
if ( sScript != "" )
|
||||
ExecuteScript(sScript,OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
}
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetLocalInt(OBJECT_SELF,"Acting") )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
/* if ( d6() == 1 ) // in case they get busy-stuck, also to add randomness
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"busy",FALSE);
|
||||
return;
|
||||
} */
|
||||
// Don't inturupt actions in progress
|
||||
|
||||
|
||||
if ( GetCurrentAction() == ACTION_CASTSPELL )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetLocalInt(OBJECT_SELF,"physical") )
|
||||
{
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
// Haste = Super awesome;
|
||||
// Get those summons in there!
|
||||
int nSummonCount = GetLocalInt(OBJECT_SELF,"SummonCount");
|
||||
if ( !GetIsObjectValid(GetAssociate(ASSOCIATE_TYPE_SUMMONED)) && nSummonCount < 3 )
|
||||
{
|
||||
nSummonCount++;
|
||||
SetLocalInt(OBJECT_SELF,"SummonCount",nSummonCount);
|
||||
ClearAllActions();
|
||||
ActionCastFakeSpellAtLocation(SPELL_SUMMON_CREATURE_IX,GetLocation(OBJECT_SELF));
|
||||
effect eSummon = EffectSummonCreature("NW_AIRELDER",VFX_FNF_SUMMON_MONSTER_3,1.0);
|
||||
|
||||
location lSelf;
|
||||
object oTarget = FindSingleRangedTarget();
|
||||
if(GetIsObjectValid(oIntruder))
|
||||
{
|
||||
vector vTarget = GetPosition(oIntruder);
|
||||
vector vSource = GetPosition(OBJECT_SELF);
|
||||
vector vDirection = vTarget - vSource;
|
||||
float fDistance = VectorMagnitude(vDirection) / 2.0f;
|
||||
vector vPoint = VectorNormalize(vDirection) * fDistance + vSource;
|
||||
lSelf = Location(GetArea(OBJECT_SELF), vPoint, GetFacing(OBJECT_SELF));
|
||||
//lSelf = GetLocation(oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
lSelf = GetLocation(OBJECT_SELF);
|
||||
}
|
||||
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eSummon,lSelf,HoursToSeconds(24));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Hostile targeting actions
|
||||
if ( !GetIsObjectValid(oIntruder) || !GetIsReactionTypeHostile(oIntruder) )
|
||||
{
|
||||
oIntruder = GetNearestPerceivedEnemy();
|
||||
if ( !GetIsObjectValid(oIntruder) )
|
||||
return;
|
||||
}
|
||||
|
||||
// Melee up sometimes!
|
||||
|
||||
if ( d6() == 6 )
|
||||
{
|
||||
switch ( d4() )
|
||||
{
|
||||
case 1:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
|
||||
break;
|
||||
case 2:
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
break;
|
||||
case 3:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
break;
|
||||
case 4:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
|
||||
break;
|
||||
}
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"physical",1);
|
||||
DelayCommand(24.0,SetLocalInt(OBJECT_SELF,"physical",0));
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
8
_module/nss/cold_aura.nss
Normal file
8
_module/nss/cold_aura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_DRAGON_FEAR,"cold_aura1","cold_aura2","null");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,HoursToSeconds(100));
|
||||
}
|
14
_module/nss/cold_aura1.nss
Normal file
14
_module/nss/cold_aura1.nss
Normal file
@@ -0,0 +1,14 @@
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetEnteringObject();
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
if ( !GetIsEnemy(oTarget,oCaster) || oTarget == oCaster )
|
||||
return;
|
||||
|
||||
effect eAcid = EffectDamage(d6(2),DAMAGE_TYPE_COLD);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eAcid,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
21
_module/nss/cold_aura2.nss
Normal file
21
_module/nss/cold_aura2.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
void main()
|
||||
{
|
||||
effect eAcid;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
|
||||
while ( GetIsObjectValid(oTarget ) )
|
||||
{
|
||||
if ( GetIsEnemy(oTarget,oCaster) )
|
||||
{
|
||||
eAcid = EffectDamage(d6(2),DAMAGE_TYPE_COLD);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eAcid,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
52
_module/nss/cr_bloodfly_hb.nss
Normal file
52
_module/nss/cr_bloodfly_hb.nss
Normal file
@@ -0,0 +1,52 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:://
|
||||
/*
|
||||
cr_bloodfly_hb.nss | Jaysyn 20230812
|
||||
|
||||
Battle Damage. Changes swarm model as HP
|
||||
increases and decreases.
|
||||
|
||||
*/
|
||||
//:://
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oSwarm = OBJECT_SELF;
|
||||
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
|
||||
|
||||
int nMaxHP = GetMaxHitPoints(oSwarm);
|
||||
int nHP = GetCurrentHitPoints(oSwarm);
|
||||
int nAppearance;
|
||||
|
||||
float fHealth = 100 * nHP / IntToFloat(nMaxHP);
|
||||
|
||||
effect eGhost = EffectCutsceneGhost();
|
||||
effect eInvis = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY);
|
||||
|
||||
|
||||
if (fHealth <= 32.0f)
|
||||
{
|
||||
nAppearance = 910; //:: Swarm, Red Flies / 05 Bugs / Tiny [Acidchalk]
|
||||
//SendMessageToPC(oPC, "Switching to Swarm, Tiny 5 Creatures");
|
||||
//SendMessageToAllDMs("Switching to Swarm, Tiny 5 Creatures");
|
||||
}
|
||||
else if (fHealth >= 33.0f && fHealth <= 65.0f)
|
||||
{
|
||||
nAppearance = 911; //:: Swarm, Red Flies / 10 Bugs / Tiny [Acidchalk]
|
||||
//SendMessageToPC(oPC, "Switching to Swarm, Tiny 10 Creatures");
|
||||
//SendMessageToAllDMs("Switching to Swarm, Tiny 10 Creatures");
|
||||
}
|
||||
else
|
||||
{
|
||||
nAppearance = 912; //:: Swarm, Red Flies / 15 Bugs / Tiny [Acidchalk]
|
||||
//SendMessageToPC(oPC, "Switching to Swarm, Tiny 15 Creatures");
|
||||
//endMessageToAllDMs("Switching to Swarm, Tiny 15 Creatures");
|
||||
}
|
||||
|
||||
DelayCommand(0.0f, SetCreatureAppearanceType(oSwarm, nAppearance));
|
||||
DelayCommand(0.1f, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, oSwarm));
|
||||
//DelayCommand(0.1f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oSwarm, 0.1f));
|
||||
DelayCommand(0.3f,AssignCommand(oSwarm, ActionPlayAnimation(ANIMATION_LOOPING_PAUSE, 1.0f, 1.0f)));
|
||||
}
|
8
_module/nss/death_aura.nss
Normal file
8
_module/nss/death_aura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_UNEARTHLY,"death_aura1","null","null");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,HoursToSeconds(100));
|
||||
}
|
34
_module/nss/death_aura1.nss
Normal file
34
_module/nss/death_aura1.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetEnteringObject();
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
int nLevel = GetHitDice(oCaster);
|
||||
int nDC = 10 + nLevel / 2 + GetAbilityModifier(ABILITY_CHARISMA,oCaster);
|
||||
|
||||
|
||||
if ( !GetIsEnemy(oTarget,oCaster) || oTarget == oCaster )
|
||||
return;
|
||||
|
||||
effect eDeath = EffectDeath();
|
||||
eDeath = SupernaturalEffect(eDeath);
|
||||
effect eImp = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
|
||||
|
||||
// Protection from evil wards against effect
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_FEAR) ||
|
||||
GetIsImmune(oTarget,IMMUNITY_TYPE_MIND_SPELLS) ||
|
||||
GetHasSpellEffect(SPELL_PROTECTION_FROM_EVIL,oTarget) ||
|
||||
GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL,oTarget) ||
|
||||
GetHasSpellEffect(SPELL_HOLY_AURA,oTarget) )
|
||||
return;
|
||||
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,nDC,SAVING_THROW_TYPE_MIND_SPELLS,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eImp,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
}
|
||||
}
|
68
_module/nss/desecrating_aur1.nss
Normal file
68
_module/nss/desecrating_aur1.nss
Normal file
@@ -0,0 +1,68 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
int GetHasEffect(object oObject, int nEffectType)
|
||||
{
|
||||
effect eEffect = GetFirstEffect(oObject);
|
||||
while ( GetIsEffectValid(eEffect) )
|
||||
{
|
||||
if ( GetEffectType(eEffect) == nEffectType )
|
||||
return TRUE;
|
||||
eEffect = GetNextEffect(oObject);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
object oTarget = GetEnteringObject();
|
||||
|
||||
int nDC = 10 + GetHitDice(oCaster) /2 + GetAbilityModifier(ABILITY_CHARISMA,oCaster);
|
||||
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROTECTION_EVIL_MINOR);
|
||||
effect eAttack = EffectAttackIncrease(2);
|
||||
effect eDamage = EffectDamageIncrease(2);
|
||||
effect eSaves1 = EffectSavingThrowIncrease(SAVING_THROW_WILL,2);
|
||||
effect eSaves2 = EffectSavingThrowIncrease(SAVING_THROW_REFLEX,2);
|
||||
effect eHP = EffectAbilityIncrease(ABILITY_CONSTITUTION,4);
|
||||
effect eLink = EffectLinkEffects(eAttack,eDamage);
|
||||
eLink = EffectLinkEffects(eLink,eSaves1);
|
||||
eLink = EffectLinkEffects(eLink,eSaves2);
|
||||
eLink = EffectLinkEffects(eLink,eHP);
|
||||
eLink = EffectLinkEffects(eLink,eVis);
|
||||
|
||||
effect eFear = EffectParalyze();
|
||||
effect eFearVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink2 = EffectLinkEffects(eFear,eFearVis);
|
||||
eLink2 = EffectLinkEffects(eLink2,eDur);
|
||||
|
||||
|
||||
// Fear Aura
|
||||
if ( GetIsEnemy(oTarget,oCaster) && GetLocalInt(oCaster,"FEAR_AURA") )
|
||||
{
|
||||
if ( !GetIsImmune(oTarget,IMMUNITY_TYPE_FEAR) )
|
||||
{
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,nDC,SAVING_THROW_TYPE_FEAR,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink2,oTarget,RoundsToSeconds(d8()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetLocalInt(oTarget,"TurnPenalty",1);
|
||||
|
||||
|
||||
// Descecrating Aura
|
||||
if ( GetLocalInt(oTarget,"DEAura") )
|
||||
return;
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if ( nRace == RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eLink,oTarget);
|
||||
SetLocalInt(oTarget,"DEAura",1);
|
||||
}
|
||||
}
|
37
_module/nss/desecrating_aur2.nss
Normal file
37
_module/nss/desecrating_aur2.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROTECTION_EVIL_MINOR);
|
||||
effect eAttack = EffectAttackIncrease(2);
|
||||
effect eDamage = EffectDamageIncrease(2);
|
||||
effect eSaves1 = EffectSavingThrowIncrease(SAVING_THROW_WILL,2);
|
||||
effect eSaves2 = EffectSavingThrowIncrease(SAVING_THROW_REFLEX,2);
|
||||
effect eHP = EffectAbilityIncrease(ABILITY_CONSTITUTION,4);
|
||||
effect eLink = EffectLinkEffects(eAttack,eDamage);
|
||||
eLink = EffectLinkEffects(eLink,eSaves1);
|
||||
eLink = EffectLinkEffects(eLink,eSaves2);
|
||||
eLink = EffectLinkEffects(eLink,eHP);
|
||||
eLink = EffectLinkEffects(eLink,eVis);
|
||||
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
SetLocalInt(oTarget,"TurnPenalty",1);
|
||||
if ( !GetLocalInt(oTarget,"DEAura") )
|
||||
{
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if ( nRace == RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eLink,oTarget);
|
||||
SetLocalInt(oTarget,"DEAura",1);
|
||||
}
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
78
_module/nss/desecrating_aur3.nss
Normal file
78
_module/nss/desecrating_aur3.nss
Normal file
@@ -0,0 +1,78 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
//Get the object that is exiting the AOE
|
||||
object oTarget = GetExitingObject();
|
||||
int bValid = FALSE;
|
||||
int bAttack = FALSE;
|
||||
int bDamage = FALSE;
|
||||
int bCon = FALSE;
|
||||
int bSaves = FALSE;
|
||||
int bVis = FALSE;
|
||||
|
||||
effect eAOE;
|
||||
int nEffectType;
|
||||
|
||||
DeleteLocalInt(oTarget,"TurnPenalty");
|
||||
|
||||
if(GetLocalInt(oTarget,"DEAura") == 1)
|
||||
{
|
||||
//Search through the valid effects on the target.
|
||||
eAOE = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eAOE) && bValid == FALSE)
|
||||
{
|
||||
// SendMessageToPC(oPC,"EffectCreator is "+ GetName(GetEffectCreator(eAOE)));
|
||||
|
||||
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator(OBJECT_SELF))
|
||||
{
|
||||
nEffectType = GetEffectType(eAOE);
|
||||
if ( (nEffectType == EFFECT_TYPE_ATTACK_INCREASE) ||
|
||||
(nEffectType == EFFECT_TYPE_DAMAGE_INCREASE) ||
|
||||
(nEffectType == EFFECT_TYPE_SAVING_THROW_INCREASE) ||
|
||||
(nEffectType == EFFECT_TYPE_VISUALEFFECT) ||
|
||||
(nEffectType == EFFECT_TYPE_ABILITY_INCREASE) )
|
||||
{
|
||||
//If the effect was created by the Acid_Fog then remove it
|
||||
if(GetEffectSpellId(eAOE) == -1)
|
||||
{
|
||||
RemoveEffect(oTarget, eAOE);
|
||||
if ( nEffectType == EFFECT_TYPE_ATTACK_INCREASE )
|
||||
{
|
||||
bAttack = TRUE;
|
||||
// AssignCommand(oTarget,SpeakString("Removed Attack"));
|
||||
}
|
||||
if ( nEffectType == EFFECT_TYPE_DAMAGE_INCREASE )
|
||||
{
|
||||
bDamage = TRUE;
|
||||
// AssignCommand(oTarget,SpeakString("Removed Damage"));
|
||||
}
|
||||
if ( nEffectType == EFFECT_TYPE_SAVING_THROW_INCREASE )
|
||||
{
|
||||
bSaves = TRUE;
|
||||
// AssignCommand(oTarget,SpeakString("Removed Saves"));
|
||||
}
|
||||
if ( nEffectType == EFFECT_TYPE_ABILITY_INCREASE )
|
||||
{
|
||||
bCon = TRUE;
|
||||
// AssignCommand(oTarget,SpeakString("Removed Ability"));
|
||||
}
|
||||
if ( nEffectType == EFFECT_TYPE_VISUALEFFECT )
|
||||
{
|
||||
// AssignCommand(oTarget,SpeakString("Removed VFX"));
|
||||
bVis = TRUE;
|
||||
}
|
||||
if ( bAttack || bDamage || bSaves || bCon || bVis )
|
||||
bValid = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next effect on the target
|
||||
eAOE = GetNextEffect(oTarget);
|
||||
}
|
||||
if ( GetLocalInt(oTarget,"DEAura") != 2 )
|
||||
SetLocalInt(oTarget,"DEAura",0);
|
||||
}
|
||||
}
|
28
_module/nss/desecrating_aura.nss
Normal file
28
_module/nss/desecrating_aura.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
void main()
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"DEAura",2);
|
||||
//Set and apply AOE object
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_CIRCGOOD,"desecrating_aur1","desecrating_aur2","desecrating_aur3");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100));
|
||||
|
||||
|
||||
|
||||
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROTECTION_EVIL_MINOR);
|
||||
effect eAttack = EffectAttackIncrease(2);
|
||||
effect eDamage = EffectDamageIncrease(2);
|
||||
effect eSaves1 = EffectSavingThrowIncrease(SAVING_THROW_WILL,2);
|
||||
effect eSaves2 = EffectSavingThrowIncrease(SAVING_THROW_REFLEX,2);
|
||||
effect eHP = EffectAbilityIncrease(ABILITY_CONSTITUTION,4);
|
||||
effect eLink = EffectLinkEffects(eAttack,eDamage);
|
||||
eLink = EffectLinkEffects(eLink,eSaves1);
|
||||
eLink = EffectLinkEffects(eLink,eSaves2);
|
||||
eLink = EffectLinkEffects(eLink,eHP);
|
||||
eLink = EffectLinkEffects(eLink,eVis);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eLink,OBJECT_SELF);
|
||||
}
|
13
_module/nss/drainingmelody.nss
Normal file
13
_module/nss/drainingmelody.nss
Normal file
@@ -0,0 +1,13 @@
|
||||
void main()
|
||||
{
|
||||
//Set and apply AOE object
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_INVISIBILITY);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis, OBJECT_SELF);
|
||||
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_DRAGON_FEAR,"melody1","melody2","melody3");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100));
|
||||
}
|
112
_module/nss/dream_ai.nss
Normal file
112
_module/nss/dream_ai.nss
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void DoPhysical( object oTarget, object oCaster )
|
||||
{
|
||||
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
|
||||
{
|
||||
oTarget = GetNearestEnemy();
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
}
|
||||
TalentMeleeAttack(oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
|
||||
ExecuteScript(sScript,OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
}
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetLocalInt(OBJECT_SELF,"Acting") )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
/* if ( d6() == 1 ) // in case they get busy-stuck, also to add randomness
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"busy",FALSE);
|
||||
return;
|
||||
} */
|
||||
// Don't inturupt actions in progress
|
||||
|
||||
|
||||
if ( GetCurrentAction() == ACTION_CASTSPELL )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetLocalInt(OBJECT_SELF,"physical") )
|
||||
{
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
// Haste = Super awesome;
|
||||
// Get those summons in there!
|
||||
int nSummonCount = GetLocalInt(OBJECT_SELF,"SummonCount");
|
||||
if ( !GetIsObjectValid(GetAssociate(ASSOCIATE_TYPE_SUMMONED)) && nSummonCount < 6 )
|
||||
{
|
||||
nSummonCount++;
|
||||
SetLocalInt(OBJECT_SELF,"SummonCount",nSummonCount);
|
||||
ClearAllActions();
|
||||
ActionCastFakeSpellAtLocation(SPELL_SUMMON_CREATURE_IX,GetLocation(OBJECT_SELF));
|
||||
effect eSummon = EffectSummonCreature("nightwalker",VFX_FNF_SUMMON_MONSTER_3,1.0);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eSummon,GetLocation(OBJECT_SELF),HoursToSeconds(24));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Hostile targeting actions
|
||||
if ( !GetIsObjectValid(oIntruder) || !GetIsReactionTypeHostile(oIntruder) )
|
||||
{
|
||||
oIntruder = GetNearestPerceivedEnemy();
|
||||
if ( !GetIsObjectValid(oIntruder) )
|
||||
return;
|
||||
}
|
||||
|
||||
// Melee up sometimes!
|
||||
|
||||
if ( d6() == 6 )
|
||||
{
|
||||
switch ( d4() )
|
||||
{
|
||||
case 1:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
|
||||
break;
|
||||
case 2:
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
break;
|
||||
case 3:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
break;
|
||||
case 4:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
|
||||
break;
|
||||
}
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"physical",1);
|
||||
DelayCommand(24.0,SetLocalInt(OBJECT_SELF,"physical",0));
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
54
_module/nss/dream_tendril.nss
Normal file
54
_module/nss/dream_tendril.nss
Normal file
@@ -0,0 +1,54 @@
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoIntDamage(object oTarget, object oOrigin )
|
||||
{
|
||||
int nKillEm = 0;
|
||||
if ( (!GetIsPC( oTarget ) ) || ( GetGameDifficulty() >= GAME_DIFFICULTY_CORE_RULES ) )
|
||||
{
|
||||
nKillEm = 1;
|
||||
}
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
int nDam = d4();
|
||||
effect eInt = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nDam);
|
||||
eInt = SupernaturalEffect(eInt);
|
||||
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_ABILITY_DECREASE) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eInt,oTarget);
|
||||
return;
|
||||
}
|
||||
|
||||
effect eHeal = EffectHeal(5);
|
||||
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_S);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oOrigin);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHealVis,oOrigin);
|
||||
|
||||
if ( GetAbilityScore(oTarget,ABILITY_INTELLIGENCE) - nDam < 3 && nKillEm )
|
||||
{
|
||||
int nHitPoints = GetCurrentHitPoints(oTarget);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHitDamage = EffectDamage(nHitPoints, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHitDamage, oTarget);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eInt,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
int nInt = GetAbilityScore(oTarget,ABILITY_INTELLIGENCE);
|
||||
|
||||
if ( !GetLocalInt(oTarget,"NotMindless") && nInt == 3 )
|
||||
return;
|
||||
|
||||
if ( nInt != 3 )
|
||||
SetLocalInt(oTarget,"NotMindless",1);
|
||||
|
||||
DelayCommand(0.1,DoIntDamage(oTarget,oOrigin));
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_attacked
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnAttacked event script caller to run CODI
|
||||
AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ: 2003-10-16
|
||||
// Make Plot Creatures Ignore Attacks
|
||||
//--------------------------------------------------------------------------
|
||||
if (GetPlotFlag(OBJECT_SELF))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//:: Execute the CODI AI NPC OnAttacked script
|
||||
ExecuteScript("no_ai_atk", OBJECT_SELF);
|
||||
|
||||
//:: Execute the Default NPC OnAttacked script
|
||||
//ExecuteScript("nw_c2_default5", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnAttacked script
|
||||
ExecuteScript("prc_npc_physatt", OBJECT_SELF);
|
||||
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_endcmbtrnd
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC EndCombatRound event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//:: Execute the CODI AI NPC OnCombatRoundEnd script
|
||||
ExecuteScript("no_ai_cmb", OBJECT_SELF);
|
||||
|
||||
//:: Execute the default NPC OnCombatRoundEnd script
|
||||
//ExecuteScript("nw_c2_default3", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnCombatRoundEnd script
|
||||
ExecuteScript("prc_npc_combat", OBJECT_SELF);
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_heartbeat
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC Heartbeat event script caller to run CODI
|
||||
AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oAttacker;
|
||||
string sResRef = GetResRef(oNPC);
|
||||
|
||||
//:: Runs special swarm HB
|
||||
if (sResRef == "ds_repbatswrm001" ||
|
||||
sResRef == "ds_minkankswrm01" ||
|
||||
sResRef == "ds_locustswarm01" ||
|
||||
sResRef == "ar_berzwasp001" ||
|
||||
sResRef == "ar_berzwasp002" )
|
||||
{
|
||||
ExecuteScript("cr_locust_hb", oNPC);
|
||||
}
|
||||
|
||||
//:: Equips best armor
|
||||
if ((!GetIsInCombat(oNPC) && (GetItemInSlot(INVENTORY_SLOT_CHEST) == OBJECT_INVALID)))
|
||||
DelayCommand(0.5f, ActionEquipMostEffectiveArmor());
|
||||
|
||||
//:: Handles Vampire's Gaseous form death.
|
||||
if(sResRef == "ra_vamp_gas_form")
|
||||
{
|
||||
//:: Get nearest alive PC.
|
||||
oAttacker = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oNPC, 1, CREATURE_TYPE_IS_ALIVE, TRUE);
|
||||
|
||||
//:: Set destroyable.
|
||||
SetIsDestroyable(TRUE, FALSE, FALSE);
|
||||
|
||||
//:: Remove plot/immoral/lootable flags JUST in case.
|
||||
SetPlotFlag(oNPC, FALSE);
|
||||
SetImmortal(oNPC, FALSE);
|
||||
SetLootable(oNPC, FALSE);
|
||||
|
||||
//:: Clear Actions & run away
|
||||
ClearAllActions();
|
||||
ActionMoveAwayFromObject(oAttacker, TRUE, 300.0f);
|
||||
|
||||
//:: Destroy ourselves after fleeing the scene
|
||||
DelayCommand(10.0f, DestroyObject(oNPC));
|
||||
}
|
||||
|
||||
//:: Execute the CODI NPC OnHeartbeat script
|
||||
ExecuteScript("no_ai_hrt", oNPC);
|
||||
|
||||
//:: Execute the default NPC OnHeartbeat script
|
||||
//ExecuteScript("nw_c2_default1", oNPC);
|
||||
|
||||
//:: Execute the PRC NPC OnHeartbeat script
|
||||
ExecuteScript("prc_npc_hb", oNPC);
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_onblocked
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnBlocked event script caller to run CODI
|
||||
AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//:: Execute the CODI AI NPC OnBlocked script
|
||||
ExecuteScript("no_ai_blk", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnBlocked script
|
||||
ExecuteScript("prc_npc_blocked", OBJECT_SELF);
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_onconverse
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnConversation event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//:: Execute the CODI AI NPC OnConversation script
|
||||
ExecuteScript("no_ai_cnv", OBJECT_SELF);
|
||||
|
||||
//:: Execute the default NPC OnConversation script
|
||||
//ExecuteScript("nw_c2_default4", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnConversation script
|
||||
ExecuteScript("prc_npc_conv", OBJECT_SELF);
|
||||
|
||||
}
|
@@ -1,53 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_ondamaged
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnDamaged event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
int nTotalDamage = GetTotalDamageDealt();
|
||||
int nFireDamage = 0;
|
||||
|
||||
string sResRef = GetResRef(OBJECT_SELF);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ: 2003-10-16
|
||||
// Make Plot Creatures Ignore Attacks
|
||||
//--------------------------------------------------------------------------
|
||||
if (GetPlotFlag(OBJECT_SELF))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//:: Handles healing from fire damage
|
||||
if(sResRef == "BLEAKBORN001" || sResRef == "BLEAKBORN002")
|
||||
{
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_FIRE) != -1)
|
||||
{
|
||||
nFireDamage = GetDamageDealtByType(DAMAGE_TYPE_FIRE);
|
||||
//DelayCommand(0.0f, SpeakString("Fire Damage: " + IntToString(nFireDamage)));
|
||||
}
|
||||
|
||||
effect eHeal = EffectTemporaryHitpoints(nFireDamage/3);
|
||||
//DelayCommand(0.0f, SpeakString("Subdual damage healed: " + IntToString(nSubDmg)));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, OBJECT_SELF, 0.0f);
|
||||
|
||||
}
|
||||
|
||||
//:: Execute the CODI AI NPC OnDamaged script
|
||||
ExecuteScript("no_ai_dam", OBJECT_SELF);
|
||||
|
||||
//:: Execute the Default NPC OnDamaged script
|
||||
//ExecuteScript("nw_c2_default6", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnDamaged script
|
||||
ExecuteScript("prc_npc_damaged", OBJECT_SELF);
|
||||
}
|
@@ -1,364 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_ondeath
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnDeath event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
// Necromancy 101 /////////
|
||||
#include "_inc_livingdead_"
|
||||
#include "_inc_battlecry_"
|
||||
////////////////////////////
|
||||
#include "nw_i0_spells"
|
||||
#include "nw_i0_plot"
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_racial"
|
||||
|
||||
void DropArmor(object oNPC)
|
||||
{
|
||||
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oNPC);
|
||||
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oNPC);
|
||||
|
||||
//:: Give a 3% chance to drop armor &/or equipped weapon
|
||||
int bDroppableA = d100() > 97;
|
||||
int bDroppableW = d100() > 97;
|
||||
|
||||
SetDroppableFlag(oArmor, bDroppableA);
|
||||
SetDroppableFlag(oWeapon, bDroppableW);
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oPC = GetLastKiller();
|
||||
|
||||
int nKillFlag = GetLocalInt(GetLastKiller(), "KILL_TASK_FLAG");
|
||||
|
||||
string sTagSelf = GetTag(oNPC);
|
||||
string sTagTarget = GetLocalString(oPC, "KILL_TASK_TARGET");
|
||||
|
||||
string sResRef = GetResRef(oNPC);
|
||||
|
||||
if (GetLocalInt(GetModule(),"X3_ENABLE_MOUNT_DB")&&GetIsObjectValid(GetMaster(OBJECT_SELF))) SetLocalInt(GetMaster(OBJECT_SELF),"bX3_STORE_MOUNT_INFO",TRUE);
|
||||
|
||||
// Makes sure armor's droppable flag is set to 0
|
||||
/* SetDroppableFlag(GetItemInSlot(INVENTORY_SLOT_CHEST, OBJECT_SELF), 0);
|
||||
|
||||
if ((GetResRef(oNPC) == "ra_bandit001") ||
|
||||
(GetResRef(oNPC) == "ra_brigand001") ||
|
||||
(GetResRef(oNPC) == "ra_brigand002"))
|
||||
{
|
||||
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oNPC);
|
||||
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oNPC);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oNPC);
|
||||
|
||||
// Give a 3% chance to drop armor &/or equipped weapon
|
||||
int bDroppableA = d100() > 97;
|
||||
int bDroppableW = d100() > 97;
|
||||
int bDroppableS = d100() > 97;
|
||||
|
||||
SetDroppableFlag(oArmor, bDroppableA);
|
||||
SetDroppableFlag(oWeapon, bDroppableW);
|
||||
SetDroppableFlag(oWeapon, bDroppableS);
|
||||
|
||||
}*/
|
||||
|
||||
//:: Small chance to drop certain NPC armor
|
||||
if ((GetResRef(oNPC) == "NPC_KLEDGUARD") ||
|
||||
(GetResRef(oNPC) == "NPC_IANTO_GUARD1") ||
|
||||
(GetResRef(oNPC) == "NPC_IANTO_GUARD2") ||
|
||||
(GetResRef(oNPC) == "ds_vorlon_guard1") ||
|
||||
(GetResRef(oNPC) == "silt_pirate001") ||
|
||||
(GetResRef(oNPC) == "ds_vorlon_guard2"))
|
||||
{
|
||||
DropArmor(oNPC);
|
||||
}
|
||||
|
||||
|
||||
//:: Check for correct Kill Task quest target and complete
|
||||
if(sTagSelf == sTagTarget && nKillFlag == 1)
|
||||
{
|
||||
SetLocalInt(oPC, "KILL_TASK_FLAG", 2);
|
||||
AddJournalQuestEntry("kt_journal_01", 99, oPC);
|
||||
}
|
||||
|
||||
int nInsanity = GetLocalInt(OBJECT_SELF,"INSANITY");
|
||||
if(nInsanity)
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = GetLastKiller();
|
||||
effect eConfuse = EffectConfused();
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_20);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_CONFUSION_S);
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eMind, eConfuse);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = SupernaturalEffect(eLink);
|
||||
|
||||
// Get oCaster's DC
|
||||
int nCreCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oCaster);
|
||||
int nCreHD = GetHitDice (oCaster);
|
||||
int nDC = (10 + (nCreHD/2) + nCreCHAMod);
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oCaster))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); // Apply Viz
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
|
||||
AssignCommand(oTarget,SpeakString("*The "+GetName(oCaster)+" has driven you insane!*"));
|
||||
}
|
||||
}
|
||||
|
||||
int nVFX = GetLocalInt(OBJECT_SELF,"SpawnVFX");
|
||||
if(nVFX)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectVisualEffect(nVFX)),OBJECT_SELF);
|
||||
}
|
||||
int nFirey = GetLocalInt(OBJECT_SELF,"FIREY");
|
||||
if (nFirey)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_INFERNO_NO_SOUND);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nShadowy = GetLocalInt(OBJECT_SELF,"SHADOWY");
|
||||
if (nShadowy)
|
||||
{
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nStony = GetLocalInt(OBJECT_SELF,"STONY");
|
||||
if (nStony)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nWoody = GetLocalInt(OBJECT_SELF,"WOODY");
|
||||
if (nWoody)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_BARKSKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nIcy = GetLocalInt(OBJECT_SELF,"ICY");
|
||||
if (nIcy)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ICESKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
int nConcealed20 = GetLocalInt(OBJECT_SELF,"CONCEALED20");
|
||||
if (nConcealed20)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BLUR );
|
||||
effect eConceal = EffectConcealment(20, 0);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nConcealed50 = GetLocalInt(OBJECT_SELF,"CONCEALED50");
|
||||
if (nConcealed50)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BLUR );
|
||||
effect eConceal = EffectConcealment(50, 0);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nGlow = GetLocalInt (OBJECT_SELF,"GLOW_COLOR");
|
||||
if (nGlow == 1)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 2)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 3)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 4)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREY);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 5)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 6)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 7)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 8)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 9)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_PURPLE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 10)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 11)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 12)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 13)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_PURPLE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 14)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
else if (nGlow == 15)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_WHITE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 16)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
||||
//:: Vampire's Gaseous Form onDeath
|
||||
if(sResRef == "ra_vampspawn01" || sResRef == "ra_vampspawn02")
|
||||
{
|
||||
effect eVFX;
|
||||
object oSpawn;
|
||||
location lSelf = GetLocation(OBJECT_SELF);
|
||||
|
||||
//:: Apply some visual effects & unload the model.
|
||||
eVFX = EffectVisualEffect(VFX_COM_UNLOAD_MODEL);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oNPC);
|
||||
eVFX = EffectVisualEffect(VFX_COM_BLOOD_CRT_RED);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oNPC);
|
||||
eVFX = EffectVisualEffect(491);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oNPC);
|
||||
eVFX = EffectVisualEffect(VFX_COM_CHUNK_RED_SMALL);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oNPC);
|
||||
eVFX = EffectVisualEffect(VFX_FNF_SMOKE_PUFF);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oNPC);
|
||||
|
||||
//:: Spawn Gaseous Form.
|
||||
eVFX = EffectVisualEffect(133);
|
||||
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "ra_vamp_gas_form", GetLocation(oNPC));
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSpawn));;
|
||||
|
||||
}
|
||||
|
||||
//:: Small chance to drop certain NPC armor
|
||||
if ((GetResRef(oNPC) == "NPC_KLEDGUARD") ||
|
||||
(GetResRef(oNPC) == "NPC_IANTO_GUARD1") ||
|
||||
(GetResRef(oNPC) == "NPC_IANTO_GUARD2") ||
|
||||
(GetResRef(oNPC) == "ds_vorlon_guard1") ||
|
||||
(GetResRef(oNPC) == "silt_pirate001") ||
|
||||
(GetResRef(oNPC) == "silt_pirate002") ||
|
||||
(GetResRef(oNPC) == "DS_THRAX001") ||
|
||||
(GetResRef(oNPC) == "ds_vorlon_guard2"))
|
||||
{
|
||||
DropArmor(oNPC);
|
||||
}
|
||||
|
||||
// Necromancy 101 ///////////////////////
|
||||
DoDeathCry();
|
||||
if (UndeadCheck(GetLastKiller())) return;
|
||||
/////////////////////////////////////////
|
||||
|
||||
//:: Execute CODI AI NPC OnDeath script
|
||||
DelayCommand(0.0f, ExecuteScript("no_ai_dth", OBJECT_SELF));
|
||||
|
||||
//:: Execute Jasperre's NPC OnDeath script
|
||||
//ExecuteScript("nw_c2_default7", OBJECT_SELF);
|
||||
|
||||
//:: Execute PRC NPC OnDeath script
|
||||
DelayCommand(0.0f, ExecuteScript("prc_npc_death", OBJECT_SELF));
|
||||
|
||||
//:: Execute PRC PW OnDeath scripts
|
||||
DelayCommand(0.0f, ExecuteScript("prc_pwondeath", OBJECT_SELF));
|
||||
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_ondisturb
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnDisturbed event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//:: Execute the CODI AI NPC OnDisturbed script
|
||||
ExecuteScript("no_ai_dis", OBJECT_SELF);
|
||||
|
||||
//:: Execute the default NPC OnDisturbed script
|
||||
//ExecuteScript("nw_c2_default8", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnDisturbed script
|
||||
ExecuteScript("prc_npc_blocked", OBJECT_SELF);
|
||||
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_onpercept
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnPerception event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
// Necromancy 101 /////////
|
||||
#include "_inc_battlecry_"
|
||||
////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetLastPerceived();
|
||||
object oHelm = GetItemInSlot(INVENTORY_SLOT_HEAD, oPC);
|
||||
object oMyHelm = GetItemInSlot(INVENTORY_SLOT_HEAD, OBJECT_SELF);
|
||||
|
||||
int nRiverVA = GetStringLeft(GetTag(OBJECT_SELF), 6) == "RB_VA_" ? TRUE : FALSE;
|
||||
int nRiverUrik = GetStringLeft(GetTag(OBJECT_SELF), 8) == "RB_URIK_" ? TRUE : FALSE;
|
||||
|
||||
|
||||
//:: Helm based faction handling for the River of Blood quest.
|
||||
if(nRiverVA == TRUE || nRiverUrik == TRUE)
|
||||
{
|
||||
if (GetTag(oHelm) == GetTag(oMyHelm))
|
||||
AdjustReputation(oPC, OBJECT_SELF, 100);
|
||||
if (GetTag(oHelm) != GetTag(oMyHelm))
|
||||
AdjustReputation(oPC, OBJECT_SELF, -100);
|
||||
}
|
||||
|
||||
|
||||
//:: Execute the CODI AI NPC OnPerception script
|
||||
ExecuteScript("no_ai_per", OBJECT_SELF);
|
||||
|
||||
//:: Execute the default NPC OnPerception script
|
||||
//ExecuteScript("nw_c2_default2", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnPerception script
|
||||
ExecuteScript("prc_npc_percep", OBJECT_SELF);
|
||||
|
||||
// Necromancy 101 ///
|
||||
DoBattleCry();
|
||||
/////////////////////
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_onrested
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnRested event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//:: Execute the CODI AI NPC OnRested script
|
||||
ExecuteScript("no_ai_rst", OBJECT_SELF);
|
||||
|
||||
//:: Execute the default NPC OnRested script
|
||||
//ExecuteScript("nw_c2_defaulta", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnRested script
|
||||
ExecuteScript("prc_npc_rested", OBJECT_SELF);
|
||||
}
|
@@ -1,816 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_onspawn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnSpawn event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
2003-07-28: Georg Zoeller:
|
||||
|
||||
If you set a ninteger on the creature named
|
||||
"X2_USERDEFINED_ONSPAWN_EVENTS"
|
||||
The creature will fire a pre and a post-spawn
|
||||
event on itself, depending on the value of that
|
||||
variable
|
||||
1 - Fire Userdefined Event 1510 (pre spawn)
|
||||
2 - Fire Userdefined Event 1511 (post spawn)
|
||||
3 - Fire both events
|
||||
|
||||
2007-12-31: Deva Winblood
|
||||
Modified to look for X3_HORSE_OWNER_TAG and if
|
||||
it is defined look for an NPC with that tag
|
||||
nearby or in the module (checks near first).
|
||||
It will make that NPC this horse's master.
|
||||
|
||||
20221201: Jaysyn
|
||||
Modified to read desired CODI AI spawner
|
||||
from string var "SPAWN_TYPE" set on the NPC,
|
||||
defaults to fighter.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner, Georg Zoeller
|
||||
//:: Created On: June 11/03
|
||||
//:: Modified By: Jaysyn
|
||||
//:: Modified On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||||
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
#include "ms_name_inc"
|
||||
#include "x2_inc_switches"
|
||||
#include "rnd_commoner_inc"
|
||||
#include "ds_rnd_armor_inc"
|
||||
#include "ds_rnd_level"
|
||||
|
||||
|
||||
void ShrinkEm(object oNPC)
|
||||
{
|
||||
SetObjectVisualTransform(OBJECT_SELF, OBJECT_VISUAL_TRANSFORM_SCALE, 0.3f);
|
||||
}
|
||||
|
||||
void Embiggen(object oNPC)
|
||||
{
|
||||
SetObjectVisualTransform(OBJECT_SELF, OBJECT_VISUAL_TRANSFORM_SCALE, 1.15f);
|
||||
}
|
||||
|
||||
void GrowEm(object oNPC)
|
||||
{
|
||||
SetObjectVisualTransform(OBJECT_SELF, OBJECT_VISUAL_TRANSFORM_SCALE, 1.5f);
|
||||
}
|
||||
|
||||
void NoFreeGear(object oNPC)
|
||||
{
|
||||
object oArmor;
|
||||
object oWeapon;
|
||||
|
||||
oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, OBJECT_SELF);
|
||||
oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, OBJECT_SELF);
|
||||
|
||||
SetDroppableFlag(oArmor, FALSE);
|
||||
SetDroppableFlag(oWeapon, FALSE);
|
||||
}
|
||||
|
||||
void AutoLevel(object oNPC)
|
||||
{
|
||||
// Initialize Variables
|
||||
|
||||
int nBoost = 0;
|
||||
int nTotalPCs = 0;
|
||||
int nTotalPCLevel = 0;
|
||||
int nAveragePCLevel = 0;
|
||||
int nDifficulty = d2(1);
|
||||
int nRnd = d3(1);
|
||||
int nCreHD = GetHitDice(OBJECT_SELF);
|
||||
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
|
||||
string sAreaName = GetName(oArea);
|
||||
|
||||
// Cycle through PCs in Area
|
||||
object oPC = GetFirstObjectInArea(oArea);
|
||||
|
||||
//SendMessageToPC(oPC, "OnSpawn: AutoLevel is running in "+sAreaName+".");
|
||||
//SendMessageToAllDMs("OnSpawn: AutoLevel is running in "+sAreaName+".");
|
||||
//SendMessageToPC(oPC, "OnSpawn: AutoLevel Difficulty = "+IntToString(nDifficulty));
|
||||
//SendMessageToAllDMs("OnSpawn: AutoLevel Difficulty = "+IntToString(nDifficulty));
|
||||
//SendMessageToPC(oPC, "OnSpawn: AutoLevel Randomness = "+IntToString(nRnd));
|
||||
//SendMessageToAllDMs("OnSpawn: AutoLevel Randomness = "+IntToString(nRnd));
|
||||
//SendMessageToPC(oPC, "OnSpawn: Creature starting HD = "+IntToString(nCreHD));
|
||||
//SendMessageToAllDMs("OnSpawn: Creature starting HD = "+IntToString(nCreHD));
|
||||
|
||||
while (oPC != OBJECT_INVALID)
|
||||
{
|
||||
|
||||
if (GetIsPC(oPC) == TRUE || GetIsPC(GetMaster(oPC)) == TRUE) // Summons & henchmen should count towards this.
|
||||
{
|
||||
nTotalPCs++;
|
||||
nTotalPCLevel += GetHitDice(oPC);
|
||||
//SendMessageToPC(oPC, "TotalPCs = "+ IntToString(nTotalPCs)+ " TotalHD = "+IntToString(nTotalPCLevel));
|
||||
//SendMessageToAllDMs("TotalPCs = "+ IntToString(nTotalPCs)+ " TotalHD = "+IntToString(nTotalPCLevel));
|
||||
}
|
||||
|
||||
oPC = GetNextObjectInArea(oArea);
|
||||
}
|
||||
|
||||
//SendMessageToPC(oPC, "Total PCs in Area = "+IntToString(nTotalPCs));
|
||||
//SendMessageToAllDMs("Total PCs in Area = "+IntToString(nTotalPCs));
|
||||
|
||||
if (nTotalPCs > 0)
|
||||
{
|
||||
nAveragePCLevel = nTotalPCLevel / nTotalPCs;
|
||||
}
|
||||
else
|
||||
{
|
||||
nAveragePCLevel = 3;
|
||||
}
|
||||
|
||||
//SendMessageToPC(oPC, "Average PC Level = "+IntToString(nAveragePCLevel));
|
||||
//SendMessageToAllDMs("Average PC Level = "+IntToString(nAveragePCLevel));
|
||||
|
||||
// Advance creature
|
||||
if (nRnd == 1)
|
||||
{
|
||||
nBoost = nAveragePCLevel + nDifficulty;
|
||||
//SendMessageToPC(oPC, "2nd Stage: Adding "+IntToString(nDifficulty)+" difficulty. nBoost = "+IntToString(nBoost));
|
||||
//SendMessageToAllDMs("2nd Stage: Adding "+IntToString(nDifficulty)+" difficulty. nBoost = "+IntToString(nBoost));
|
||||
//SendMessageToPC(oPC, "2nd Stage: LevelMob Running - Harder Difficulty");
|
||||
//SendMessageToAllDMs("2nd Stage: LevelMob Running - Harder Difficulty");
|
||||
//SendMessageToPC(oPC, "2nd Stage: LevelMob adding "+IntToString(nBoost)+" Hit Dice");
|
||||
//SendMessageToAllDMs("2nd Stage: LevelMob adding "+IntToString(nBoost)+" Hit Dice");
|
||||
DelayCommand(0.0f, LevelMob(OBJECT_SELF, nBoost));
|
||||
SetLocalInt(OBJECT_SELF, PRC_CASTERLEVEL_OVERRIDE, nBoost);
|
||||
}
|
||||
else
|
||||
{
|
||||
nBoost = nAveragePCLevel - nDifficulty;
|
||||
//SendMessageToPC(oPC, "2nd Stage: Adding "+IntToString(nDifficulty)+" difficulty. nBoost = "+IntToString(nBoost));
|
||||
//SendMessageToAllDMs("2nd Stage: Adding "+IntToString(nDifficulty)+" difficulty. nBoost = "+IntToString(nBoost));
|
||||
//SendMessageToPC(oPC, "2nd Stage: LevelMob Running - Easier Difficulty");
|
||||
//SendMessageToAllDMs("2nd Stage: LevelMob Running - Easier Difficulty");
|
||||
//SendMessageToPC(oPC, "2nd Stage: LevelMob adding "+IntToString(nAveragePCLevel)+" Hit Dice");
|
||||
//SendMessageToAllDMs("2nd Stage: LevelMob adding "+IntToString(nAveragePCLevel)+" Hit Dice");
|
||||
DelayCommand(0.0f, LevelMob(OBJECT_SELF, nBoost));
|
||||
SetLocalInt(OBJECT_SELF, PRC_CASTERLEVEL_OVERRIDE, nBoost);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
string sTag;
|
||||
string sResRef = GetResRef(OBJECT_SELF);
|
||||
string sSpawnType = "no_spn_ftr";
|
||||
|
||||
sSpawnType = GetLocalString(OBJECT_SELF,"SPAWN_TYPE");
|
||||
|
||||
if (sSpawnType == "")
|
||||
{
|
||||
sSpawnType = "no_spn_ftr";
|
||||
}
|
||||
|
||||
//: User defined OnSpawn event requested?
|
||||
int nSpecEvent = GetLocalInt(OBJECT_SELF,"X2_USERDEFINED_ONSPAWN_EVENTS");
|
||||
|
||||
|
||||
//:: Pre Spawn Event requested
|
||||
if (nSpecEvent == 1 || nSpecEvent == 3 )
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
}
|
||||
|
||||
//:: Creature will randomly level to within +/-2 levels of area's average PC lvl
|
||||
int nAutoLevel = GetLocalInt(OBJECT_SELF,"AUTOLEVEL");
|
||||
if (nAutoLevel > 0 )
|
||||
{
|
||||
DelayCommand(0.0f, AutoLevel(OBJECT_SELF));
|
||||
}
|
||||
|
||||
//:: Randomize Silt Pirate armor
|
||||
if ((sResRef == "silt_pirate001") ||
|
||||
(sResRef == "silt_pirate002"))
|
||||
{
|
||||
DelayCommand(0.0f, RndPirateArmor(OBJECT_SELF));
|
||||
ActionEquipMostEffectiveArmor();
|
||||
}
|
||||
|
||||
//:: Randomize Bandit armor
|
||||
if ((sResRef == "banditguard_001") ||
|
||||
(sResRef == "banditguard_002") ||
|
||||
(sResRef == "banditguard_003") ||
|
||||
(sResRef == "dunebandit_001") ||
|
||||
(sResRef == "dunebandit_002") ||
|
||||
(sResRef == "dunebandit_003") ||
|
||||
(sResRef == "halfbandit_001") ||
|
||||
(sResRef == "humanbandit_001") ||
|
||||
(sResRef == "humanbandit_002") ||
|
||||
(sResRef == "humanbandit_003") ||
|
||||
(sResRef == "humanbandit_004") ||
|
||||
(sResRef == "humanbandit_005") ||
|
||||
(sResRef == "elvenraider001") ||
|
||||
(sResRef == "warrensthug001") ||
|
||||
(sResRef == "ar_gulgslaver002") ||
|
||||
(sResRef == "ar_gulgslaver003") ||
|
||||
(sResRef == "ar_gulgslaver004"))
|
||||
{
|
||||
DelayCommand(0.0f, RndBanditArmor(OBJECT_SELF));
|
||||
ActionEquipMostEffectiveArmor();
|
||||
}
|
||||
|
||||
sTag=GetLocalString(OBJECT_SELF,"X3_HORSE_OWNER_TAG");
|
||||
if (GetStringLength(sTag)>0)
|
||||
{ // look for master
|
||||
object oNPC = GetNearestObjectByTag(sTag);
|
||||
if (GetIsObjectValid(oNPC)&&GetObjectType(oNPC)==OBJECT_TYPE_CREATURE)
|
||||
{ // master found
|
||||
AddHenchman(oNPC);
|
||||
} // master found
|
||||
else
|
||||
{ // look in module
|
||||
oNPC=GetObjectByTag(sTag);
|
||||
if (GetIsObjectValid(oNPC)&&GetObjectType(oNPC)==OBJECT_TYPE_CREATURE)
|
||||
{ // master found
|
||||
AddHenchman(oNPC);
|
||||
} // master found
|
||||
else
|
||||
{ // master does not exist - remove X3_HORSE_OWNER_TAG
|
||||
DeleteLocalString(oNPC,"X3_HORSE_OWNER_TAG");
|
||||
} // master does not exist - remove X3_HORSE_OWNER_TAG
|
||||
} // look in module
|
||||
} // look for master
|
||||
|
||||
|
||||
//:: Sets a random integer on the creature to use with other spell functions
|
||||
string sImmune = GetName(OBJECT_SELF)+"_AURA_IMMUNE";
|
||||
int nRandomSeed = Random(999);
|
||||
SetLocalInt(OBJECT_SELF, sImmune, nRandomSeed);
|
||||
|
||||
//:: Creature will quickly & automatically buff itself up with any defensive
|
||||
//:: spells it has memorized.
|
||||
|
||||
int nAutobuff = GetLocalInt(OBJECT_SELF,"AUTOBUFF");
|
||||
if (nAutobuff > 0 )
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY);
|
||||
}
|
||||
|
||||
//:: Creature will flee those that close within 7m if they are not friends,
|
||||
//:: Rangers or Druids.
|
||||
|
||||
int nHerbivore = GetLocalInt(OBJECT_SELF,"CREATURE_VAR_HERBIVORE");
|
||||
if (nHerbivore > 0 )
|
||||
{
|
||||
SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
|
||||
SetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE);
|
||||
}
|
||||
|
||||
//:: Creature will only attack those that close within 5m and are not friends,
|
||||
//:: Rangers or Druids.
|
||||
|
||||
int nOmnivore = GetLocalInt(OBJECT_SELF,"CREATURE_VAR_OMNIVORE");
|
||||
if (nOmnivore > 0 )
|
||||
{
|
||||
SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
|
||||
SetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE);
|
||||
}
|
||||
|
||||
int nOLM = GetLocalInt(OBJECT_SELF,"OLM");
|
||||
if (nOLM > 0)
|
||||
{
|
||||
DelayCommand(0.0f, ShrinkEm(OBJECT_SELF));
|
||||
|
||||
effect eSlow = EffectMovementSpeedDecrease(90);
|
||||
eSlow = SupernaturalEffect(eSlow);
|
||||
eSlow = ExtraordinaryEffect(eSlow);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSlow,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nHuge = GetLocalInt(OBJECT_SELF,"HUGE");
|
||||
if (nHuge > 0)
|
||||
{
|
||||
DelayCommand(0.0f, GrowEm(OBJECT_SELF));
|
||||
|
||||
}
|
||||
|
||||
int nEmbiggen = GetLocalInt(OBJECT_SELF,"EMBIGGEN");
|
||||
if (nEmbiggen > 0)
|
||||
{
|
||||
DelayCommand(0.0f, Embiggen(OBJECT_SELF));
|
||||
|
||||
}
|
||||
|
||||
int nNoStun = GetLocalInt(OBJECT_SELF,"NOSTUN");
|
||||
if (nNoStun > 0)
|
||||
{
|
||||
effect eNoStun = EffectImmunity(IMMUNITY_TYPE_STUN);
|
||||
eNoStun = SupernaturalEffect(eNoStun);
|
||||
eNoStun = ExtraordinaryEffect(eNoStun);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoStun,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNatInvis1 = GetLocalInt(OBJECT_SELF,"NATURAL_INVIS");
|
||||
if (nNatInvis1 == 1)
|
||||
{
|
||||
effect eNatInvis = EffectInvisibility(4);
|
||||
eNatInvis = SupernaturalEffect(eNatInvis);
|
||||
//eNatInvis = ExtraordinaryEffect(eNatInvis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNatInvis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNatInvis2 = GetLocalInt(OBJECT_SELF,"NATURAL_INVIS");
|
||||
if (nNatInvis2 == 2)
|
||||
{
|
||||
effect eNatInvis = EffectInvisibility(4);
|
||||
eNatInvis = SupernaturalEffect(eNatInvis);
|
||||
eNatInvis = ExtraordinaryEffect(eNatInvis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNatInvis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nSeeInvis = GetLocalInt(OBJECT_SELF,"SEE_INVIS");
|
||||
if (nSeeInvis > 0)
|
||||
{
|
||||
effect eSeeInvis = EffectSeeInvisible();
|
||||
eSeeInvis = SupernaturalEffect(eSeeInvis);
|
||||
eSeeInvis = ExtraordinaryEffect(eSeeInvis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSeeInvis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNoSleep = GetLocalInt(OBJECT_SELF,"NOSLEEP");
|
||||
if (nNoSleep > 0)
|
||||
{
|
||||
effect eNoSleep = EffectImmunity(IMMUNITY_TYPE_SLEEP);
|
||||
eNoSleep = SupernaturalEffect(eNoSleep);
|
||||
eNoSleep = ExtraordinaryEffect(eNoSleep);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoSleep,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNoDaze = GetLocalInt(OBJECT_SELF,"NODAZE");
|
||||
if (nNoDaze > 0)
|
||||
{
|
||||
effect eNoDaze = EffectImmunity(IMMUNITY_TYPE_DAZED);
|
||||
eNoDaze = SupernaturalEffect(eNoDaze);
|
||||
eNoDaze = ExtraordinaryEffect(eNoDaze);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoDaze,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNoBlind = GetLocalInt(OBJECT_SELF,"NOBLIND");
|
||||
if (nNoBlind > 0)
|
||||
{
|
||||
effect eNoBlind = EffectImmunity(IMMUNITY_TYPE_BLINDNESS);
|
||||
eNoBlind = SupernaturalEffect(eNoBlind);
|
||||
eNoBlind = ExtraordinaryEffect(eNoBlind);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoBlind,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNoDeaf = GetLocalInt(OBJECT_SELF,"NODEAF");
|
||||
if (nNoDeaf > 0)
|
||||
{
|
||||
effect eNoDeaf = EffectImmunity(IMMUNITY_TYPE_DEAFNESS);
|
||||
eNoDeaf = SupernaturalEffect(eNoDeaf);
|
||||
eNoDeaf = ExtraordinaryEffect(eNoDeaf);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoDeaf,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nDeaf = GetLocalInt(OBJECT_SELF,"IS_DEAF");
|
||||
if (nDeaf > 0)
|
||||
{
|
||||
effect eDeaf = EffectDeaf();
|
||||
eDeaf = SupernaturalEffect(eDeaf);
|
||||
eDeaf = ExtraordinaryEffect(eDeaf);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDeaf,OBJECT_SELF));
|
||||
}
|
||||
|
||||
/* Fix for the new golems to reduce their number of attacks */
|
||||
|
||||
int nNumber = GetLocalInt(OBJECT_SELF,CREATURE_VAR_NUMBER_OF_ATTACKS);
|
||||
if (nNumber >0 )
|
||||
{
|
||||
SetBaseAttackBonus(nNumber);
|
||||
}
|
||||
|
||||
int nVFX = GetLocalInt(OBJECT_SELF,"SpawnVFX");
|
||||
if(nVFX)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectVisualEffect(nVFX)),OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nRegen = GetLocalInt(OBJECT_SELF,"FAST_HEALING");
|
||||
if(nRegen)
|
||||
{
|
||||
effect eRegen = EffectRegenerate(nRegen, 6.0f);
|
||||
eRegen = SupernaturalEffect(eRegen);
|
||||
eRegen = ExtraordinaryEffect(eRegen);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eRegen, OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nShadowy = GetLocalInt(OBJECT_SELF,"SHADOWY");
|
||||
if (nShadowy)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nStony = GetLocalInt(OBJECT_SELF,"STONY");
|
||||
if (nStony)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
int nFirey = GetLocalInt(OBJECT_SELF,"FIREY");
|
||||
if (nFirey)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_INFERNO_NO_SOUND);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
int nWoody = GetLocalInt(OBJECT_SELF,"WOODY");
|
||||
if (nWoody)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_BARKSKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nConcealed20 = GetLocalInt(OBJECT_SELF,"CONCEALED20");
|
||||
if (nConcealed20)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BLUR );
|
||||
effect eConceal = EffectConcealment(20, 0);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nConcealed50 = GetLocalInt(OBJECT_SELF,"CONCEALED50");
|
||||
if (nConcealed50)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BLUR );
|
||||
effect eConceal = EffectConcealment(50, 0);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nIcy = GetLocalInt(OBJECT_SELF,"ICY");
|
||||
if (nIcy)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ICESKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nSR = GetLocalInt(OBJECT_SELF,"SPELL_RESISTANCE");
|
||||
if ( nSR )
|
||||
{
|
||||
effect eSR = EffectSpellResistanceIncrease(nSR);
|
||||
eSR = SupernaturalEffect(eSR);
|
||||
eSR = ExtraordinaryEffect(eSR);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSR,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nAttackBonus = GetLocalInt(OBJECT_SELF,"ATTACK_BONUS");
|
||||
if ( nAttackBonus )
|
||||
{
|
||||
effect eAttack = EffectAttackIncrease(nAttackBonus);
|
||||
eAttack = SupernaturalEffect(eAttack);
|
||||
eAttack = ExtraordinaryEffect(eAttack);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eAttack,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nIceShield = GetLocalInt(OBJECT_SELF,"FROST_SHIELD");
|
||||
if ( nIceShield )
|
||||
{
|
||||
effect eShield = EffectDamageShield(0,DAMAGE_BONUS_1d6,DAMAGE_TYPE_COLD);
|
||||
eShield = SupernaturalEffect(eShield);
|
||||
eShield = ExtraordinaryEffect(eShield);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShield,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nAcidShield = GetLocalInt(OBJECT_SELF,"ACID_SHIELD");
|
||||
if ( nAcidShield )
|
||||
{
|
||||
effect eShield = EffectDamageShield(0,DAMAGE_BONUS_1d8,DAMAGE_TYPE_ACID);
|
||||
eShield = SupernaturalEffect(eShield);
|
||||
eShield = ExtraordinaryEffect(eShield);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShield,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nSerratedEdge = GetLocalInt(OBJECT_SELF,"SERRATED_EDGE");
|
||||
if ( nSerratedEdge )
|
||||
{
|
||||
effect eShield = EffectDamageShield(0,DAMAGE_BONUS_1d6,DAMAGE_TYPE_SLASHING);
|
||||
eShield = SupernaturalEffect(eShield);
|
||||
eShield = ExtraordinaryEffect(eShield);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShield,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nSpikedArmor = GetLocalInt(OBJECT_SELF,"SPIKED_ARMOR");
|
||||
if ( nSpikedArmor )
|
||||
{
|
||||
effect eShield = EffectDamageShield(0,DAMAGE_BONUS_1d4,DAMAGE_TYPE_PIERCING);
|
||||
eShield = SupernaturalEffect(eShield);
|
||||
eShield = ExtraordinaryEffect(eShield);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShield,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nGlow = GetLocalInt (OBJECT_SELF,"GLOW_COLOR");
|
||||
if (nGlow == 1)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 2)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 3)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 4)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREY);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 5)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 6)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 7)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 8)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 9)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_PURPLE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 10)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 11)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 12)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 13)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_PURPLE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 14)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 15)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_WHITE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 16)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
// Check for randomizations.
|
||||
|
||||
ms_Nomenclature(OBJECT_SELF);
|
||||
|
||||
int nKeepskin = GetLocalInt(OBJECT_SELF,"DS_KEEPSKIN");
|
||||
if (nKeepskin != 1)
|
||||
{
|
||||
rnd_skin(OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nKeephead = GetLocalInt(OBJECT_SELF,"DS_KEEPHEAD");
|
||||
if (nKeephead != 1)
|
||||
{
|
||||
rnd_head(OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nKeeptats = GetLocalInt(OBJECT_SELF,"DS_KEEPTATS");
|
||||
if (nKeeptats != 1)
|
||||
{
|
||||
rnd_tattoo(OBJECT_SELF);
|
||||
}
|
||||
|
||||
|
||||
//:: Handles various Aura effects
|
||||
int nAtropal = GetTag(OBJECT_SELF) == "ATROPAL001" ? TRUE : FALSE;
|
||||
if(nAtropal)ExecuteScript("atropal_aura",OBJECT_SELF);
|
||||
|
||||
int AtropalScion = GetTag(OBJECT_SELF) == "ATROPALSCION001" ? TRUE : FALSE;
|
||||
if(AtropalScion)ExecuteScript("neaura",OBJECT_SELF);
|
||||
|
||||
int nBleakborn = GetStringLeft(GetTag(OBJECT_SELF), 9) == "BLEAKBORN" ? TRUE : FALSE;
|
||||
if(nBleakborn)ExecuteScript("bleakaura",OBJECT_SELF);
|
||||
|
||||
int nCryptChanter = GetStringLeft(GetTag(OBJECT_SELF), 12) == "CRYPTCHANTER" ? TRUE : FALSE;
|
||||
if(nCryptChanter)ExecuteScript("DrainingMelody",OBJECT_SELF);
|
||||
|
||||
int nNWalker = GetStringLeft(GetTag(OBJECT_SELF), 11) == "NIGHTWALKER" ? TRUE : FALSE;
|
||||
if(nNWalker)ExecuteScript("desecrating_aura",OBJECT_SELF);
|
||||
|
||||
int nNCrawler = GetStringLeft(GetTag(OBJECT_SELF), 12) == "NIGHTCRAWLER" ? TRUE : FALSE;
|
||||
if(nNCrawler)ExecuteScript("desecrating_aura",OBJECT_SELF);
|
||||
|
||||
int nVoidWraith = GetStringLeft(GetTag(OBJECT_SELF), 10) == "VOIDWRAITH" ? TRUE : FALSE;
|
||||
if(nVoidWraith)ExecuteScript("airlessaura",OBJECT_SELF);
|
||||
|
||||
int nGhast = GetStringLeft(GetTag(OBJECT_SELF), 5) == "GHAST" ? TRUE : FALSE;
|
||||
if(nGhast)ExecuteScript("ghast_stench",OBJECT_SELF);
|
||||
|
||||
int nTliz = GetStringLeft(GetTag(OBJECT_SELF), 4) == "TLIZ" ? TRUE : FALSE;
|
||||
if(nTliz)ExecuteScript("tliz_aura",OBJECT_SELF);
|
||||
|
||||
int nDecay = GetStringLeft(GetTag(OBJECT_SELF), 12) == "ANGELOFDECAY" ? TRUE : FALSE;
|
||||
if(nDecay)ExecuteScript("rotura",OBJECT_SELF);
|
||||
|
||||
int nConsumeInt = GetStringLeft(GetTag(OBJECT_SELF), 13) == "DS_YELMUSKCRP" ? TRUE : FALSE;
|
||||
if(nConsumeInt)ExecuteScript("consume_int",OBJECT_SELF);
|
||||
|
||||
int nDecay1 = GetStringLeft(GetTag(OBJECT_SELF), 13) == "DS_YELMUSKCRP" ? TRUE : FALSE;
|
||||
if(nDecay1)ExecuteScript("consume_int",OBJECT_SELF);
|
||||
|
||||
int nMiniKanks = GetStringLeft(GetTag(OBJECT_SELF), 14) == "DS_MINKANKSWRM" ? TRUE : FALSE;
|
||||
if(nMiniKanks)ExecuteScript("swarm_minikank",OBJECT_SELF);
|
||||
|
||||
int nLocusts = GetStringLeft(GetTag(OBJECT_SELF), 14) == "DS_LOCUSTSWARM" ? TRUE : FALSE;
|
||||
if(nLocusts)ExecuteScript("swarm_locust",OBJECT_SELF);
|
||||
|
||||
int nBerzWasp1 = GetStringLeft(GetTag(OBJECT_SELF), 11) == "AR_BERZWASP" ? TRUE : FALSE;
|
||||
if(nBerzWasp1)ExecuteScript("swarm_berzwasp",OBJECT_SELF);
|
||||
|
||||
int nRepBats = GetStringLeft(GetTag(OBJECT_SELF), 13) == "DS_REPBATSWRM" ? TRUE : FALSE;
|
||||
if(nRepBats)ExecuteScript("swarm_repbat",OBJECT_SELF);
|
||||
|
||||
int nFordorran = GetStringLeft(GetTag(OBJECT_SELF), 12) == "DS_FORDORRAN" ? TRUE : FALSE;
|
||||
if(nFordorran)ExecuteScript("fordorran_aura",OBJECT_SELF);
|
||||
|
||||
int nPrisma = GetStringLeft(GetTag(OBJECT_SELF), 12) == "PRISMASAURUS" ? TRUE : FALSE;
|
||||
if(nPrisma)ExecuteScript("prism_aura",OBJECT_SELF);
|
||||
|
||||
|
||||
//:: Randomize Silt Pirate armor
|
||||
if ((GetResRef(OBJECT_SELF) == "silt_pirate001") ||
|
||||
(GetResRef(OBJECT_SELF) == "silt_pirate002"))
|
||||
{
|
||||
RndPirateArmor(OBJECT_SELF);
|
||||
ActionEquipMostEffectiveArmor();
|
||||
}
|
||||
|
||||
//:: Randomize Bandit armor
|
||||
if ((GetResRef(OBJECT_SELF) == "banditguard_001") ||
|
||||
(GetResRef(OBJECT_SELF) == "banditguard_002") ||
|
||||
(GetResRef(OBJECT_SELF) == "banditguard_003") ||
|
||||
(GetResRef(OBJECT_SELF) == "dunebandit_001") ||
|
||||
(GetResRef(OBJECT_SELF) == "dunebandit_002") ||
|
||||
(GetResRef(OBJECT_SELF) == "dunebandit_003") ||
|
||||
(GetResRef(OBJECT_SELF) == "halfbandit_001") ||
|
||||
(GetResRef(OBJECT_SELF) == "humanbandit_001") ||
|
||||
(GetResRef(OBJECT_SELF) == "humanbandit_002") ||
|
||||
(GetResRef(OBJECT_SELF) == "humanbandit_003") ||
|
||||
(GetResRef(OBJECT_SELF) == "humanbandit_004") ||
|
||||
(GetResRef(OBJECT_SELF) == "humanbandit_005") ||
|
||||
(GetResRef(OBJECT_SELF) == "elvenraider001") ||
|
||||
(GetResRef(OBJECT_SELF) == "warrensthug001") ||
|
||||
(GetResRef(OBJECT_SELF) == "ar_gulgslaver002") ||
|
||||
(GetResRef(OBJECT_SELF) == "ar_gulgslaver003") ||
|
||||
(GetResRef(OBJECT_SELF) == "ar_gulgslaver004"))
|
||||
{
|
||||
RndBanditArmor(OBJECT_SELF);
|
||||
ActionEquipMostEffectiveArmor();
|
||||
}
|
||||
|
||||
//:: Regeneration (not Fast Healing)
|
||||
if(sResRef == "ra_troll001" || sResRef == "TROLL_FEDORLA")
|
||||
{
|
||||
//:: Setting local variable for tracking Subdual damage
|
||||
SetLocalInt(OBJECT_SELF, "nSubDual", 0);
|
||||
|
||||
//:: OPTIONAL BEHAVIOR - Fire User Defined Event 1001
|
||||
SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
|
||||
|
||||
//:: OPTIONAL BEHAVIOR - Fire User Defined Event 1003
|
||||
SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT);
|
||||
|
||||
//:: OPTIONAL BEHAVIOR - Fire User Defined Event 1006
|
||||
SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT);
|
||||
|
||||
//:: OPTIONAL BEHAVIOR - Fire User Defined Event 1007
|
||||
SetSpawnInCondition(NW_FLAG_DEATH_EVENT);
|
||||
}
|
||||
|
||||
//Post Spawn event request
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
|
||||
//:: Creature will gain 2 HD for every PC over 4 in an area.
|
||||
int nAutoSolo = GetLocalInt(OBJECT_SELF,"AUTOSOLO");
|
||||
if (nAutoSolo > 0 )
|
||||
{
|
||||
int iNewHD = GetNewAutoSoloHitDice(OBJECT_SELF);
|
||||
int iNewHP = GetNewAutoSoloHitPoints(OBJECT_SELF);
|
||||
|
||||
JSONAutoSolo(OBJECT_SELF, iNewHD, iNewHP);
|
||||
}
|
||||
|
||||
/* //:: Handles class level based NPC titles
|
||||
int bClassTitle = GetLocalInt(OBJECT_SELF,"CLASS_TITLE");
|
||||
if(bClassTitle)
|
||||
{
|
||||
int nHighClass = GetHighestClassLevel(OBJECT_SELF);
|
||||
string sBaseRace = GetLocalString(OBJECT_SELF,"BASE_RACE");
|
||||
|
||||
DelayCommand(0.0f, SetName(OBJECT_SELF, sBaseRace +" "+ GetClassLevelTitle(nHighClass)));
|
||||
} */
|
||||
|
||||
//:: Execute OnSpawn script.
|
||||
if (sResRef == "monst_spider004")
|
||||
{
|
||||
//:: Execute drop in from above spawn.
|
||||
ExecuteScript("nw_c2_dropin9", OBJECT_SELF);
|
||||
}
|
||||
else
|
||||
{
|
||||
//:: Execute CODI AI OnSpawn script.
|
||||
ExecuteScript(sSpawnType, OBJECT_SELF);
|
||||
|
||||
//:: Execute default OnSpawn script.
|
||||
//ExecuteScript("nw_c2_default9", OBJECT_SELF);
|
||||
}
|
||||
|
||||
//:: Execute PRC OnSpawn script.
|
||||
ExecuteScript("prc_npc_spawn", OBJECT_SELF);
|
||||
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_onspelled
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnSpellCastAt event script caller to run
|
||||
CODI AI & PRC events.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ: 2003-10-16
|
||||
// Make Plot Creatures Ignore Attacks
|
||||
//--------------------------------------------------------------------------
|
||||
if (GetPlotFlag(OBJECT_SELF))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//:: Execute the CODI AI NPC OnSpellCastAt script
|
||||
ExecuteScript("no_ai_spt", OBJECT_SELF);
|
||||
|
||||
//:: Execute the Default NPC OnSpellCastAt script
|
||||
//ExecuteScript("nw_c2_defaultb", OBJECT_SELF);
|
||||
|
||||
//:: Execute the PRC NPC OnSpellCastAt script
|
||||
ExecuteScript("prc_npc_spellat", OBJECT_SELF);
|
||||
}
|
@@ -1,169 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name ds_ai_userdef
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
NPC OnUserDefined event script caller to run
|
||||
CODI AI & PRC events.
|
||||
|
||||
May need to actually disable most of this for
|
||||
the CODI AI.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221201
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||||
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
int nUser = GetUserDefinedEventNumber();
|
||||
int nFireDamage = 0;
|
||||
int nAcidDamage = 0;
|
||||
int nColdDamage = 0;
|
||||
int nDivineDamage = 0;
|
||||
int nElectricalDamage = 0;
|
||||
int nPositiveDamage = 0;
|
||||
int nNegativeDamage = 0;
|
||||
int nMagicalDamage = 0;
|
||||
int nSonicDamage = 0;
|
||||
|
||||
string sResRef = GetResRef(OBJECT_SELF);
|
||||
|
||||
effect eSleep = EffectSleep();
|
||||
effect eSlow = EffectSlow();
|
||||
|
||||
if(nUser == EVENT_HEARTBEAT ) //HEARTBEAT
|
||||
{
|
||||
if(sResRef == "ra_troll001" || sResRef == "TROLL_FEDORLA")
|
||||
{
|
||||
if(GetLocalInt(OBJECT_SELF, "nSubDual") > 0)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "nSubDual", GetLocalInt(OBJECT_SELF, "nSubDual") - 5);
|
||||
|
||||
if(GetLocalInt(OBJECT_SELF, "nSubDual") < GetCurrentHitPoints(OBJECT_SELF))
|
||||
{
|
||||
RemoveEffect(OBJECT_SELF, eSleep);
|
||||
}
|
||||
//SpeakString("My Subdual is now " + IntToString(GetLocalInt(OBJECT_SELF, "nSubDual")));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(nUser == EVENT_PERCEIVE) // PERCEIVE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_END_COMBAT_ROUND) // END OF COMBAT
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_DIALOGUE) // ON DIALOGUE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_ATTACKED) // ATTACKED
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_DAMAGED) // DAMAGED
|
||||
{
|
||||
//:: Handles swarm immunity to physical weapons
|
||||
if(sResRef == "ds_minkankswrm01" || sResRef == "ds_locustswarm01")
|
||||
{
|
||||
int nTotalDamage = GetTotalDamageDealt();
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_FIRE) > 0)
|
||||
{
|
||||
nFireDamage = GetDamageDealtByType(DAMAGE_TYPE_FIRE);
|
||||
}
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_ACID) > 0)
|
||||
{
|
||||
nAcidDamage = GetDamageDealtByType(DAMAGE_TYPE_ACID);
|
||||
}
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_COLD) > 0)
|
||||
{
|
||||
nColdDamage = GetDamageDealtByType(DAMAGE_TYPE_COLD);
|
||||
}
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_DIVINE) > 0)
|
||||
{
|
||||
nDivineDamage = GetDamageDealtByType(DAMAGE_TYPE_DIVINE);
|
||||
}
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_ELECTRICAL) > 0)
|
||||
{
|
||||
nElectricalDamage = GetDamageDealtByType(DAMAGE_TYPE_ELECTRICAL);
|
||||
}
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_MAGICAL) > 0)
|
||||
{
|
||||
nMagicalDamage = GetDamageDealtByType(DAMAGE_TYPE_MAGICAL);
|
||||
}
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_NEGATIVE) > 0)
|
||||
{
|
||||
nNegativeDamage = GetDamageDealtByType(DAMAGE_TYPE_NEGATIVE);
|
||||
}
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_POSITIVE) > 0)
|
||||
{
|
||||
nPositiveDamage = GetDamageDealtByType(DAMAGE_TYPE_POSITIVE);
|
||||
}
|
||||
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_SONIC) > 0)
|
||||
{
|
||||
nSonicDamage = GetDamageDealtByType(DAMAGE_TYPE_SONIC);
|
||||
}
|
||||
|
||||
|
||||
int nSubDmg = nTotalDamage - (nFireDamage
|
||||
+ nAcidDamage
|
||||
+ nColdDamage
|
||||
+ nDivineDamage
|
||||
+ nElectricalDamage
|
||||
+ nMagicalDamage
|
||||
+ nNegativeDamage
|
||||
+ nPositiveDamage
|
||||
+ nSonicDamage);
|
||||
|
||||
int nActDmg = (nFireDamage + nAcidDamage
|
||||
+ nColdDamage
|
||||
+ nDivineDamage
|
||||
+ nElectricalDamage
|
||||
+ nMagicalDamage
|
||||
+ nNegativeDamage
|
||||
+ nPositiveDamage
|
||||
+ nSonicDamage);
|
||||
|
||||
effect eHeal = EffectHeal(nSubDmg);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, OBJECT_SELF, 0.0f);
|
||||
|
||||
}
|
||||
}
|
||||
else if(nUser == 1007) // DEATH - do not use for critical code, does not fire reliably all the time
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == EVENT_DISTURBED) // DISTURBED
|
||||
{
|
||||
|
||||
}
|
||||
else if (nUser == EVENT_USER_DEFINED_PRESPAWN)
|
||||
{
|
||||
|
||||
}
|
||||
else if (nUser == EVENT_USER_DEFINED_POSTSPAWN)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//:: Execute the PRC NPC OnUserDef script
|
||||
ExecuteScript("prc_npc_userdef", OBJECT_SELF);
|
||||
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
//Closes door if it is open
|
||||
void main()
|
||||
{
|
||||
DelayCommand(25.0,ActionCloseDoor(OBJECT_SELF));
|
||||
}
|
File diff suppressed because it is too large
Load Diff
64
_module/nss/dspiderbite.nss
Normal file
64
_module/nss/dspiderbite.nss
Normal file
@@ -0,0 +1,64 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
|
||||
void DoPoison(object oTarget, object oCaster)
|
||||
{
|
||||
/* int bIsPoisoned = GetLocalInt(oTarget,"IsPoisoned");
|
||||
if ( bIsPoisoned )
|
||||
SetLocalInt(oTarget,"IsPoisoned",0);
|
||||
else
|
||||
SetLocalInt(oTarget,"IsPoisoned",1); */
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POISON_S);
|
||||
int nDam = d12(2);
|
||||
effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION,nDam);
|
||||
|
||||
int bKillEm = FALSE;
|
||||
if ( !GetIsPC(oTarget) || GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES
|
||||
|| GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT )
|
||||
bKillEm = TRUE;
|
||||
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_POISON) ||
|
||||
GetIsImmune(oTarget,IMMUNITY_TYPE_ABILITY_DECREASE) )
|
||||
{
|
||||
SendMessageToPC(oTarget,"Immune to poison.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_FORT,oTarget,94,SAVING_THROW_TYPE_POISON,oCaster) )
|
||||
{
|
||||
int nCon = GetAbilityScore(oTarget,ABILITY_CONSTITUTION);
|
||||
if ( ( nCon - nDam ) < 3 && bKillEm )
|
||||
{
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHP = EffectDamage( 9999 , DAMAGE_TYPE_MAGICAL , DAMAGE_POWER_PLUS_TWENTY);
|
||||
effect eDeath = EffectDeath();
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHP,oTarget);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eCon,oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
object oCaster = OBJECT_SELF;
|
||||
|
||||
/* int bIsPoisoned = GetLocalInt(oTarget,"IsPoisoned");
|
||||
if ( bIsPoisoned )
|
||||
return; */
|
||||
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_POISON) ||
|
||||
GetIsImmune(oTarget,IMMUNITY_TYPE_ABILITY_DECREASE) )
|
||||
{
|
||||
SendMessageToPC(oTarget,"Immune to poison.");
|
||||
return;
|
||||
}
|
||||
|
||||
DelayCommand(0.1,DoPoison(oTarget,oCaster));
|
||||
DelayCommand(RoundsToSeconds(10),DoPoison(oTarget,oCaster));
|
||||
}
|
91
_module/nss/entropic_blade.nss
Normal file
91
_module/nss/entropic_blade.nss
Normal file
@@ -0,0 +1,91 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoWisDamage(object oTarget)
|
||||
{
|
||||
effect eWis = EffectAbilityDecrease(ABILITY_WISDOM,1);
|
||||
eWis = SupernaturalEffect(eWis);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eWis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
|
||||
|
||||
int nKillEm = FALSE;
|
||||
if ( (!GetIsPC( oTarget ) ) || ( GetGameDifficulty() >= GAME_DIFFICULTY_CORE_RULES ) )
|
||||
{
|
||||
nKillEm = 1;
|
||||
}
|
||||
|
||||
int nTargetAbility = GetAbilityScore(oTarget, ABILITY_WISDOM);
|
||||
if ( ( (nTargetAbility - 1) < 3) && nKillEm )
|
||||
{
|
||||
int nHitPoints = GetCurrentHitPoints(oTarget);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHitDamage = EffectDamage(nHitPoints, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHitDamage, oTarget);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int DoEntropic(object oTarget, float fDelay)
|
||||
{
|
||||
|
||||
effect eGlow = EffectVisualEffect(408+Random(16));
|
||||
|
||||
effect eConfuse = EffectConfused();
|
||||
effect eMiss = EffectMissChance(50);
|
||||
effect ePenalty = EffectAttackDecrease(4);
|
||||
effect eSpell = EffectSpellFailure(100);
|
||||
effect eLink = EffectLinkEffects(eSpell,ePenalty);
|
||||
eLink = EffectLinkEffects(eLink,eMiss);
|
||||
eLink = EffectLinkEffects(eLink,eConfuse);
|
||||
|
||||
|
||||
int nRoll = d20() + GetAbilityModifier(ABILITY_CHARISMA,oTarget);
|
||||
|
||||
if ( nRoll <= 21 )
|
||||
{
|
||||
DelayCommand(fDelay,SendMessageToPC(oTarget,"Charisma Check to recover from Entropic Blade: " + IntToString(nRoll) + " Fail!"));
|
||||
DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oTarget,6.0));
|
||||
DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eGlow,oTarget,6.0));
|
||||
DelayCommand(fDelay,DoWisDamage(oTarget));
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(fDelay,SendMessageToPC(oTarget,"Charisma Check to recover from Entropic Blade: " + IntToString(nRoll) + " Success!"));
|
||||
DelayCommand(fDelay,SetLocalInt(oTarget,"Entropic",0));
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
|
||||
if ( GetLocalInt(oTarget,"Entropic") )
|
||||
{
|
||||
SendMessageToPC(oOrigin,"Creature already has this effect.");
|
||||
return;
|
||||
}
|
||||
int nDelay = 0;
|
||||
|
||||
if ( PRCMySavingThrow(SAVING_THROW_FORT,oTarget,21) )
|
||||
return;
|
||||
|
||||
SetLocalInt(oTarget,"Entropic",1);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
while ( DoEntropic(oTarget,RoundsToSeconds(nDelay)) && nDelay < 10 )
|
||||
{
|
||||
nDelay++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
132
_module/nss/eviscerator.nss
Normal file
132
_module/nss/eviscerator.nss
Normal file
@@ -0,0 +1,132 @@
|
||||
//::
|
||||
//:: A pnp version of the Slaughter Wight's Lvl draining touch,
|
||||
//:: Eviscorator Feat & Death master feat.
|
||||
//::
|
||||
//:: Modified by: DM Heatstroke 01-30-11
|
||||
//::
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
//#include "nw_i0_spells"
|
||||
//#include "nw_i0_plot"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
int DSGetIsShaken(object oTarget,object oOrigin)
|
||||
{
|
||||
effect eEffect = GetFirstEffect(oTarget);
|
||||
int nEffectType;
|
||||
|
||||
while ( GetIsEffectValid(eEffect) )
|
||||
{
|
||||
// AssignCommand(oTarget,SpeakString("Effect Creator: " + GetName(GetEffectCreator(eEffect))
|
||||
// + " Effect ID: " + IntToString(GetEffectSpellId(eEffect))
|
||||
// + " Effect Type: " + IntToString(GetEffectType(eEffect)) ));
|
||||
|
||||
if ( GetEffectCreator(eEffect) == oOrigin &&
|
||||
GetEffectSpellId(eEffect) == 700 )
|
||||
{
|
||||
nEffectType = GetEffectType(eEffect);
|
||||
if ( nEffectType == EFFECT_TYPE_ATTACK_DECREASE ||
|
||||
nEffectType == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
||||
nEffectType == EFFECT_TYPE_SKILL_DECREASE )
|
||||
{
|
||||
AssignCommand(oTarget,SpeakString("**Shaken!**"));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
}
|
||||
|
||||
//AssignCommand(oTarget,SpeakString("I am not shaken"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void DoLevelDrain(object oTarget, object oCaster)
|
||||
{
|
||||
// Setup oCaster's healing
|
||||
effect eDrain = EffectTemporaryHitpoints(5);
|
||||
eDrain = ExtraordinaryEffect(eDrain);
|
||||
effect eVis1 = EffectVisualEffect(VFX_IMP_HEALING_L);
|
||||
|
||||
// Setup Level Drain
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eNeg = EffectNegativeLevel(1);
|
||||
eNeg = SupernaturalEffect(eNeg);
|
||||
|
||||
// Drain levels from oTarget
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eNeg, oTarget, HoursToSeconds(24));
|
||||
// Apply Temp HP to oCaster
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis1, oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDrain, oCaster, HoursToSeconds(1));
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_NEGATIVE_LEVEL) )
|
||||
{
|
||||
SendMessageToPC(oTarget,"Immune to level drain.");
|
||||
return;
|
||||
}
|
||||
|
||||
DelayCommand(0.1,DoLevelDrain(oTarget,oCaster));
|
||||
|
||||
int nRace = MyPRCGetRacialType(oTarget);
|
||||
if (( nRace == RACIAL_TYPE_CONSTRUCT ) || ( nRace == RACIAL_TYPE_ELEMENTAL )
|
||||
|| ( nRace == RACIAL_TYPE_UNDEAD ))
|
||||
return;
|
||||
if ( GetIsImmune( oTarget, IMMUNITY_TYPE_CRITICAL_HIT ) )
|
||||
return;
|
||||
|
||||
if ( d20() < 14 )
|
||||
return;
|
||||
|
||||
effect eImp = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DOOM);
|
||||
|
||||
effect eAttack = EffectAttackDecrease(2);
|
||||
effect eSaves = EffectSavingThrowDecrease(SAVING_THROW_ALL,2);
|
||||
effect eSkills = EffectSkillDecrease(SKILL_ALL_SKILLS,2);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eAttack,eSaves);
|
||||
eLink = EffectLinkEffects(eLink,eSkills);
|
||||
eLink = EffectLinkEffects(eLink,eDur);
|
||||
|
||||
effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink2 = EffectLinkEffects(eVis2,eDur2);
|
||||
|
||||
object oAOE = GetFirstObjectInShape(SHAPE_SPHERE, FeetToMeters(30.0), GetLocation(oTarget));
|
||||
|
||||
float fDelay;
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eImp,oTarget);
|
||||
while ( GetIsObjectValid( oAOE ) )
|
||||
{
|
||||
if ( oAOE != oCaster && GetIsEnemy(oAOE,oCaster) )
|
||||
{
|
||||
if ( !GetIsImmune( oAOE, IMMUNITY_TYPE_MIND_SPELLS ) &&
|
||||
!GetIsImmune( oAOE, IMMUNITY_TYPE_FEAR ) &&
|
||||
!GetHasEffect( EFFECT_TYPE_FRIGHTENED, oAOE) )
|
||||
{
|
||||
fDelay = GetDistanceBetween(oAOE,oTarget) / 20;
|
||||
if ( DSGetIsShaken(oAOE, oCaster) )
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink2,oAOE,RoundsToSeconds(10)));
|
||||
// AssignCommand(oAOE,SpeakString("Fear! Oh no!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oAOE));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oAOE,RoundsToSeconds(10)));
|
||||
}
|
||||
}
|
||||
}
|
||||
oAOE = GetNextObjectInShape(SHAPE_SPHERE, FeetToMeters(30.0), GetLocation(oTarget));
|
||||
}
|
||||
|
||||
|
||||
}
|
8
_module/nss/fear2_aura.nss
Normal file
8
_module/nss/fear2_aura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_FEAR,"fear2_aura1","null","null");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,HoursToSeconds(100));
|
||||
}
|
34
_module/nss/fear2_aura1.nss
Normal file
34
_module/nss/fear2_aura1.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetEnteringObject();
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
int nLevel = GetHitDice(oCaster);
|
||||
int nDC = 10 + nLevel / 2 + GetAbilityModifier(ABILITY_CHARISMA,oCaster);
|
||||
|
||||
|
||||
if ( nLevel > 20 )
|
||||
nLevel = 20;
|
||||
|
||||
float fDuration = RoundsToSeconds(d4());
|
||||
|
||||
if ( !GetIsEnemy(oTarget,oCaster) || oTarget == oCaster )
|
||||
return;
|
||||
|
||||
effect eFear = EffectParalyze();
|
||||
effect eImp = EffectVisualEffect(VFX_IMP_FEAR_S);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eFear,eVis);
|
||||
eLink = EffectLinkEffects(eLink,eDur);
|
||||
|
||||
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,nDC,SAVING_THROW_TYPE_FEAR,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eImp,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oTarget,fDuration);
|
||||
}
|
||||
}
|
8
_module/nss/fear_aura.nss
Normal file
8
_module/nss/fear_aura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_FEAR,"fear_aura1","null","null");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,HoursToSeconds(100));
|
||||
}
|
34
_module/nss/fear_aura1.nss
Normal file
34
_module/nss/fear_aura1.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetEnteringObject();
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
int nLevel = GetHitDice(oCaster);
|
||||
int nDC = 10 + nLevel / 2 + GetAbilityModifier(ABILITY_CHARISMA,oCaster);
|
||||
|
||||
|
||||
if ( nLevel > 20 )
|
||||
nLevel = 20;
|
||||
|
||||
float fDuration = RoundsToSeconds(nLevel);
|
||||
|
||||
if ( !GetIsEnemy(oTarget,oCaster) || oTarget == oCaster )
|
||||
return;
|
||||
|
||||
effect eFear = EffectFrightened();
|
||||
effect eImp = EffectVisualEffect(VFX_IMP_FEAR_S);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eFear,eVis);
|
||||
eLink = EffectLinkEffects(eLink,eDur);
|
||||
|
||||
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,nDC,SAVING_THROW_TYPE_FEAR,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eImp,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oTarget,fDuration);
|
||||
}
|
||||
}
|
8
_module/nss/frostfire.nss
Normal file
8
_module/nss/frostfire.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
//Set and apply AOE object
|
||||
effect eAOE = EffectDamageShield(0,DAMAGE_BONUS_1d6,DAMAGE_TYPE_COLD);
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAOE, OBJECT_SELF);
|
||||
}
|
70
_module/nss/hb_cold.nss
Normal file
70
_module/nss/hb_cold.nss
Normal file
@@ -0,0 +1,70 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_heartbeat
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default Heartbeat script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
location GetRandomLocation(object oObject)
|
||||
{
|
||||
location lLoc = GetLocation(oObject);
|
||||
float fFacing = GetFacing(oObject);
|
||||
object oArea = GetArea(oObject);
|
||||
vector vVector = GetPositionFromLocation(lLoc);
|
||||
/* switch ( Random(5) )
|
||||
{
|
||||
case 0:
|
||||
vVector.x += Random(6) - 3;
|
||||
vVector.y += Random(6) - 3;
|
||||
vVector.z += 3;
|
||||
break;
|
||||
case 1:
|
||||
vVector.x += 3;
|
||||
vVector.y += Random(6) - 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
break;
|
||||
case 2:
|
||||
vVector.x -= 3;
|
||||
vVector.y += Random(6) - 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
break;
|
||||
case 3:
|
||||
vVector.x += Random(6) - 3;
|
||||
vVector.y += 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
break;
|
||||
case 4:
|
||||
vVector.x += Random(6) - 3;
|
||||
vVector.y -= 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
break;
|
||||
} */
|
||||
vVector.x += Random(20) - 10;
|
||||
vVector.y += Random(20) - 10;
|
||||
// vVector.z += Random(6) - 3;
|
||||
lLoc = Location(oArea,vVector,fFacing);
|
||||
return lLoc;
|
||||
}
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("nw_c2_default1", OBJECT_SELF);
|
||||
effect eFlame = EffectVisualEffect(VFX_IMP_FROST_L);
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF));
|
||||
DelayCommand(0.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(1.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(1.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(2.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(2.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(3.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(3.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(4.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(4.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(5.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(5.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
}
|
70
_module/nss/hb_fire.nss
Normal file
70
_module/nss/hb_fire.nss
Normal file
@@ -0,0 +1,70 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_heartbeat
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default Heartbeat script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
location GetRandomLocation(object oObject)
|
||||
{
|
||||
location lLoc = GetLocation(oObject);
|
||||
float fFacing = GetFacing(oObject);
|
||||
object oArea = GetArea(oObject);
|
||||
vector vVector = GetPositionFromLocation(lLoc);
|
||||
/* switch ( Random(5) )
|
||||
{
|
||||
case 0:
|
||||
vVector.x += Random(6) - 3;
|
||||
vVector.y += Random(6) - 3;
|
||||
vVector.z += 3;
|
||||
break;
|
||||
case 1:
|
||||
vVector.x += 3;
|
||||
vVector.y += Random(6) - 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
break;
|
||||
case 2:
|
||||
vVector.x -= 3;
|
||||
vVector.y += Random(6) - 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
break;
|
||||
case 3:
|
||||
vVector.x += Random(6) - 3;
|
||||
vVector.y += 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
break;
|
||||
case 4:
|
||||
vVector.x += Random(6) - 3;
|
||||
vVector.y -= 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
break;
|
||||
} */
|
||||
vVector.x += Random(6) - 3;
|
||||
vVector.y += Random(6) - 3;
|
||||
vVector.z += Random(6) - 3;
|
||||
lLoc = Location(oArea,vVector,fFacing);
|
||||
return lLoc;
|
||||
}
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("nw_c2_default1", OBJECT_SELF);
|
||||
effect eFlame = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF));
|
||||
DelayCommand(0.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(1.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(1.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(2.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(2.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(3.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(3.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(4.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(4.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(5.0,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
DelayCommand(5.5,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eFlame,GetRandomLocation(OBJECT_SELF)));
|
||||
}
|
34
_module/nss/hb_prism.nss
Normal file
34
_module/nss/hb_prism.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_heartbeat
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default Heartbeat script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void RandomGlow()
|
||||
{
|
||||
int nEffect = 408 + Random(16);
|
||||
|
||||
effect eGlow = EffectVisualEffect(nEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eGlow,OBJECT_SELF,1.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("nw_c2_default1", OBJECT_SELF);
|
||||
|
||||
RandomGlow();
|
||||
DelayCommand(1.0,RandomGlow());
|
||||
DelayCommand(2.0,RandomGlow());
|
||||
DelayCommand(3.0,RandomGlow());
|
||||
DelayCommand(4.0,RandomGlow());
|
||||
DelayCommand(5.0,RandomGlow());
|
||||
}
|
55
_module/nss/howl_ai.nss
Normal file
55
_module/nss/howl_ai.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
|
||||
if ( sScript != "" )
|
||||
ExecuteScript(sScript,OBJECT_SELF);
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetCurrentAction() == ACTION_CASTSPELL )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
object oTarget = oIntruder;
|
||||
|
||||
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
|
||||
{
|
||||
oTarget = GetNearestEnemy();
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
}
|
||||
if ( !GetLocalInt(OBJECT_SELF,"HowlDelay") && d4() == 4 )
|
||||
{
|
||||
ClearAllActions();
|
||||
ActionCastSpellAtObject(SPELLABILITY_HOWL_STUN,oTarget,METAMAGIC_ANY,TRUE);
|
||||
SetLocalInt(OBJECT_SELF,"HowlDelay",1);
|
||||
DelayCommand(6.0*d4(),SetLocalInt(OBJECT_SELF,"HowlDelay",0));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
102
_module/nss/hunefer_rot.nss
Normal file
102
_module/nss/hunefer_rot.nss
Normal file
@@ -0,0 +1,102 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoConDamage(object oTarget)
|
||||
{
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DISEASE_S);
|
||||
int nDam = d6();
|
||||
effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION,nDam);
|
||||
|
||||
int bKillEm = FALSE;
|
||||
if ( !GetIsPC(oTarget) || GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES
|
||||
|| GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT )
|
||||
bKillEm = TRUE;
|
||||
|
||||
int nCon = GetAbilityScore(oTarget,ABILITY_CONSTITUTION);
|
||||
if ( ( nCon - nDam ) < 3 && bKillEm )
|
||||
{
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHP = EffectDamage( 9999 , DAMAGE_TYPE_MAGICAL , DAMAGE_POWER_PLUS_TWENTY);
|
||||
effect eDeath = EffectDeath();
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHP,oTarget);
|
||||
}
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eCon,oTarget);
|
||||
|
||||
}
|
||||
|
||||
void DoRot(object oTarget )
|
||||
{
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
if ( !GetLocalInt(oTarget,"hunefer_rot") )
|
||||
return;
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_DISEASE) )
|
||||
{
|
||||
SendMessageToPC(oTarget,"Immune to Disease.");
|
||||
SetLocalInt(oTarget,"hunefer_rot",0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int nResult = PRCMySavingThrow(SAVING_THROW_FORT,oTarget,35,SAVING_THROW_TYPE_DISEASE);
|
||||
if ( nResult == 0 )
|
||||
{
|
||||
DelayCommand(0.1,DoConDamage(oTarget));
|
||||
}
|
||||
|
||||
// Normally Hunefer rot can only be removed by remove disease, not by
|
||||
// making saving throws
|
||||
if ( nResult == 1 && GetGameDifficulty() != GAME_DIFFICULTY_DIFFICULT
|
||||
&& GetGameDifficulty() != GAME_DIFFICULTY_CORE_RULES &&
|
||||
GetIsPC(oTarget) )
|
||||
{
|
||||
SetLocalInt(oTarget,"hunefer_rot",0);
|
||||
SendMessageToPC(oTarget,"Recovered from Disease.");
|
||||
}
|
||||
if ( nResult != 2 )
|
||||
{
|
||||
DelayCommand(6.0,DoRot(oTarget));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLocalInt(oTarget,"hunefer_rot",0);
|
||||
SendMessageToPC(oTarget,"Immune to Disease.");
|
||||
}
|
||||
/* else
|
||||
{
|
||||
SetLocalInt(oTarget,"hunefer_rot",0);
|
||||
}
|
||||
if ( nResult == 2 )
|
||||
{
|
||||
|
||||
} */
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
object oCaster = OBJECT_SELF;
|
||||
|
||||
if ( GetLocalInt(oTarget,"hunefer_rot") )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_DISEASE) )
|
||||
{
|
||||
SendMessageToPC(oTarget,"Immune to Disease.");
|
||||
return;
|
||||
}
|
||||
if ( PRCMySavingThrow(SAVING_THROW_FORT,oTarget,35,SAVING_THROW_TYPE_DISEASE) )
|
||||
return;
|
||||
|
||||
SendMessageToPC(oTarget,"You have contracted Hunefer Rot");
|
||||
SetLocalInt(oTarget,"hunefer_rot",1);
|
||||
DelayCommand(6.0,DoRot(oTarget));
|
||||
}
|
21
_module/nss/inc_ai.nss
Normal file
21
_module/nss/inc_ai.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
int GetCanAct(object oCreature)
|
||||
{
|
||||
effect eEffect = GetFirstEffect(oCreature);
|
||||
int nEffect;
|
||||
while ( GetIsEffectValid( eEffect ))
|
||||
{
|
||||
nEffect = GetEffectType(eEffect);
|
||||
if ( nEffect == EFFECT_TYPE_PARALYZE ||
|
||||
nEffect == EFFECT_TYPE_DAZED ||
|
||||
nEffect == EFFECT_TYPE_DOMINATED ||
|
||||
nEffect == EFFECT_TYPE_FRIGHTENED ||
|
||||
nEffect == EFFECT_TYPE_PETRIFY ||
|
||||
nEffect == EFFECT_TYPE_SLEEP ||
|
||||
nEffect == EFFECT_TYPE_STUNNED ||
|
||||
nEffect == EFFECT_TYPE_TURNED )
|
||||
return FALSE;
|
||||
|
||||
eEffect = GetNextEffect(oCreature);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
52
_module/nss/inc_suffocate.nss
Normal file
52
_module/nss/inc_suffocate.nss
Normal file
@@ -0,0 +1,52 @@
|
||||
void SuffocateCheck(object oTarget)
|
||||
{
|
||||
int nRounds = GetLocalInt(oTarget,"SuffocateRounds");
|
||||
int nCon = GetAbilityScore(oTarget,ABILITY_CONSTITUTION);
|
||||
|
||||
int nDif = nCon * 2 - nRounds;
|
||||
|
||||
if ( nDif < 0 )
|
||||
{
|
||||
int nDC = 9 - nDif;
|
||||
SendMessageToPC(oTarget,"You are suffocating!");
|
||||
int nRoll = d20() + GetAbilityModifier(ABILITY_CONSTITUTION,oTarget);
|
||||
if ( nRoll >= nDC )
|
||||
{
|
||||
SendMessageToPC(oTarget,"Constitution check: "+ IntToString(nRoll)+ " vs dc " + IntToString(nDC) + " :Success!");
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oTarget,"Constitution check: "+ IntToString(nRoll)+ " vs dc " + IntToString(nDC) + " :Failure!");
|
||||
int nHitPoints = GetCurrentHitPoints(oTarget);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHitDamage = EffectDamage(nHitPoints, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHitDamage, oTarget);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oTarget,"You can't breath! You have " + IntToString(nDif) +
|
||||
" rounds of breath left!");
|
||||
}
|
||||
}
|
||||
|
||||
void Suffocate(object oTarget)
|
||||
{
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if (( nRace == RACIAL_TYPE_CONSTRUCT ) || ( nRace == RACIAL_TYPE_ELEMENTAL )
|
||||
|| ( nRace == RACIAL_TYPE_UNDEAD ) || ( nRace == RACIAL_TYPE_OOZE ) )
|
||||
return;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
|
||||
int nRounds = GetLocalInt(oTarget,"SuffocateRounds");
|
||||
nRounds++;
|
||||
SetLocalInt(oTarget,"SuffocateRounds",nRounds);
|
||||
SuffocateCheck(oTarget);
|
||||
}
|
||||
|
||||
void GiveBreath(object oTarget)
|
||||
{
|
||||
SetLocalInt(oTarget,"SuffocateRounds",0);
|
||||
}
|
132
_module/nss/infernal_ai.nss
Normal file
132
_module/nss/infernal_ai.nss
Normal file
@@ -0,0 +1,132 @@
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void DoPhysical( object oTarget, object oCaster )
|
||||
{
|
||||
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
|
||||
{
|
||||
oTarget = GetNearestEnemy();
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
}
|
||||
TalentMeleeAttack(oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
|
||||
if ( sScript != "" )
|
||||
ExecuteScript(sScript,OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
}
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetLocalInt(OBJECT_SELF,"Acting") )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
/* if ( d6() == 1 ) // in case they get busy-stuck, also to add randomness
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"busy",FALSE);
|
||||
return;
|
||||
} */
|
||||
// Don't inturupt actions in progress
|
||||
|
||||
|
||||
if ( GetCurrentAction() == ACTION_CASTSPELL )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetLocalInt(OBJECT_SELF,"physical") )
|
||||
{
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
// Haste = Super awesome;
|
||||
// Get those summons in there!
|
||||
int nSummonCount = GetLocalInt(OBJECT_SELF,"SummonCount");
|
||||
if ( !GetIsObjectValid(GetAssociate(ASSOCIATE_TYPE_SUMMONED)) && nSummonCount < 10 )
|
||||
{
|
||||
nSummonCount++;
|
||||
SetLocalInt(OBJECT_SELF,"SummonCount",nSummonCount);
|
||||
ClearAllActions();
|
||||
ActionCastFakeSpellAtLocation(SPELL_SUMMON_CREATURE_IX,GetLocation(OBJECT_SELF));
|
||||
effect eSummon = EffectSummonCreature("X2_PITFIEND001",VFX_FNF_SUMMON_MONSTER_3,1.0);
|
||||
|
||||
location lSelf;
|
||||
object oTarget = FindSingleRangedTarget();
|
||||
if(GetIsObjectValid(oIntruder))
|
||||
{
|
||||
vector vTarget = GetPosition(oIntruder);
|
||||
vector vSource = GetPosition(OBJECT_SELF);
|
||||
vector vDirection = vTarget - vSource;
|
||||
float fDistance = VectorMagnitude(vDirection) / 2.0f;
|
||||
vector vPoint = VectorNormalize(vDirection) * fDistance + vSource;
|
||||
lSelf = Location(GetArea(OBJECT_SELF), vPoint, GetFacing(OBJECT_SELF));
|
||||
//lSelf = GetLocation(oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
lSelf = GetLocation(OBJECT_SELF);
|
||||
}
|
||||
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eSummon,lSelf,HoursToSeconds(24));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Hostile targeting actions
|
||||
if ( !GetIsObjectValid(oIntruder) || !GetIsReactionTypeHostile(oIntruder) )
|
||||
{
|
||||
oIntruder = GetNearestPerceivedEnemy();
|
||||
if ( !GetIsObjectValid(oIntruder) )
|
||||
return;
|
||||
}
|
||||
|
||||
// Melee up sometimes!
|
||||
|
||||
if ( d6() == 6 )
|
||||
{
|
||||
switch ( d4() )
|
||||
{
|
||||
case 1:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
|
||||
break;
|
||||
case 2:
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
break;
|
||||
case 3:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
break;
|
||||
case 4:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
|
||||
break;
|
||||
}
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"physical",1);
|
||||
DelayCommand(24.0,SetLocalInt(OBJECT_SELF,"physical",0));
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
52
_module/nss/melody1.nss
Normal file
52
_module/nss/melody1.nss
Normal file
@@ -0,0 +1,52 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "NW_I0_GENERIC"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
object oTarget = GetEnteringObject();
|
||||
|
||||
effect eImp = EffectVisualEffect(VFX_IMP_DAZED_S);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eDaze = EffectDazed();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eDaze,eVis);
|
||||
eLink = EffectLinkEffects(eLink,eDur);
|
||||
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
int nDrain = d2();
|
||||
effect eDrain = EffectNegativeLevel(nDrain);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink2 = EffectLinkEffects(eDrain,eDur);
|
||||
eLink2 = SupernaturalEffect(eLink2);
|
||||
|
||||
effect eHealing = EffectHeal(nDrain * 5);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_HEALING_S);
|
||||
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
if ( GetHasEffect(EFFECT_TYPE_DAZED,oTarget) )
|
||||
{
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,18,SAVING_THROW_TYPE_MIND_SPELLS,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eLink2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
if ( !GetIsImmune(oTarget,IMMUNITY_TYPE_NEGATIVE_LEVEL) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHealing,oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oCaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,18,SAVING_THROW_TYPE_MIND_SPELLS,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oTarget,RoundsToSeconds(10));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
63
_module/nss/melody2.nss
Normal file
63
_module/nss/melody2.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "NW_I0_GENERIC"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
effect eImp = EffectVisualEffect(VFX_IMP_DAZED_S);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eDaze = EffectDazed();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eDaze,eVis);
|
||||
eLink = EffectLinkEffects(eLink,eDur);
|
||||
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
int nDrain;
|
||||
effect eDrain;
|
||||
effect eLink2;
|
||||
effect eHealing;
|
||||
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_HEALING_S);
|
||||
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
if ( GetHasEffect(EFFECT_TYPE_DAZED,oTarget) )
|
||||
{
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,18,SAVING_THROW_TYPE_MIND_SPELLS,oCaster) )
|
||||
{
|
||||
nDrain = d2();
|
||||
eDrain = EffectNegativeLevel(nDrain);
|
||||
|
||||
eLink2 = EffectLinkEffects(eDrain,eDur);
|
||||
eLink2 = SupernaturalEffect(eLink2);
|
||||
eHealing = EffectHeal(nDrain * 5);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eLink2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
if ( !GetIsImmune(oTarget,IMMUNITY_TYPE_NEGATIVE_LEVEL) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHealing,oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oCaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !PRCMySavingThrow(SAVING_THROW_WILL,oTarget,18,SAVING_THROW_TYPE_MIND_SPELLS,oCaster) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oTarget,RoundsToSeconds(10));
|
||||
}
|
||||
}
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
32
_module/nss/melody3.nss
Normal file
32
_module/nss/melody3.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
//Get the object that is exiting the AOE
|
||||
object oTarget = GetExitingObject();
|
||||
effect eAOE;
|
||||
int nEffectType;
|
||||
|
||||
int bValid = FALSE;
|
||||
//Search through the valid effects on the target.
|
||||
eAOE = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eAOE) && bValid == FALSE)
|
||||
{
|
||||
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator(OBJECT_SELF))
|
||||
{
|
||||
nEffectType = GetEffectType(eAOE);
|
||||
if ( nEffectType == EFFECT_TYPE_DAZED )
|
||||
{
|
||||
if(GetEffectSpellId(eAOE) == -1)
|
||||
{
|
||||
RemoveEffect(oTarget, eAOE);
|
||||
bValid = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next effect on the target
|
||||
eAOE = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
9
_module/nss/neaura.nss
Normal file
9
_module/nss/neaura.nss
Normal file
@@ -0,0 +1,9 @@
|
||||
void main()
|
||||
{
|
||||
//Set and apply AOE object
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_CIRCGOOD,"neaura1","neaura2","neaura3");
|
||||
//effect eAOE = EffectAreaOfEffect(90 /*10FT_SWARM_RADIUS*/,"neaura1","neaura2","neaura3");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100));
|
||||
}
|
40
_module/nss/neaura1.nss
Normal file
40
_module/nss/neaura1.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eDrain = EffectNegativeLevel(2);
|
||||
effect eDeath = EffectDeath();
|
||||
effect eBoost = EffectTurnResistanceIncrease(4);
|
||||
eBoost = EffectLinkEffects(eBoost,EffectRegenerate(5,6.0));
|
||||
object oTarget = GetEnteringObject();
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if ( GetLocalInt(oTarget,"NEAura") )
|
||||
return;
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
if ( nRace != RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
if ( GetHitDice(oTarget) <= 2 )
|
||||
{
|
||||
location lWight = GetLocation(oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
object oWight = CreateObject(OBJECT_TYPE_CREATURE,"nw_wight",lWight);
|
||||
ChangeFaction(oWight,oCaster);
|
||||
return;
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDrain,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
}
|
||||
if ( nRace == RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBoost,oTarget);
|
||||
}
|
||||
SetLocalInt(oTarget,"NEAura",1);
|
||||
}
|
49
_module/nss/neaura2.nss
Normal file
49
_module/nss/neaura2.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eDrain = EffectNegativeLevel(2);
|
||||
effect eDeath = EffectDeath();
|
||||
effect eBoost = EffectTurnResistanceIncrease(4);
|
||||
eBoost = EffectLinkEffects(eBoost,EffectRegenerate(5,6.0));
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if ( GetLocalInt(oTarget,"NEAura") )
|
||||
{
|
||||
oTarget = GetNextInPersistentObject();
|
||||
break;
|
||||
}
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
if ( nRace != RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
if ( GetHitDice(oTarget) <= 2 )
|
||||
{
|
||||
location lWight = GetLocation(oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget);
|
||||
object oWight = CreateObject(OBJECT_TYPE_CREATURE,"nw_wight",lWight);
|
||||
ChangeFaction(oWight,oCaster);
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDrain,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( nRace == RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBoost,oTarget);
|
||||
}
|
||||
SetLocalInt(oTarget,"NEAura",1);
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
69
_module/nss/neaura3.nss
Normal file
69
_module/nss/neaura3.nss
Normal file
@@ -0,0 +1,69 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Grease: On Exit
|
||||
//:: NW_S0_GreaseB.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creatures entering the zone of grease must make
|
||||
a reflex save or fall down. Those that make
|
||||
their save have their movement reduced by 1/2.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 1, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
//Get the object that is exiting the AOE
|
||||
object oTarget = GetExitingObject();
|
||||
int bValid = FALSE;
|
||||
int bRegen = FALSE;
|
||||
int bTurn = FALSE;
|
||||
effect eAOE;
|
||||
int nEffectType;
|
||||
object oPC = GetFirstPC();
|
||||
// SendMessageToPC(oPC,"neaura3: OBJECT_SELF = " + GetName(OBJECT_SELF) +
|
||||
// " Creator = " + GetName(GetAreaOfEffectCreator(OBJECT_SELF)) );
|
||||
|
||||
if(GetLocalInt(oTarget,"NEAura"))
|
||||
{
|
||||
//Search through the valid effects on the target.
|
||||
eAOE = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eAOE) && bValid == FALSE)
|
||||
{
|
||||
// SendMessageToPC(oPC,"EffectCreator is "+ GetName(GetEffectCreator(eAOE)));
|
||||
|
||||
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator(OBJECT_SELF))
|
||||
{
|
||||
nEffectType = GetEffectType(eAOE);
|
||||
if ( (nEffectType == EFFECT_TYPE_REGENERATE) ||
|
||||
(nEffectType == EFFECT_TYPE_TURN_RESISTANCE_INCREASE) ||
|
||||
(nEffectType == EFFECT_TYPE_NEGATIVELEVEL) )
|
||||
{
|
||||
//If the effect was created by the Acid_Fog then remove it
|
||||
if(GetEffectSpellId(eAOE) == -1)
|
||||
{
|
||||
RemoveEffect(oTarget, eAOE);
|
||||
if ( nEffectType == EFFECT_TYPE_NEGATIVELEVEL )
|
||||
bValid = TRUE;
|
||||
if ( nEffectType == EFFECT_TYPE_TURN_RESISTANCE_INCREASE )
|
||||
bTurn = TRUE;
|
||||
if ( nEffectType == EFFECT_TYPE_REGENERATE )
|
||||
bRegen = TRUE;
|
||||
if ( bTurn && bRegen )
|
||||
bValid = TRUE;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next effect on the target
|
||||
eAOE = GetNextEffect(oTarget);
|
||||
}
|
||||
SetLocalInt(oTarget,"NEAura",0);
|
||||
}
|
||||
}
|
4
_module/nss/null.nss
Normal file
4
_module/nss/null.nss
Normal file
@@ -0,0 +1,4 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
}
|
@@ -573,7 +573,7 @@ _______________________________________
|
||||
PROJECTILE_PATH_TYPE | int | |
|
||||
IS_INSTANT_SPELL | int | Returns TRUE if spell was instant else FALSE |
|
||||
|
||||
@note the stock nwscript GetMetaMagicFeat() function will return any metamagic used.
|
||||
@note the stock nwscript PRCGetMetaMagicFeat() function will return any metamagic used.
|
||||
|
||||
_______________________________________
|
||||
## Set Memorized Spell Slot Events
|
||||
|
77
_module/nss/onspawn_ab.nss
Normal file
77
_module/nss/onspawn_ab.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_spawn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default On Spawn script
|
||||
|
||||
|
||||
2003-07-28: Georg Zoeller:
|
||||
|
||||
If you set a ninteger on the creature named
|
||||
"X2_USERDEFINED_ONSPAWN_EVENTS"
|
||||
The creature will fire a pre and a post-spawn
|
||||
event on itself, depending on the value of that
|
||||
variable
|
||||
1 - Fire Userdefined Event 1510 (pre spawn)
|
||||
2 - Fire Userdefined Event 1511 (post spawn)
|
||||
3 - Fire both events
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner, Georg Zoeller
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||||
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// User defined OnSpawn event requested?
|
||||
int nSpecEvent = GetLocalInt(OBJECT_SELF,"X2_USERDEFINED_ONSPAWN_EVENTS");
|
||||
|
||||
// Pre Spawn Event requested
|
||||
if (nSpecEvent == 1 || nSpecEvent == 3 )
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
}
|
||||
|
||||
/* Fix for the new golems to reduce their number of attacks */
|
||||
|
||||
int nNumber = GetLocalInt(OBJECT_SELF,CREATURE_VAR_NUMBER_OF_ATTACKS);
|
||||
if (nNumber >0 )
|
||||
{
|
||||
SetBaseAttackBonus(nNumber);
|
||||
}
|
||||
|
||||
// Execute default OnSpawn script.
|
||||
ExecuteScript("nw_c2_default9", OBJECT_SELF);
|
||||
|
||||
|
||||
//Post Spawn event requeste
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
|
||||
int nAttackBonus = GetLocalInt(OBJECT_SELF,"ATTACK_BONUS");
|
||||
if ( nAttackBonus )
|
||||
{
|
||||
effect eAttack = EffectAttackIncrease(nAttackBonus);
|
||||
eAttack = SupernaturalEffect(eAttack);
|
||||
eAttack = ExtraordinaryEffect(eAttack);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eAttack,OBJECT_SELF);
|
||||
}
|
||||
int nSR = GetLocalInt(OBJECT_SELF,"SPELL_RESISTANCE");
|
||||
if ( nSR )
|
||||
{
|
||||
effect eSR = EffectSpellResistanceIncrease(nSR);
|
||||
eSR = SupernaturalEffect(eSR);
|
||||
eSR = ExtraordinaryEffect(eSR);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSR,OBJECT_SELF);
|
||||
}
|
||||
|
||||
}
|
94
_module/nss/onspawn_glowred.nss
Normal file
94
_module/nss/onspawn_glowred.nss
Normal file
@@ -0,0 +1,94 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_spawn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default On Spawn script
|
||||
|
||||
|
||||
2003-07-28: Georg Zoeller:
|
||||
|
||||
If you set a ninteger on the creature named
|
||||
"X2_USERDEFINED_ONSPAWN_EVENTS"
|
||||
The creature will fire a pre and a post-spawn
|
||||
event on itself, depending on the value of that
|
||||
variable
|
||||
1 - Fire Userdefined Event 1510 (pre spawn)
|
||||
2 - Fire Userdefined Event 1511 (post spawn)
|
||||
3 - Fire both events
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner, Georg Zoeller
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||||
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// User defined OnSpawn event requested?
|
||||
int nSpecEvent = GetLocalInt(OBJECT_SELF,"X2_USERDEFINED_ONSPAWN_EVENTS");
|
||||
|
||||
// Pre Spawn Event requested
|
||||
if (nSpecEvent == 1 || nSpecEvent == 3 )
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
}
|
||||
|
||||
/* Fix for the new golems to reduce their number of attacks */
|
||||
|
||||
int nNumber = GetLocalInt(OBJECT_SELF,CREATURE_VAR_NUMBER_OF_ATTACKS);
|
||||
if (nNumber >0 )
|
||||
{
|
||||
SetBaseAttackBonus(nNumber);
|
||||
}
|
||||
|
||||
// Execute default OnSpawn script.
|
||||
ExecuteScript("nw_c2_default9", OBJECT_SELF);
|
||||
|
||||
|
||||
//Post Spawn event requeste
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF);
|
||||
|
||||
|
||||
effect eShield = EffectDamageShield(0,DAMAGE_BONUS_2d6,DAMAGE_TYPE_FIRE);
|
||||
eShield = SupernaturalEffect(eShield);
|
||||
eShield = ExtraordinaryEffect(eShield);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eShield,OBJECT_SELF,HoursToSeconds(100));
|
||||
|
||||
effect eRegen = EffectRegenerate(30,6.0);
|
||||
eRegen = SupernaturalEffect(eRegen);
|
||||
eRegen = ExtraordinaryEffect(eRegen);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eRegen,OBJECT_SELF,HoursToSeconds(100));
|
||||
|
||||
int nAttackBonus = GetLocalInt(OBJECT_SELF,"ATTACK_BONUS");
|
||||
if ( nAttackBonus )
|
||||
{
|
||||
effect eAttack = EffectAttackIncrease(nAttackBonus);
|
||||
eAttack = SupernaturalEffect(eAttack);
|
||||
eAttack = ExtraordinaryEffect(eAttack);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eAttack,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nSR = GetLocalInt(OBJECT_SELF,"SPELL_RESISTANCE");
|
||||
if ( nSR )
|
||||
{
|
||||
effect eSR = EffectSpellResistanceIncrease(nSR);
|
||||
eSR = SupernaturalEffect(eSR);
|
||||
eSR = ExtraordinaryEffect(eSR);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSR,OBJECT_SELF);
|
||||
}
|
||||
|
||||
}
|
82
_module/nss/onspawn_regen.nss
Normal file
82
_module/nss/onspawn_regen.nss
Normal file
@@ -0,0 +1,82 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_spawn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default On Spawn script
|
||||
|
||||
|
||||
2003-07-28: Georg Zoeller:
|
||||
|
||||
If you set a ninteger on the creature named
|
||||
"X2_USERDEFINED_ONSPAWN_EVENTS"
|
||||
The creature will fire a pre and a post-spawn
|
||||
event on itself, depending on the value of that
|
||||
variable
|
||||
1 - Fire Userdefined Event 1510 (pre spawn)
|
||||
2 - Fire Userdefined Event 1511 (post spawn)
|
||||
3 - Fire both events
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner, Georg Zoeller
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||||
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// User defined OnSpawn event requested?
|
||||
int nSpecEvent = GetLocalInt(OBJECT_SELF,"X2_USERDEFINED_ONSPAWN_EVENTS");
|
||||
|
||||
// Pre Spawn Event requested
|
||||
if (nSpecEvent == 1 || nSpecEvent == 3 )
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
}
|
||||
|
||||
/* Fix for the new golems to reduce their number of attacks */
|
||||
|
||||
int nNumber = GetLocalInt(OBJECT_SELF,CREATURE_VAR_NUMBER_OF_ATTACKS);
|
||||
if (nNumber >0 )
|
||||
{
|
||||
SetBaseAttackBonus(nNumber);
|
||||
}
|
||||
|
||||
// Execute default OnSpawn script.
|
||||
ExecuteScript("nw_c2_default9", OBJECT_SELF);
|
||||
|
||||
|
||||
//Post Spawn event requeste
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
|
||||
effect eRegen = EffectRegenerate(40,6.0);
|
||||
eRegen = SupernaturalEffect(eRegen);
|
||||
eRegen = ExtraordinaryEffect(eRegen);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eRegen,OBJECT_SELF,HoursToSeconds(100));
|
||||
|
||||
int nAttackBonus = GetLocalInt(OBJECT_SELF,"ATTACK_BONUS");
|
||||
if ( nAttackBonus )
|
||||
{
|
||||
effect eAttack = EffectAttackIncrease(nAttackBonus);
|
||||
eAttack = SupernaturalEffect(eAttack);
|
||||
eAttack = ExtraordinaryEffect(eAttack);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eAttack,OBJECT_SELF);
|
||||
}
|
||||
int nSR = GetLocalInt(OBJECT_SELF,"SPELL_RESISTANCE");
|
||||
if ( nSR )
|
||||
{
|
||||
effect eSR = EffectSpellResistanceIncrease(nSR);
|
||||
eSR = SupernaturalEffect(eSR);
|
||||
eSR = ExtraordinaryEffect(eSR);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSR,OBJECT_SELF);
|
||||
}
|
||||
|
||||
}
|
81
_module/nss/onspawn_shadow.nss
Normal file
81
_module/nss/onspawn_shadow.nss
Normal file
@@ -0,0 +1,81 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_spawn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default On Spawn script
|
||||
|
||||
|
||||
2003-07-28: Georg Zoeller:
|
||||
|
||||
If you set a ninteger on the creature named
|
||||
"X2_USERDEFINED_ONSPAWN_EVENTS"
|
||||
The creature will fire a pre and a post-spawn
|
||||
event on itself, depending on the value of that
|
||||
variable
|
||||
1 - Fire Userdefined Event 1510 (pre spawn)
|
||||
2 - Fire Userdefined Event 1511 (post spawn)
|
||||
3 - Fire both events
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner, Georg Zoeller
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
|
||||
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// User defined OnSpawn event requested?
|
||||
int nSpecEvent = GetLocalInt(OBJECT_SELF,"X2_USERDEFINED_ONSPAWN_EVENTS");
|
||||
|
||||
// Pre Spawn Event requested
|
||||
if (nSpecEvent == 1 || nSpecEvent == 3 )
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
}
|
||||
|
||||
/* Fix for the new golems to reduce their number of attacks */
|
||||
|
||||
int nNumber = GetLocalInt(OBJECT_SELF,CREATURE_VAR_NUMBER_OF_ATTACKS);
|
||||
if (nNumber >0 )
|
||||
{
|
||||
SetBaseAttackBonus(nNumber);
|
||||
}
|
||||
|
||||
// Execute default OnSpawn script.
|
||||
ExecuteScript("nw_c2_default9", OBJECT_SELF);
|
||||
|
||||
|
||||
//Post Spawn event requeste
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF);
|
||||
|
||||
int nAttackBonus = GetLocalInt(OBJECT_SELF,"ATTACK_BONUS");
|
||||
if ( nAttackBonus )
|
||||
{
|
||||
effect eAttack = EffectAttackIncrease(nAttackBonus);
|
||||
eAttack = SupernaturalEffect(eAttack);
|
||||
eAttack = ExtraordinaryEffect(eAttack);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eAttack,OBJECT_SELF);
|
||||
}
|
||||
int nSR = GetLocalInt(OBJECT_SELF,"SPELL_RESISTANCE");
|
||||
if ( nSR )
|
||||
{
|
||||
effect eSR = EffectSpellResistanceIncrease(nSR);
|
||||
eSR = SupernaturalEffect(eSR);
|
||||
eSR = ExtraordinaryEffect(eSR);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSR,OBJECT_SELF);
|
||||
}
|
||||
}
|
62
_module/nss/onspell_infernal.nss
Normal file
62
_module/nss/onspell_infernal.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_spellcast
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default On Spell Cast At script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ: 2003-10-16
|
||||
// Make Plot Creatures Ignore Attacks
|
||||
//--------------------------------------------------------------------------
|
||||
if (GetPlotFlag(OBJECT_SELF))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Execute old NWN default AI code
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
int nSpell = GetLastSpell();
|
||||
object oCaster = GetLastSpellCaster();
|
||||
|
||||
// SpeakString("Spellcast: " + IntToString(nSpell) + " Caster: " + GetName(oCaster));
|
||||
if ( oCaster == OBJECT_SELF || !GetIsEnemy(oCaster) )
|
||||
{
|
||||
// SpeakString("Not Hostile Spell");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( GetLocalInt(OBJECT_SELF,"Immune_" + IntToString(nSpell) ) )
|
||||
{
|
||||
// SpeakString("Already Immune");
|
||||
return;
|
||||
}
|
||||
SetLocalInt(OBJECT_SELF,"Immune_" + IntToString(nSpell),1 );
|
||||
|
||||
effect eImmune = EffectSpellImmunity(nSpell);
|
||||
// if ( GetIsEffectValid(eImmune) )
|
||||
// {
|
||||
eImmune = SupernaturalEffect(eImmune);
|
||||
eImmune = ExtraordinaryEffect(eImmune);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eImmune,OBJECT_SELF);
|
||||
SendMessageToPC(oCaster,"The Infernal is now immune to that spell!");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SpeakString("eImmune is Invalid");
|
||||
// }
|
||||
|
||||
ExecuteScript("nw_c2_defaultb", OBJECT_SELF);
|
||||
|
||||
}
|
132
_module/nss/phaethon_ai.nss
Normal file
132
_module/nss/phaethon_ai.nss
Normal file
@@ -0,0 +1,132 @@
|
||||
|
||||
#include "nw_i0_generic"
|
||||
#include "x2_inc_switches"
|
||||
#include "inc_AI"
|
||||
|
||||
void DoPhysical( object oTarget, object oCaster )
|
||||
{
|
||||
if ( !GetIsObjectValid(oTarget) || !GetIsEnemy(oTarget) )
|
||||
{
|
||||
oTarget = GetNearestEnemy();
|
||||
if ( !GetIsObjectValid(oTarget) )
|
||||
return;
|
||||
}
|
||||
TalentMeleeAttack(oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The following two lines should not be touched
|
||||
object oIntruder = GetCreatureOverrideAIScriptTarget();
|
||||
ClearCreatureOverrideAIScriptTarget();
|
||||
int bAura = GetLocalInt(OBJECT_SELF,"aura");
|
||||
if ( !bAura )
|
||||
{
|
||||
string sScript = GetLocalString(OBJECT_SELF,"Aura_Script");
|
||||
if ( sScript != "" )
|
||||
ExecuteScript(sScript,OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF,"aura",1);
|
||||
}
|
||||
if ( !GetCanAct(OBJECT_SELF) )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
if ( GetLocalInt(OBJECT_SELF,"Acting") )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
/* if ( d6() == 1 ) // in case they get busy-stuck, also to add randomness
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"busy",FALSE);
|
||||
return;
|
||||
} */
|
||||
// Don't inturupt actions in progress
|
||||
|
||||
|
||||
if ( GetCurrentAction() == ACTION_CASTSPELL )
|
||||
{
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetLocalInt(OBJECT_SELF,"physical") )
|
||||
{
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
// Haste = Super awesome;
|
||||
// Get those summons in there!
|
||||
int nSummonCount = GetLocalInt(OBJECT_SELF,"SummonCount");
|
||||
if ( !GetIsObjectValid(GetAssociate(ASSOCIATE_TYPE_SUMMONED)) && nSummonCount < 10 )
|
||||
{
|
||||
nSummonCount++;
|
||||
SetLocalInt(OBJECT_SELF,"SummonCount",nSummonCount);
|
||||
ClearAllActions();
|
||||
ActionCastFakeSpellAtLocation(SPELL_SUMMON_CREATURE_IX,GetLocation(OBJECT_SELF));
|
||||
effect eSummon = EffectSummonCreature("NW_FIREELDER",VFX_FNF_SUMMON_MONSTER_3,1.0);
|
||||
|
||||
location lSelf;
|
||||
object oTarget = FindSingleRangedTarget();
|
||||
if(GetIsObjectValid(oIntruder))
|
||||
{
|
||||
vector vTarget = GetPosition(oIntruder);
|
||||
vector vSource = GetPosition(OBJECT_SELF);
|
||||
vector vDirection = vTarget - vSource;
|
||||
float fDistance = VectorMagnitude(vDirection) / 2.0f;
|
||||
vector vPoint = VectorNormalize(vDirection) * fDistance + vSource;
|
||||
lSelf = Location(GetArea(OBJECT_SELF), vPoint, GetFacing(OBJECT_SELF));
|
||||
//lSelf = GetLocation(oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
lSelf = GetLocation(OBJECT_SELF);
|
||||
}
|
||||
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eSummon,lSelf,HoursToSeconds(24));
|
||||
SetCreatureOverrideAIScriptFinished();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Hostile targeting actions
|
||||
if ( !GetIsObjectValid(oIntruder) || !GetIsReactionTypeHostile(oIntruder) )
|
||||
{
|
||||
oIntruder = GetNearestPerceivedEnemy();
|
||||
if ( !GetIsObjectValid(oIntruder) )
|
||||
return;
|
||||
}
|
||||
|
||||
// Melee up sometimes!
|
||||
|
||||
if ( d6() == 6 )
|
||||
{
|
||||
switch ( d4() )
|
||||
{
|
||||
case 1:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
|
||||
break;
|
||||
case 2:
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
break;
|
||||
case 3:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
break;
|
||||
case 4:
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
|
||||
break;
|
||||
}
|
||||
|
||||
SetLocalInt(OBJECT_SELF,"physical",1);
|
||||
DelayCommand(24.0,SetLocalInt(OBJECT_SELF,"physical",0));
|
||||
ClearAllActions();
|
||||
DoPhysical(oIntruder,OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
94
_module/nss/plague_blight.nss
Normal file
94
_module/nss/plague_blight.nss
Normal file
@@ -0,0 +1,94 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoConDamage(object oTarget)
|
||||
{
|
||||
int nDam = d4();
|
||||
int nKillEm = FALSE;
|
||||
if ( (!GetIsPC( oTarget ) ) || ( GetGameDifficulty() >= GAME_DIFFICULTY_CORE_RULES ) )
|
||||
{
|
||||
nKillEm = 1;
|
||||
}
|
||||
|
||||
int nTargetAbility = GetAbilityScore(oTarget, ABILITY_CONSTITUTION);
|
||||
if ( ( (nTargetAbility - nDam) < 3) && nKillEm )
|
||||
{
|
||||
int nHitPoints = GetCurrentHitPoints(oTarget);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHitDamage = EffectDamage(nHitPoints, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHitDamage, oTarget);
|
||||
}
|
||||
|
||||
effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION,nDam);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DISEASE_S);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eCon,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
|
||||
|
||||
|
||||
}
|
||||
int DoPlague(object oTarget, float fDelay)
|
||||
{
|
||||
|
||||
int nRoll = PRCMySavingThrow(SAVING_THROW_FORT,oTarget,15,SAVING_THROW_TYPE_DISEASE);
|
||||
|
||||
if ( nRoll == 0 )
|
||||
{
|
||||
SetLocalInt(oTarget,"LastRoundSuccess",0);
|
||||
DelayCommand(fDelay,DoConDamage(oTarget));
|
||||
return TRUE;
|
||||
}
|
||||
if ( nRoll == 1 )
|
||||
{
|
||||
if ( GetLocalInt(oTarget,"LastRoundSuccess") )
|
||||
{
|
||||
DelayCommand(fDelay,SendMessageToPC(oTarget,"Recovered from Gangrenous Touch"));
|
||||
DelayCommand(fDelay,SetLocalInt(oTarget,"PB_Plague",0));
|
||||
return FALSE;
|
||||
}
|
||||
SetLocalInt(oTarget,"LastRoundSuccess",1);
|
||||
return TRUE;
|
||||
}
|
||||
DelayCommand(fDelay,SetLocalInt(oTarget,"PB_Plague",0));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
|
||||
if ( GetLocalInt(oTarget,"PB_Plague") )
|
||||
{
|
||||
SendMessageToPC(oOrigin,"Creature already has this effect.");
|
||||
return;
|
||||
}
|
||||
int nDelay = 0;
|
||||
|
||||
if ( PRCMySavingThrow(SAVING_THROW_FORT,oTarget,15,SAVING_THROW_TYPE_DISEASE) )
|
||||
return;
|
||||
|
||||
SetLocalInt(oTarget,"PB_Plague",1);
|
||||
// effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
// ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
|
||||
if ( GetIsImmune(oTarget,IMMUNITY_TYPE_DISEASE) )
|
||||
{
|
||||
SendMessageToPC(oOrigin,"Target is immune to disease");
|
||||
SendMessageToPC(oTarget,"Immune to disease");
|
||||
return;
|
||||
}
|
||||
|
||||
SetLocalInt(oTarget,"LastRoundSuccess",0);
|
||||
SendMessageToPC(oTarget,"You've contracted Gangrenous Touch.");
|
||||
while ( DoPlague(oTarget,RoundsToSeconds(nDelay)) && nDelay < 10 )
|
||||
{
|
||||
nDelay++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
8
_module/nss/plagueaura.nss
Normal file
8
_module/nss/plagueaura.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
//Set and apply AOE object
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_TYRANT_FOG,"plagueaura1","plagueaura2","rotaura2");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100));
|
||||
}
|
39
_module/nss/plagueaura1.nss
Normal file
39
_module/nss/plagueaura1.nss
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoStrDamage(object oTarget)
|
||||
{
|
||||
effect eStr = EffectAbilityDecrease(ABILITY_STRENGTH,d6());
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eStr,oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
object oTarget = GetEnteringObject();
|
||||
|
||||
effect eNaus = EffectDazed();
|
||||
effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
eNaus = EffectLinkEffects(eNaus,eVis2);
|
||||
eNaus = EffectLinkEffects(eNaus,eDur);
|
||||
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S);
|
||||
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if (( nRace == RACIAL_TYPE_CONSTRUCT ) || ( nRace == RACIAL_TYPE_ELEMENTAL )
|
||||
|| ( nRace == RACIAL_TYPE_UNDEAD ))
|
||||
return;
|
||||
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
if (!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 15, SAVING_THROW_TYPE_NONE,oCaster))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eNaus,oTarget,RoundsToSeconds(1));
|
||||
DelayCommand(0.1,DoStrDamage(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
}
|
||||
}
|
42
_module/nss/plagueaura2.nss
Normal file
42
_module/nss/plagueaura2.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoStrDamage(object oTarget)
|
||||
{
|
||||
effect eStr = EffectAbilityDecrease(ABILITY_STRENGTH,d6());
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eStr,oTarget);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
effect eNaus = EffectDazed();
|
||||
effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
eNaus = EffectLinkEffects(eNaus,eVis2);
|
||||
eNaus = EffectLinkEffects(eNaus,eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S);
|
||||
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetIsEnemy(oTarget, oCaster))
|
||||
{
|
||||
int nRace = GetRacialType(oTarget);
|
||||
if (( nRace == RACIAL_TYPE_CONSTRUCT ) || ( nRace == RACIAL_TYPE_ELEMENTAL )
|
||||
|| ( nRace == RACIAL_TYPE_UNDEAD ))
|
||||
break;
|
||||
if (!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 15, SAVING_THROW_TYPE_NONE,oCaster))
|
||||
{
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eNaus,oTarget,RoundsToSeconds(1));
|
||||
DelayCommand(0.1,DoStrDamage(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
}
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
16
_module/nss/prism_aura.nss
Normal file
16
_module/nss/prism_aura.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
void main()
|
||||
{
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_ELECTRICAL,"prism_aura1","prism_aura2","null");
|
||||
eAOE = SupernaturalEffect(eAOE);
|
||||
eAOE = ExtraordinaryEffect(eAOE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,HoursToSeconds(100));
|
||||
|
||||
effect eConceal = EffectConcealment(50);
|
||||
eConceal = SupernaturalEffect(eConceal);
|
||||
eConceal = ExtraordinaryEffect(eConceal);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eConceal,OBJECT_SELF);
|
||||
|
||||
|
||||
}
|
136
_module/nss/prism_aura1.nss
Normal file
136
_module/nss/prism_aura1.nss
Normal file
@@ -0,0 +1,136 @@
|
||||
#include "nw_i0_spells"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoPrismatic(object oTarget, object oCaster);
|
||||
int ApplyPrismaticEffect(int nEffect, object oTarget, object oCaster);
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetEnteringObject();
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
|
||||
if ( oTarget == oCaster )
|
||||
return;
|
||||
|
||||
if ( GetIsEnemy(oTarget,oCaster) )
|
||||
{
|
||||
DoPrismatic(oTarget,oCaster);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DoPrismatic(object oTarget, object oCaster)
|
||||
{
|
||||
float fDelay = 0.0;
|
||||
int nCasterLevel = GetHitDice(oCaster);
|
||||
int nHD = GetHitDice(oTarget);
|
||||
int nVisual = 0;
|
||||
effect eVisual;
|
||||
if (nHD <= 8)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectBlindness(), oTarget, RoundsToSeconds(nCasterLevel));
|
||||
}
|
||||
//Determine if 1 or 2 effects are going to be applied
|
||||
int nRandom = d8();
|
||||
if(nRandom == 8)
|
||||
{
|
||||
//Get the visual effect
|
||||
nVisual = ApplyPrismaticEffect(Random(7) + 1, oTarget,oCaster);
|
||||
nVisual = ApplyPrismaticEffect(Random(7) + 1, oTarget,oCaster);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Get the visual effect
|
||||
nVisual = ApplyPrismaticEffect(nRandom, oTarget,oCaster);
|
||||
}
|
||||
//Set the visual effect
|
||||
if(nVisual != 0)
|
||||
{
|
||||
eVisual = EffectVisualEffect(nVisual);
|
||||
//Apply the visual effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget));
|
||||
}
|
||||
}
|
||||
|
||||
int ApplyPrismaticEffect(int nEffect, object oTarget, object oCaster)
|
||||
{
|
||||
int nDC = 49;
|
||||
int nDamage;
|
||||
effect ePrism;
|
||||
effect eVis;
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink;
|
||||
int nVis;
|
||||
float fDelay = 0.0;
|
||||
//Based on the random number passed in, apply the appropriate effect and set the visual to
|
||||
//the correct constant
|
||||
switch(nEffect)
|
||||
{
|
||||
case 1://fire
|
||||
nDamage = 20;
|
||||
nVis = VFX_IMP_FLAME_S;
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_FIRE,oCaster);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 2: //Acid
|
||||
nDamage = 40;
|
||||
nVis = VFX_IMP_ACID_L;
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ACID,oCaster);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 3: //Electricity
|
||||
nDamage = 80;
|
||||
nVis = VFX_IMP_LIGHTNING_S;
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ELECTRICITY,oCaster);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 4: //Poison
|
||||
{
|
||||
effect ePoison = EffectPoison(POISON_BEBILITH_VENOM);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePoison, oTarget));
|
||||
}
|
||||
break;
|
||||
case 5: //Paralyze
|
||||
{
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
if (PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC,SAVING_THROW_TYPE_NONE,oCaster) == 0)
|
||||
{
|
||||
ePrism = EffectParalyze();
|
||||
eLink = EffectLinkEffects(eDur, ePrism);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6: //Confusion
|
||||
{
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
ePrism = EffectConfused();
|
||||
eLink = EffectLinkEffects(eMind, ePrism);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oCaster, fDelay))
|
||||
{
|
||||
nVis = VFX_IMP_CONFUSION_S;
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7: //Death
|
||||
{
|
||||
if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oCaster, fDelay))
|
||||
{
|
||||
//nVis = VFX_IMP_DEATH;
|
||||
ePrism = EffectDeath();
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return nVis;
|
||||
}
|
||||
|
||||
|
137
_module/nss/prism_aura2.nss
Normal file
137
_module/nss/prism_aura2.nss
Normal file
@@ -0,0 +1,137 @@
|
||||
#include "nw_i0_spells"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void DoPrismatic(object oTarget, object oCaster);
|
||||
int ApplyPrismaticEffect(int nEffect, object oTarget, object oCaster);
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
object oTarget = GetFirstInPersistentObject();
|
||||
|
||||
while ( GetIsObjectValid(oTarget ) )
|
||||
{
|
||||
if ( GetIsEnemy(oTarget,oCaster) )
|
||||
{
|
||||
DoPrismatic(oTarget,oCaster);
|
||||
}
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DoPrismatic(object oTarget, object oCaster)
|
||||
{
|
||||
float fDelay = 0.0;
|
||||
int nCasterLevel = GetHitDice(oCaster);
|
||||
int nHD = GetHitDice(oTarget);
|
||||
int nVisual = 0;
|
||||
effect eVisual;
|
||||
if (nHD <= 8)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectBlindness(), oTarget, RoundsToSeconds(nCasterLevel));
|
||||
}
|
||||
//Determine if 1 or 2 effects are going to be applied
|
||||
int nRandom = d8();
|
||||
if(nRandom == 8)
|
||||
{
|
||||
//Get the visual effect
|
||||
nVisual = ApplyPrismaticEffect(Random(7) + 1, oTarget,oCaster);
|
||||
nVisual = ApplyPrismaticEffect(Random(7) + 1, oTarget,oCaster);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Get the visual effect
|
||||
nVisual = ApplyPrismaticEffect(nRandom, oTarget,oCaster);
|
||||
}
|
||||
//Set the visual effect
|
||||
if(nVisual != 0)
|
||||
{
|
||||
eVisual = EffectVisualEffect(nVisual);
|
||||
//Apply the visual effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget));
|
||||
}
|
||||
}
|
||||
|
||||
int ApplyPrismaticEffect(int nEffect, object oTarget, object oCaster)
|
||||
{
|
||||
int nDC = 49;
|
||||
int nDamage;
|
||||
effect ePrism;
|
||||
effect eVis;
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink;
|
||||
int nVis;
|
||||
float fDelay = 0.0;
|
||||
//Based on the random number passed in, apply the appropriate effect and set the visual to
|
||||
//the correct constant
|
||||
switch(nEffect)
|
||||
{
|
||||
case 1://fire
|
||||
nDamage = 20;
|
||||
nVis = VFX_IMP_FLAME_S;
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_FIRE,oCaster);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 2: //Acid
|
||||
nDamage = 40;
|
||||
nVis = VFX_IMP_ACID_L;
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ACID,oCaster);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 3: //Electricity
|
||||
nDamage = 80;
|
||||
nVis = VFX_IMP_LIGHTNING_S;
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ELECTRICITY,oCaster);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 4: //Poison
|
||||
{
|
||||
effect ePoison = EffectPoison(POISON_BEBILITH_VENOM);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePoison, oTarget));
|
||||
}
|
||||
break;
|
||||
case 5: //Paralyze
|
||||
{
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
if (PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC,SAVING_THROW_TYPE_NONE,oCaster) == 0)
|
||||
{
|
||||
ePrism = EffectParalyze();
|
||||
eLink = EffectLinkEffects(eDur, ePrism);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6: //Confusion
|
||||
{
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
ePrism = EffectConfused();
|
||||
eLink = EffectLinkEffects(eMind, ePrism);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oCaster, fDelay))
|
||||
{
|
||||
nVis = VFX_IMP_CONFUSION_S;
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7: //Death
|
||||
{
|
||||
if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oCaster, fDelay))
|
||||
{
|
||||
//nVis = VFX_IMP_DEATH;
|
||||
ePrism = EffectDeath();
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return nVis;
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@
|
||||
It will make that NPC this horse's master.
|
||||
|
||||
20221201: Jaysyn
|
||||
Modified to read desired CODI AI spawner
|
||||
Modified to read desiredCODI AI spawner
|
||||
from string var "SPAWN_TYPE" set on the NPC,
|
||||
defaults to fighter.
|
||||
|
||||
@@ -82,22 +82,6 @@ void Bullywug(object oNPC)
|
||||
int nAppearance = Random(3) + 3053; // Randomly choose between 3053, 3054, and 3055
|
||||
|
||||
DelayCommand(0.1f, SetCreatureAppearanceType(oNPC, nAppearance));
|
||||
|
||||
|
||||
/* switch(nRandom)
|
||||
{
|
||||
case 1:
|
||||
{ nAppearance = 3053; break;} //:: Bullywug: Brown-Green* (baba yaga)
|
||||
|
||||
case 2:
|
||||
{ nAppearance = 3054; break;} //:: Bullywug: Green* (baba yaga)
|
||||
|
||||
case 3:
|
||||
{ nAppearance = 3055; break;} //:: Bullywug: Brown* (baba yaga)
|
||||
|
||||
}
|
||||
|
||||
DelayCommand(0.0f, SetCreatureAppearanceType(oNPC, nAppearance)); */
|
||||
}
|
||||
|
||||
|
||||
@@ -420,6 +404,169 @@ void main()
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShield,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nAura = GetLocalInt (OBJECT_SELF,"AURA_COLOR");
|
||||
if (nAura == 1)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 2)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_BLUE_DARK);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 3)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_BLUE_LIGHT);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 4)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 5)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_CYAN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 6)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 7)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_GREEN_DARK);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 8)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_GREEN_LIGHT);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 9)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_MAGENTA);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 10)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 11)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_BLUE_BLACK);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 12)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_BLUE_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 13)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_BLUE_WHITE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 14)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_BLUE_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 15)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_BROWN_BLACK);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 16)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_BROWN_WHITE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 17)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_CYAN_BLACK);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 18)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_CYAN_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 19)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_CYAN_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 20)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_CYAN_RED );
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 21)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_CYAN_WHITE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 22)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_CYAN_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nAura == 23)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_PULSE_GREEN_BLACK);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nGlow = GetLocalInt (OBJECT_SELF,"GLOW_COLOR");
|
||||
if (nGlow == 1)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user