Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
292
_working/nw_c2_default1.nss
Normal file
292
_working/nw_c2_default1.nss
Normal file
@@ -0,0 +1,292 @@
|
||||
////////////::////////////////////////////////////////////////////
|
||||
//:: Default On Heartbeat
|
||||
//:: NW_C2_DEFAULT1
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//::////////////////////////////////////////////////////
|
||||
/*
|
||||
This script will have people perform default
|
||||
animations.
|
||||
*/
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 23, 2001
|
||||
//:://///////////////////////////////////////////////
|
||||
|
||||
// makes the mob sneak if it should be
|
||||
void CheckSneak(object oMob=OBJECT_SELF);
|
||||
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
// * 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))
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int nTalent=FALSE;
|
||||
|
||||
|
||||
object oTarget=GetTarget();
|
||||
if ((GetIsDead(oTarget))||(!GetIsEnemy(oTarget)))
|
||||
{
|
||||
SetTarget(OBJECT_INVALID);
|
||||
oTarget=OBJECT_INVALID;
|
||||
}
|
||||
|
||||
|
||||
// NB, note D8 check below also applies
|
||||
if ((GetArea(oTarget)!=GetArea(OBJECT_SELF))&&(d4()==1))
|
||||
{
|
||||
SetTarget(OBJECT_INVALID);
|
||||
oTarget=OBJECT_INVALID;
|
||||
}
|
||||
|
||||
int nCoward=FALSE;
|
||||
if ((GetLevelByClass(CLASS_TYPE_COMMONER)>=1)||(GetLocalInt(OBJECT_SELF,"coward")==TRUE))
|
||||
{
|
||||
nCoward=TRUE;
|
||||
}
|
||||
|
||||
// puts the NPC into spot mode if it is near its target but cannot see it
|
||||
/// or takes it out if it is already near its target and has failed to see it
|
||||
|
||||
if ((!GetObjectSeen(oTarget))&&(GetIsObjectValid(oTarget))&&(GetDistanceToObject(oTarget)<12.0)&&(!GetIsFighting(OBJECT_SELF)))
|
||||
{
|
||||
if ((!GetHasEffect(EFFECT_TYPE_TRUESEEING))&&(!GetHasEffect(EFFECT_TYPE_SEEINVISIBLE)))
|
||||
|
||||
|
||||
{
|
||||
nTalent=TalentSeeInvisible();
|
||||
}
|
||||
|
||||
if ((!GetDetectMode(OBJECT_SELF))&&(!GetIsFighting(OBJECT_SELF))&&(nTalent==FALSE))
|
||||
{
|
||||
|
||||
ActionUseSkill(SKILL_SPOT,OBJECT_SELF);
|
||||
SetTarget(OBJECT_INVALID);
|
||||
oTarget=OBJECT_INVALID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!GetIsObjectValid(oTarget))
|
||||
{
|
||||
oTarget=GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,OBJECT_SELF,1,CREATURE_TYPE_PERCEPTION,PERCEPTION_SEEN_AND_HEARD);
|
||||
|
||||
if (!GetIsObjectValid(oTarget))
|
||||
{
|
||||
oTarget=GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,OBJECT_SELF,1,CREATURE_TYPE_PERCEPTION,PERCEPTION_SEEN_AND_NOT_HEARD);
|
||||
}
|
||||
if (!GetIsObjectValid(oTarget))
|
||||
{
|
||||
oTarget=GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,OBJECT_SELF,1,CREATURE_TYPE_PERCEPTION,PERCEPTION_HEARD_AND_NOT_SEEN);
|
||||
}
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
SetTarget(oTarget);
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY))
|
||||
{
|
||||
if(TalentAdvancedBuff(40.0))
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY, FALSE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!GetIsInCombat(OBJECT_SELF)&&(GetIsObjectValid(oTarget))&&(nCoward==FALSE))
|
||||
{
|
||||
if (GetObjectSeen(oTarget)||GetObjectHeard(oTarget))
|
||||
{
|
||||
if ((GetStealthMode(OBJECT_SELF)!=TRUE)&&(d3()==1))
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
}
|
||||
if (!GetIsFighting(OBJECT_SELF))
|
||||
{
|
||||
DetermineCombatRound();
|
||||
}
|
||||
//Shout Attack my target, only works with the On Spawn In setup
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((GetHitDice(OBJECT_SELF)<4)||(d8()==1))
|
||||
{
|
||||
SetTarget(OBJECT_INVALID);
|
||||
oTarget=OBJECT_INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionMoveToObject(oTarget,TRUE,4.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
if((!GetIsInCombat())&&(GetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING))&&(!GetIsObjectValid(oTarget)))
|
||||
{
|
||||
|
||||
// turn off spot mode if in spot mode
|
||||
|
||||
if (GetDetectMode(OBJECT_SELF))
|
||||
{
|
||||
ActionUseSkill(SKILL_SPOT,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nDay = FALSE;
|
||||
if(GetIsDay() || GetIsDawn())
|
||||
{
|
||||
nDay = TRUE;
|
||||
}
|
||||
if(GetLocalInt(OBJECT_SELF, "NW_GENERIC_DAY_NIGHT") != nDay)
|
||||
{
|
||||
if(nDay == TRUE)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "NW_GENERIC_DAY_NIGHT", TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "NW_GENERIC_DAY_NIGHT", FALSE);
|
||||
}
|
||||
WalkWayPoints();
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
if((!GetIsInCombat())&&(!GetHasEffect(EFFECT_TYPE_SLEEP))&&(!GetIsObjectValid(oTarget))&& (!IsInConversation(OBJECT_SELF)))
|
||||
{
|
||||
// make the mob sneak at this point if it should be
|
||||
CheckSneak(OBJECT_SELF);
|
||||
|
||||
// check if it has any waypoints to walk
|
||||
if(GetIsPostOrWalking())
|
||||
{
|
||||
///SpeakString("I should be wwp");
|
||||
WalkWayPoints();
|
||||
}
|
||||
else
|
||||
/// no waypoints so do something else
|
||||
if (GetisCustomEncounterCreature())
|
||||
{
|
||||
// custom encounter creatures check where they are and go home if needed
|
||||
if ((GetDistanceBetweenLocations(GetLocation(OBJECT_SELF),GetStartLocation())>7.0)||(GetAreaFromLocation(GetStartLocation())!=GetArea(OBJECT_SELF)))
|
||||
{
|
||||
ActionMoveToLocation(GetStartLocation());
|
||||
}
|
||||
// It is at home already so . .
|
||||
else
|
||||
{
|
||||
// check if we need to rest
|
||||
if (!MonsterRest())
|
||||
{ // We dont need to rest, so just do our animations
|
||||
PlayMobileAmbientAnimations();
|
||||
}
|
||||
}
|
||||
// End custom encounter creature stuff
|
||||
}
|
||||
else
|
||||
// Now we have non custom mobs - they just do immobile animations if needed
|
||||
if (GetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS))
|
||||
{
|
||||
//SpeakString("I have failed to wwp");
|
||||
PlayImmobileAmbientAnimations();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Send the user-defined event signal if specified
|
||||
if(GetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_HEARTBEAT));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CheckSneak(object oMob=OBJECT_SELF)
|
||||
{
|
||||
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
|
||||
{
|
||||
|
||||
if (!GetStealthMode(OBJECT_SELF)==STEALTH_MODE_ACTIVATED)
|
||||
{
|
||||
ActionUseSkill(SKILL_HIDE,OBJECT_SELF);
|
||||
//SpeakString("stealthing from hb");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
253
_working/nw_c2_default1.nss.bak
Normal file
253
_working/nw_c2_default1.nss.bak
Normal file
@@ -0,0 +1,253 @@
|
||||
////////////::////////////////////////////////////////////////////
|
||||
//:: Default On Heartbeat
|
||||
//:: NW_C2_DEFAULT1
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//::////////////////////////////////////////////////////
|
||||
/*
|
||||
This script will have people perform default
|
||||
animations.
|
||||
*/
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 23, 2001
|
||||
//:://///////////////////////////////////////////////
|
||||
|
||||
// makes the mob sneak if it should be
|
||||
void CheckSneak(object oMob=OBJECT_SELF);
|
||||
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nTalent=FALSE;
|
||||
|
||||
|
||||
object oTarget=GetTarget();
|
||||
if ((GetIsDead(oTarget))||(!GetIsEnemy(oTarget)))
|
||||
{
|
||||
SetTarget(OBJECT_INVALID);
|
||||
oTarget=OBJECT_INVALID;
|
||||
}
|
||||
|
||||
|
||||
// NB, note D8 check below also applies
|
||||
if ((GetArea(oTarget)!=GetArea(OBJECT_SELF))&&(d4()==1))
|
||||
{
|
||||
SetTarget(OBJECT_INVALID);
|
||||
oTarget=OBJECT_INVALID;
|
||||
}
|
||||
|
||||
int nCoward=FALSE;
|
||||
if ((GetLevelByClass(CLASS_TYPE_COMMONER)>=1)||(GetLocalInt(OBJECT_SELF,"coward")==TRUE))
|
||||
{
|
||||
nCoward=TRUE;
|
||||
}
|
||||
|
||||
// puts the NPC into spot mode if it is near its target but cannot see it
|
||||
/// or takes it out if it is already near its target and has failed to see it
|
||||
|
||||
if ((!GetObjectSeen(oTarget))&&(GetIsObjectValid(oTarget))&&(GetDistanceToObject(oTarget)<12.0)&&(!GetIsFighting(OBJECT_SELF)))
|
||||
{
|
||||
if ((!GetHasEffect(EFFECT_TYPE_TRUESEEING))&&(!GetHasEffect(EFFECT_TYPE_SEEINVISIBLE)))
|
||||
|
||||
|
||||
{
|
||||
nTalent=TalentSeeInvisible();
|
||||
}
|
||||
|
||||
if ((!GetDetectMode(OBJECT_SELF))&&(!GetIsFighting(OBJECT_SELF))&&(nTalent==FALSE))
|
||||
{
|
||||
|
||||
ActionUseSkill(SKILL_SPOT,OBJECT_SELF);
|
||||
SetTarget(OBJECT_INVALID);
|
||||
oTarget=OBJECT_INVALID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!GetIsObjectValid(oTarget))
|
||||
{
|
||||
oTarget=GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,OBJECT_SELF,1,CREATURE_TYPE_PERCEPTION,PERCEPTION_SEEN_AND_HEARD);
|
||||
|
||||
if (!GetIsObjectValid(oTarget))
|
||||
{
|
||||
oTarget=GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,OBJECT_SELF,1,CREATURE_TYPE_PERCEPTION,PERCEPTION_SEEN_AND_NOT_HEARD);
|
||||
}
|
||||
if (!GetIsObjectValid(oTarget))
|
||||
{
|
||||
oTarget=GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,OBJECT_SELF,1,CREATURE_TYPE_PERCEPTION,PERCEPTION_HEARD_AND_NOT_SEEN);
|
||||
}
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
SetTarget(oTarget);
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY))
|
||||
{
|
||||
if(TalentAdvancedBuff(40.0))
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY, FALSE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!GetIsInCombat(OBJECT_SELF)&&(GetIsObjectValid(oTarget))&&(nCoward==FALSE))
|
||||
{
|
||||
if (GetObjectSeen(oTarget)||GetObjectHeard(oTarget))
|
||||
{
|
||||
if ((GetStealthMode(OBJECT_SELF)!=TRUE)&&(d3()==1))
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
}
|
||||
if (!GetIsFighting(OBJECT_SELF))
|
||||
{
|
||||
DetermineCombatRound();
|
||||
}
|
||||
//Shout Attack my target, only works with the On Spawn In setup
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((GetHitDice(OBJECT_SELF)<4)||(d8()==1))
|
||||
{
|
||||
SetTarget(OBJECT_INVALID);
|
||||
oTarget=OBJECT_INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionMoveToObject(oTarget,TRUE,4.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
else
|
||||
if((!GetIsInCombat())&&(GetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING))&&(!GetIsObjectValid(oTarget)))
|
||||
{
|
||||
|
||||
// turn off spot mode if in spot mode
|
||||
|
||||
if (GetDetectMode(OBJECT_SELF))
|
||||
{
|
||||
ActionUseSkill(SKILL_SPOT,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nDay = FALSE;
|
||||
if(GetIsDay() || GetIsDawn())
|
||||
{
|
||||
nDay = TRUE;
|
||||
}
|
||||
if(GetLocalInt(OBJECT_SELF, "NW_GENERIC_DAY_NIGHT") != nDay)
|
||||
{
|
||||
if(nDay == TRUE)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "NW_GENERIC_DAY_NIGHT", TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "NW_GENERIC_DAY_NIGHT", FALSE);
|
||||
}
|
||||
WalkWayPoints();
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
if((!GetIsInCombat())&&(!GetHasEffect(EFFECT_TYPE_SLEEP))&&(!GetIsObjectValid(oTarget))&& (!IsInConversation(OBJECT_SELF)))
|
||||
{
|
||||
// make the mob sneak at this point if it should be
|
||||
CheckSneak(OBJECT_SELF);
|
||||
|
||||
// check if it has any waypoints to walk
|
||||
if(GetIsPostOrWalking())
|
||||
{
|
||||
///SpeakString("I should be wwp");
|
||||
WalkWayPoints();
|
||||
}
|
||||
else
|
||||
/// no waypoints so do something else
|
||||
if (GetisCustomEncounterCreature())
|
||||
{
|
||||
// custom encounter creatures check where they are and go home if needed
|
||||
if ((GetDistanceBetweenLocations(GetLocation(OBJECT_SELF),GetStartLocation())>7.0)||(GetAreaFromLocation(GetStartLocation())!=GetArea(OBJECT_SELF)))
|
||||
{
|
||||
ActionMoveToLocation(GetStartLocation());
|
||||
}
|
||||
// It is at home already so . .
|
||||
else
|
||||
{
|
||||
// check if we need to rest
|
||||
if (!MonsterRest())
|
||||
{ // We dont need to rest, so just do our animations
|
||||
PlayMobileAmbientAnimations();
|
||||
}
|
||||
}
|
||||
// End custom encounter creature stuff
|
||||
}
|
||||
else
|
||||
// Now we have non custom mobs - they just do immobile animations if needed
|
||||
if (GetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS))
|
||||
{
|
||||
//SpeakString("I have failed to wwp");
|
||||
PlayImmobileAmbientAnimations();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_HEARTBEAT));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CheckSneak(object oMob=OBJECT_SELF)
|
||||
{
|
||||
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
|
||||
{
|
||||
|
||||
if (!GetStealthMode(OBJECT_SELF)==STEALTH_MODE_ACTIVATED)
|
||||
{
|
||||
ActionUseSkill(SKILL_HIDE,OBJECT_SELF);
|
||||
//SpeakString("stealthing from hb");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
63
_working/nw_c2_default2.nss
Normal file
63
_working/nw_c2_default2.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
/////////:://///////////////////////////////////////////////
|
||||
//:: Default On Percieve
|
||||
//:: NW_C2_DEFAULT2
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Checks to see if the perceived target is an
|
||||
enemy and if so fires the Determine Combat
|
||||
Round function
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 16, 2001
|
||||
//:://///////////////////////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//If the last perception event was hearing based or if someone vanished then go to search mode
|
||||
if ((GetLastPerceptionVanished()) && GetIsEnemy(GetLastPerceived()))
|
||||
{
|
||||
object oGone = GetLastPerceived();
|
||||
if((GetAttemptedAttackTarget() == GetLastPerceived() ||
|
||||
GetAttemptedSpellTarget() == GetLastPerceived() ||
|
||||
GetAttackTarget() == GetLastPerceived()) && GetArea(GetLastPerceived()) != GetArea(OBJECT_SELF))
|
||||
{
|
||||
ClearAllActions();
|
||||
DetermineCombatRound();
|
||||
|
||||
}
|
||||
}
|
||||
//Do not bother checking the last target seen if already fighting
|
||||
else if(GetLastPerceptionSeen()&&GetIsEnemy(GetLastPerceived()))
|
||||
{
|
||||
if(!GetHasEffect(EFFECT_TYPE_SLEEP))
|
||||
{
|
||||
//Shout Attack my target, only works with the On Spawn In setup
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
|
||||
if(!GetIsFighting(OBJECT_SELF))
|
||||
{
|
||||
if ((GetStealthMode(OBJECT_SELF)!=TRUE)&&(!GetIsInCombat())&&(d3()==1)&&(GetIsObjectValid(GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_FRIEND,OBJECT_SELF,1,CREATURE_TYPE_PERCEPTION,PERCEPTION_SEEN))))
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_ENEMIES);
|
||||
}
|
||||
SetTarget(GetLastPerceived());
|
||||
|
||||
SetFacingPoint(GetPosition(GetLastPerceived()));
|
||||
DetermineCombatRound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT) && GetLastPerceptionSeen())
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1002));
|
||||
}
|
||||
}
|
||||
33
_working/nw_c2_default3.nss.bak
Normal file
33
_working/nw_c2_default3.nss.bak
Normal file
@@ -0,0 +1,33 @@
|
||||
/////////////::///////////////////////////////////////////////
|
||||
//:: Default: End of Combat Round
|
||||
//:: NW_C2_DEFAULT3
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Calls the end of combat script every round
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 16, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL))
|
||||
{
|
||||
DetermineSpecialBehavior();
|
||||
}
|
||||
else if(!GetSpawnInCondition(NW_FLAG_SET_WARNINGS))
|
||||
{
|
||||
DetermineCombatRound();
|
||||
}
|
||||
if(GetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1003));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
89
_working/nw_c2_default4.nss
Normal file
89
_working/nw_c2_default4.nss
Normal file
@@ -0,0 +1,89 @@
|
||||
////////
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void main()
|
||||
{
|
||||
int nMatch = GetListenPatternNumber();
|
||||
object oShouter = GetLastSpeaker();
|
||||
|
||||
object oIntruder;
|
||||
|
||||
|
||||
if (nMatch == -1 && GetCommandable(OBJECT_SELF))
|
||||
{
|
||||
ClearAllActions();
|
||||
BeginConversation();
|
||||
}
|
||||
|
||||
if ((nMatch==123)&&(GetIsObjectValid(oShouter))&&(GetObjectSeen(oShouter))&&(GetIsEnemy(oShouter))&&(d4()==1))
|
||||
{
|
||||
SetVictim(oShouter);
|
||||
return;
|
||||
}
|
||||
if ((nMatch==123)&&(GetIsObjectValid(oShouter))&&(GetObjectSeen(oShouter))&&(GetIsFriend(oShouter))&&(!GetIsDead(oShouter)))
|
||||
{
|
||||
SetNeedsHealing(oShouter);
|
||||
return;
|
||||
}
|
||||
|
||||
// Make it follow spellcasters
|
||||
if(nMatch != -1 && GetIsObjectValid(oShouter) && GetIsPC(oShouter) && GetIsEnemy(oShouter))
|
||||
{
|
||||
SetTarget(oShouter);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(nMatch != -1 && GetIsObjectValid(oShouter) && !GetIsPC(oShouter) && GetIsFriend(oShouter))
|
||||
{
|
||||
if (nMatch == 5)
|
||||
{
|
||||
oIntruder = GetLastHostileActor(oShouter);
|
||||
|
||||
if ((GetObjectSeen(oIntruder))&&(GetLevelByClass(CLASS_TYPE_COMMONER)>=1))
|
||||
{
|
||||
TalentFlee(oIntruder);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder=GetTarget(oShouter);
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = OBJECT_INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTarget(oIntruder);
|
||||
}
|
||||
}
|
||||
|
||||
if ((!GetIsFighting(OBJECT_SELF))&&(GetIsObjectValid(oIntruder)))
|
||||
{
|
||||
|
||||
|
||||
if (GetObjectSeen(oIntruder))
|
||||
{
|
||||
if (!GetPlotFlag(OBJECT_SELF))
|
||||
{
|
||||
SetIsTemporaryEnemy(oIntruder, OBJECT_SELF,TRUE,180.0);
|
||||
}
|
||||
DetermineCombatRound();
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionMoveToObject(oIntruder,TRUE,3.0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1004));
|
||||
}
|
||||
}
|
||||
66
_working/nw_c2_default5.nss
Normal file
66
_working/nw_c2_default5.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
///////:://///////////////////////////////////////////////
|
||||
//:: Default On Attacked
|
||||
//:: NW_C2_DEFAULT5
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
If already fighting then ignore, else determine
|
||||
combat round
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 16, 2001
|
||||
//::////////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget=GetLastAttacker();
|
||||
|
||||
|
||||
|
||||
if (GetStealthMode(OBJECT_SELF)==STEALTH_MODE_ACTIVATED)
|
||||
{
|
||||
ActionUseSkill(SKILL_HIDE,OBJECT_SELF);
|
||||
}
|
||||
|
||||
if (GetDetectMode(OBJECT_SELF)==DETECT_MODE_ACTIVE)
|
||||
{
|
||||
ActionUseSkill(SKILL_SPOT,OBJECT_SELF);
|
||||
}
|
||||
|
||||
SetTarget(oTarget);
|
||||
//Shout Attack my target, only works with the On Spawn In setup
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
|
||||
|
||||
|
||||
|
||||
if (!GetIsFighting(OBJECT_SELF))
|
||||
|
||||
{
|
||||
ClearAllActions();
|
||||
|
||||
|
||||
if (GetObjectSeen(oTarget))
|
||||
{
|
||||
|
||||
DetermineCombatRound();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
ActionMoveToObject(oTarget,TRUE,3.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_ATTACK_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1005));
|
||||
}
|
||||
|
||||
}
|
||||
146
_working/nw_c2_default6.nss
Normal file
146
_working/nw_c2_default6.nss
Normal file
@@ -0,0 +1,146 @@
|
||||
/////////////////:://////////////////////////////////////////////////
|
||||
//:: Default On Damaged
|
||||
//:: NW_C2_DEFAULT6
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//::////////////////////////////////////////////////
|
||||
/*
|
||||
If already fighting then ignore, else determine
|
||||
combat round
|
||||
*/
|
||||
//::////////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 16, 2001
|
||||
//::///////////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
// do the voice
|
||||
void DoVoice();
|
||||
// About to die
|
||||
void DieCall(object oMob = OBJECT_SELF);
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetLastDamager();
|
||||
SetTarget(oTarget);
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
|
||||
|
||||
if (GetStealthMode(OBJECT_SELF)==STEALTH_MODE_ACTIVATED)
|
||||
{
|
||||
ActionUseSkill(SKILL_HIDE,OBJECT_SELF);
|
||||
}
|
||||
|
||||
if (GetDetectMode(OBJECT_SELF))
|
||||
{
|
||||
ActionUseSkill(SKILL_SPOT,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nCheckHeal=CheckHeal();
|
||||
if (nCheckHeal==FALSE)
|
||||
{
|
||||
DieCall();
|
||||
}
|
||||
|
||||
|
||||
if (GetObjectType(oTarget)==OBJECT_TYPE_AREA_OF_EFFECT)
|
||||
{
|
||||
oTarget=GetAreaOfEffectCreator(oTarget);
|
||||
}
|
||||
|
||||
int nHP=GetMaxHitPoints();
|
||||
int nDamage=GetTotalDamageDealt();
|
||||
|
||||
if ((d2()==1)&&(Random(nHP)<nDamage)&&(GetIsObjectValid(oTarget)))
|
||||
{
|
||||
SetVictim(oTarget);
|
||||
DoVoice();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!GetIsFighting(OBJECT_SELF))
|
||||
|
||||
{
|
||||
|
||||
|
||||
if (GetObjectSeen(oTarget))
|
||||
{
|
||||
if ((!GetIsInCombat())&&(d4()==1)&&(GetIsObjectValid(GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_FRIEND,OBJECT_SELF,1,CREATURE_TYPE_PERCEPTION,PERCEPTION_SEEN))))
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_ATTACK);
|
||||
}
|
||||
|
||||
DetermineCombatRound();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ActionMoveToObject(oTarget,TRUE,3.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_DAMAGED_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1006));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DoVoice()
|
||||
{
|
||||
int nRandom=d3();
|
||||
|
||||
if (nRandom==1)
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
|
||||
}
|
||||
|
||||
else if (nRandom==2)
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
;
|
||||
}
|
||||
|
||||
else if (nRandom==3)
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY3);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DieCall(object oMob=OBJECT_SELF)
|
||||
{
|
||||
|
||||
if (d2()==1)
|
||||
{
|
||||
// 50 per cent chance of not making the call;
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF,"diecall"))
|
||||
{
|
||||
// if I have called for help once, just return;
|
||||
return;
|
||||
}
|
||||
|
||||
if(GetCurrentHitPoints(oMob)> (GetMaxHitPoints(oMob)/4))
|
||||
{
|
||||
// not near dead
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
PlayVoiceChat(VOICE_CHAT_NEARDEATH);
|
||||
SetLocalInt(OBJECT_SELF,"diecall",1);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
50
_working/nw_c2_default7.nss
Normal file
50
_working/nw_c2_default7.nss
Normal file
@@ -0,0 +1,50 @@
|
||||
/////////////////////////:/:///////////////////////////////////////////////////////////////////////////////////////
|
||||
//:: Default:On Death
|
||||
//:: NW_C2_DEFAULT7
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
Shouts to allies that they have been killed
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 25, 2001
|
||||
///:://///////////////////////////////////////////////
|
||||
#include "NW_I0_GENERIC"
|
||||
#include "jw_exp_giver"
|
||||
//#include "x0_i0_corpses"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oMob=GetLastKiller();
|
||||
if (oMob==OBJECT_SELF)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
|
||||
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
|
||||
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
|
||||
{
|
||||
object oKiller = GetLastKiller();
|
||||
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
|
||||
}
|
||||
|
||||
//SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
|
||||
//Shout Attack my target, only works with the On Spawn In setup
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1007));
|
||||
}
|
||||
|
||||
|
||||
|
||||
givexp(OBJECT_SELF,GetLastKiller());
|
||||
//KillAndReplaceLootable(OBJECT_SELF, TRUE);
|
||||
|
||||
// Remove double xp effect
|
||||
int MAXHP = 90000;
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(MAXHP,DAMAGE_TYPE_MAGICAL,DAMAGE_POWER_PLUS_TWENTY), OBJECT_SELF);
|
||||
}
|
||||
42
_working/nw_c2_default8.nss
Normal file
42
_working/nw_c2_default8.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
/////::///////////////////////////////////////////////
|
||||
//:: Default: On Disturbed
|
||||
//:: NW_C2_DEFAULT8
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Calls the end of combat script every round
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 16, 2001
|
||||
//::////////////////////////////////////////////
|
||||
|
||||
// * Make me hostile the faction of my last attacker (TEMP)
|
||||
// AdjustReputation(OBJECT_SELF,GetFaction(GetLastAttacker()),-100);
|
||||
// * Determined Combat Round
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetLastDisturbed();
|
||||
|
||||
if(!GetIsObjectValid(GetAttemptedAttackTarget()) && !GetIsObjectValid(GetAttemptedSpellTarget()))
|
||||
{
|
||||
if(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if ((GetAbilityScore(OBJECT_SELF,ABILITY_INTELLIGENCE)>11)&&(GetIsObjectValid(GetMaster(oTarget))))
|
||||
{
|
||||
if (GetObjectSeen(GetMaster(oTarget)))
|
||||
{
|
||||
oTarget=GetMaster(oTarget);
|
||||
}
|
||||
}
|
||||
DetermineCombatRound(oTarget);
|
||||
}
|
||||
}
|
||||
if(GetSpawnInCondition(NW_FLAG_DISTURBED_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1008));
|
||||
}
|
||||
}
|
||||
90
_working/nw_c2_default9.nss
Normal file
90
_working/nw_c2_default9.nss
Normal file
@@ -0,0 +1,90 @@
|
||||
///////////////:://///////////////////////////////////////////////////
|
||||
//:: Default: On Spawn In
|
||||
//:: NW_C2_DEFAULT9
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
Determines the course of action to be taken
|
||||
after having just been spawned in
|
||||
*/
|
||||
//::////////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 25, 2001
|
||||
//::////////////////////////////////////////////////
|
||||
#include "jw_treasure_gene"
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
|
||||
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
|
||||
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
|
||||
// This causes the creature to say a special greeting in their conversation file
|
||||
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
|
||||
// greeting in order to designate it. As the creature is actually saying this to
|
||||
// himself, don't attach any player responses to the greeting.
|
||||
SetStartLocation();
|
||||
if (GetHitDice(OBJECT_SELF)>4)
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
|
||||
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
|
||||
SetListening(OBJECT_SELF,TRUE);
|
||||
}
|
||||
// This will set the listening pattern on the NPC to attack when allies call
|
||||
|
||||
|
||||
if ((GetChallengeRating(OBJECT_SELF)>3.0)&&(GetLevelByClass(CLASS_TYPE_ROGUE,OBJECT_SELF)>=1)&&(GetStandardFactionReputation(STANDARD_FACTION_DEFENDER,OBJECT_SELF)<40))
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_STEALTH);
|
||||
}
|
||||
|
||||
// If the NPC has stealth and they are a rogue go into stealth mode
|
||||
//SetSpawnInCondition(NW_FLAG_SEARCH);
|
||||
// If the NPC has Search go into Search Mode
|
||||
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
|
||||
// This will set the NPC to give a warning to non-enemies before attacking
|
||||
|
||||
//SetSpawnInCondition(NW_FLAG_SLEEP);
|
||||
//Creatures that spawn in during the night will be asleep.
|
||||
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
|
||||
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
|
||||
// Mobs will do immobile ambinet animations - use a custom on spawn script if not wanted
|
||||
SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
||||
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
|
||||
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
|
||||
//NOTE that these animations will play automatically for Encounter Creatures.
|
||||
|
||||
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
|
||||
///SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
|
||||
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
|
||||
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
|
||||
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
|
||||
|
||||
// CUSTOM USER DEFINED EVENTS
|
||||
/*
|
||||
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
|
||||
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
|
||||
events user 1000 - 1010
|
||||
*/
|
||||
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
|
||||
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
|
||||
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
|
||||
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
|
||||
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
|
||||
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
|
||||
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
|
||||
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
|
||||
|
||||
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
|
||||
|
||||
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
|
||||
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
|
||||
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
|
||||
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
|
||||
// combat.
|
||||
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
|
||||
///SendMessageToAllDMs("Called treasure script from spawn");
|
||||
}
|
||||
|
||||
|
||||
71
_working/nw_c2_defaultb.nss
Normal file
71
_working/nw_c2_defaultb.nss
Normal file
@@ -0,0 +1,71 @@
|
||||
////////::////////////////////////////////////////////////
|
||||
//:: Default: On Spell Cast At
|
||||
//:: NW_C2_DEFAULTB
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This determines if the spell just cast at the
|
||||
target is harmful or not.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Dec 6, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = GetLastSpellCaster();
|
||||
if(!GetLastSpellHarmful())
|
||||
{
|
||||
if (GetObjectSeen(oCaster)&&(GetObjectType(oCaster)==OBJECT_TYPE_CREATURE)&&(oCaster!=OBJECT_SELF)&&(d3()==1))
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_THANKS);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ((d4()==1)&&(GetIsObjectValid(oCaster))&&(GetObjectSeen(oCaster)))
|
||||
{
|
||||
SetVictim(oCaster);
|
||||
}
|
||||
|
||||
if (GetDetectMode(OBJECT_SELF)==DETECT_MODE_ACTIVE)
|
||||
{
|
||||
ActionUseSkill(SKILL_SPOT,OBJECT_SELF);
|
||||
}
|
||||
|
||||
if (GetStealthMode(OBJECT_SELF)==STEALTH_MODE_ACTIVATED)
|
||||
{
|
||||
ActionUseSkill(SKILL_HIDE,OBJECT_SELF);
|
||||
}
|
||||
|
||||
|
||||
SetTarget(oCaster);
|
||||
///Shout Attack my target, only works with the On Spawn In setup
|
||||
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
|
||||
|
||||
if (!GetIsFighting(OBJECT_SELF))
|
||||
{
|
||||
ClearAllActions();
|
||||
|
||||
if (GetObjectSeen(oCaster))
|
||||
{
|
||||
DetermineCombatRound();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ActionMoveToObject(oCaster,TRUE,3.0);
|
||||
}
|
||||
}
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_SPELL_CAST_AT_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1011));
|
||||
}
|
||||
|
||||
}
|
||||
56
_working/nw_c2_defaultd.nss
Normal file
56
_working/nw_c2_defaultd.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Custom User Defined Event
|
||||
//:: FileName
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
int nUser = GetUserDefinedEventNumber();
|
||||
|
||||
if(nUser == 1001) //HEARTBEAT
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if(nUser == 1002) // PERCEIVE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1003) // END OF COMBAT
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if(nUser == 1004) // ON DIALOGUE
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1005) // ATTACKED
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1006) // DAMAGED
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1007) // DEATH
|
||||
{
|
||||
|
||||
}
|
||||
else if(nUser == 1008) // DISTURBED
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
67
_working/nw_c2_defaulte.nss
Normal file
67
_working/nw_c2_defaulte.nss
Normal file
@@ -0,0 +1,67 @@
|
||||
/////::///////////////////////////////////////////////
|
||||
//:: Default On Blocked
|
||||
//:: NW_C2_DEFAULTE
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This will cause blocked creatures to open
|
||||
or smash down doors depending on int and
|
||||
str.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 23, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oDoor = GetBlockingDoor();
|
||||
object oTarget=GetTarget();
|
||||
//debug
|
||||
//SpeakString("I am blocked");
|
||||
//AssignCommand(oDoor,SpeakString("I am the door"));
|
||||
|
||||
if((GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE) >= 5)&&(GetObjectType(oDoor)==OBJECT_TYPE_DOOR))
|
||||
{
|
||||
// SpeakString("I have the int");
|
||||
|
||||
|
||||
if( GetLocked( oDoor))
|
||||
{
|
||||
//SpeakString("It is locked");
|
||||
|
||||
if(GetIsObjectValid(GetItemPossessedBy( OBJECT_SELF, GetLockKeyTag( oDoor))))
|
||||
{
|
||||
//SpeakString("I have the key and I'm trying to open it");
|
||||
|
||||
SetLocked(oDoor, 0);
|
||||
ClearAllActions();
|
||||
ActionOpenDoor(oDoor);
|
||||
if (GetIsObjectValid(oTarget)&&!GetIsFighting(OBJECT_SELF))
|
||||
{
|
||||
ActionMoveToObject(oTarget);
|
||||
}
|
||||
//AssignCommand(oDoor,ActionOpenDoor(oDoor));
|
||||
//ActionOpenDoor(oDoor);
|
||||
}
|
||||
else
|
||||
{
|
||||
//SpeakString("I dont have the key it needs");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//SpeakString("It's *not* locked and I'm trying to open it");
|
||||
ClearAllActions();
|
||||
ActionOpenDoor(oDoor);
|
||||
if (GetIsObjectValid(oTarget)&&!GetIsFighting(OBJECT_SELF))
|
||||
{
|
||||
ActionMoveToObject(oTarget);
|
||||
}
|
||||
// AssignCommand(oDoor,ActionOpenDoor(oDoor));
|
||||
//ActionOpenDoor(oDoor);
|
||||
}
|
||||
}
|
||||
}
|
||||
44
_working/nw_c2_dimdoor.nss
Normal file
44
_working/nw_c2_dimdoor.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: NW_C2_DIMDOOR.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature randomly hops around
|
||||
to enemies during combat.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: January 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void JumpToWeakestEnemy(object oTarget)
|
||||
{
|
||||
SetVictim(OBJECT_INVALID);
|
||||
object oTargetVictim = ChooseTarget();
|
||||
// * won't jump if closer than 4 meters to victim
|
||||
if ((GetDistanceToObject(oTargetVictim) > 4.0) && (GetObjectSeen(oTargetVictim) == TRUE))
|
||||
{
|
||||
ClearAllActions();
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
|
||||
// SpeakString("Jump to " + GetName(oTargetVictim));
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF));
|
||||
DelayCommand(0.3,ActionJumpToObject(oTargetVictim));
|
||||
DelayCommand(0.5,ActionAttack(oTargetVictim));
|
||||
}
|
||||
}
|
||||
void main()
|
||||
{
|
||||
// * During Combat try teleporting around
|
||||
if (GetUserDefinedEventNumber() == 1003)
|
||||
{
|
||||
// * if random OR heavily wounded then teleport to next enemy
|
||||
if ((Random(100) < 50) || ( (GetCurrentHitPoints() / GetMaxHitPoints()) * 100 < 50) )
|
||||
{
|
||||
JumpToWeakestEnemy(GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY));
|
||||
}
|
||||
}
|
||||
}
|
||||
91
_working/nw_c2_dropin9.nss
Normal file
91
_working/nw_c2_dropin9.nss
Normal file
@@ -0,0 +1,91 @@
|
||||
//::///////////////////////////////////////////////////
|
||||
//:: Default: On Spawn In
|
||||
//:: NW_C2_DEFAULT9
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Determines the course of action to be taken
|
||||
after having just been spawned in
|
||||
*/
|
||||
//::////////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 25, 2001
|
||||
//::///////////////////////////////////////////////
|
||||
|
||||
#include "jw_treasure_gene"
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
/// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
|
||||
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
|
||||
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
|
||||
// This causes the creature to say a special greeting in their conversation file
|
||||
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
|
||||
// greeting in order to designate it. As the creature is actually saying this to
|
||||
// himself, don't attach any player responses to the greeting.
|
||||
SetStartLocation();
|
||||
|
||||
if (GetHitDice(OBJECT_SELF)>4)
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
|
||||
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
|
||||
SetListening(OBJECT_SELF,TRUE);
|
||||
}
|
||||
// This will set the listening pattern on the NPC to attack when allies call
|
||||
//SetSpawnInCondition(NW_FLAG_STEALTH);
|
||||
// If the NPC has stealth and they are a rogue go into stealth mode
|
||||
//SetSpawnInCondition(NW_FLAG_SEARCH);
|
||||
// If the NPC has Search go into Search Mode
|
||||
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
|
||||
// This will set the NPC to give a warning to non-enemies before attacking
|
||||
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
|
||||
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
|
||||
//NOTE that these animations will play automatically for Encounter Creatures.
|
||||
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
||||
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
|
||||
//NOTE that NPCs using this form of ambient animations will not move to other NPCs.
|
||||
SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
|
||||
|
||||
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
|
||||
//SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
|
||||
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
|
||||
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
|
||||
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
|
||||
|
||||
// SPECIAL BEHAVIOR SECTION
|
||||
/*
|
||||
The following section outlines the various special behaviors that can be placed on a creature. To activate one of the special
|
||||
behaviors:
|
||||
1. Comment in SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
|
||||
2. Comment in one other special behavior setting (ONLY ONE).
|
||||
*/
|
||||
//SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
|
||||
//SetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE); //Creature will only attack those that close within 5m and are not friends,
|
||||
//Rangers or Druids.
|
||||
//SetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE);//Creature will flee those that close within 7m if they are not friends,
|
||||
//Rangers or Druids.
|
||||
|
||||
// CUSTOM USER DEFINED EVENTS
|
||||
/*
|
||||
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
|
||||
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
|
||||
events user 1000 - 1010
|
||||
*/
|
||||
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
|
||||
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
|
||||
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
|
||||
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
|
||||
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
|
||||
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
|
||||
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
|
||||
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
|
||||
|
||||
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
|
||||
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
|
||||
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
|
||||
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
|
||||
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
|
||||
// combat.
|
||||
MakeTreasure(); //* Use this to create a small amount of treasure on the creature
|
||||
}
|
||||
73
_working/nw_c2_lycan_9.nss
Normal file
73
_working/nw_c2_lycan_9.nss
Normal file
@@ -0,0 +1,73 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Lycanthrope Spawn In
|
||||
//:: NW_C2_LYCAN_9
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//::///////////////////////////////////////////////
|
||||
#include "jw_treasure_gene"
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
// OPTIONAL BEHAVIORS (Comment In or Out to Activate ) ****************************************************************************
|
||||
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
|
||||
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
|
||||
// This causes the creature to say a special greeting in their conversation file
|
||||
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
|
||||
// greeting in order to designate it. As the creature is actually saying this to
|
||||
// himself, don't attach any player responses to the greeting.
|
||||
SetStartLocation();
|
||||
|
||||
if (GetHitDice(OBJECT_SELF)>4)
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
|
||||
SetListenPattern(OBJECT_SELF, "I_AM_HEALING", 123); //listen out for this phrase
|
||||
SetListening(OBJECT_SELF,TRUE);
|
||||
}
|
||||
// This will set the listening pattern on the NPC to attack when allies call
|
||||
//SetSpawnInCondition(NW_FLAG_STEALTH);
|
||||
// If the NPC has stealth and they are a rogue go into stealth mode
|
||||
//SetSpawnInCondition(NW_FLAG_SEARCH);
|
||||
// If the NPC has Search go into Search Mode
|
||||
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
|
||||
// This will set the NPC to give a warning to non-enemies before attacking
|
||||
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
|
||||
//SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
|
||||
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
|
||||
//NOTE that these animations will play automatically for Encounter Creatures.
|
||||
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
|
||||
//SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
|
||||
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
|
||||
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
|
||||
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
|
||||
|
||||
// CUSTOM USER DEFINED EVENTS
|
||||
/*
|
||||
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
|
||||
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
|
||||
events user 1000 - 1010
|
||||
*/
|
||||
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
|
||||
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
|
||||
SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
|
||||
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
|
||||
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
|
||||
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
|
||||
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
|
||||
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
|
||||
|
||||
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
|
||||
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
|
||||
WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
|
||||
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
|
||||
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
|
||||
MakeTreasure(); // combat.
|
||||
}
|
||||
|
||||
1120
_working/nw_ch_ac4.nss
Normal file
1120
_working/nw_ch_ac4.nss
Normal file
File diff suppressed because it is too large
Load Diff
65
_working/nw_ch_fm_st_12.nss
Normal file
65
_working/nw_ch_fm_st_12.nss
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
int nHeal;
|
||||
effect eHeal;
|
||||
object oPC=GetMaster(OBJECT_SELF);
|
||||
string sType="pet";
|
||||
|
||||
if (GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION,oPC)==OBJECT_SELF)
|
||||
{
|
||||
sType="animal companion";
|
||||
}
|
||||
|
||||
if (GetAssociate(ASSOCIATE_TYPE_FAMILIAR,oPC)==OBJECT_SELF)
|
||||
{
|
||||
sType="familiar";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (GetHitDice(oPC)==1)
|
||||
|
||||
{
|
||||
nHeal = GetMaxHitPoints();
|
||||
eHeal = EffectHeal(nHeal);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,OBJECT_SELF);
|
||||
SendMessageToPC(oPC,"Once you grow slightly stronger, you will need food in order to feed your "+sType+".");
|
||||
return;
|
||||
}
|
||||
|
||||
int nCurrentHour = (GetCalendarYear()-1)*12*28*24 +
|
||||
(GetCalendarMonth()-1)*28*24 +
|
||||
(GetCalendarDay()-1)*24 +
|
||||
GetTimeHour();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SetLocalInt( OBJECT_SELF, "LastRestHour",nCurrentHour);
|
||||
|
||||
|
||||
|
||||
nHeal = GetMaxHitPoints(OBJECT_SELF)-GetCurrentHitPoints(OBJECT_SELF);
|
||||
nHeal=nHeal/2;
|
||||
if (nHeal<1)
|
||||
{
|
||||
nHeal=1;
|
||||
}
|
||||
|
||||
eHeal=EffectHeal(nHeal);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,OBJECT_SELF);
|
||||
SetLocalInt( OBJECT_SELF, "LastRestHour",nCurrentHour);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
1397
_working/nw_i0_generic.nss
Normal file
1397
_working/nw_i0_generic.nss
Normal file
File diff suppressed because it is too large
Load Diff
879
_working/nw_i0_spells.nss
Normal file
879
_working/nw_i0_spells.nss
Normal file
@@ -0,0 +1,879 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Spells Include
|
||||
//:: NW_I0_SPELLS
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 2, 2002
|
||||
//:: Updated By: 2003/20/10 Georg Zoeller
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//Used to route the saving throws through this function to check for spell countering by a saving throw using Zach in PR.
|
||||
int ScrollResist(object oCaster, object oTarget, float fDelay = 0.0);
|
||||
|
||||
|
||||
// GZ: Number of spells in GetSpellBreachProtections
|
||||
const int NW_I0_SPELLS_MAX_BREACH = 33;
|
||||
|
||||
// * Function for doing electrical traps
|
||||
void TrapDoElectricalDamage(int ngDamageMaster, int nSaveDC, int nSecondary);
|
||||
|
||||
// * Used to route the resist magic checks into this function to check for spell countering by SR, Globes or Mantles.
|
||||
// Return value if oCaster or oTarget is an invalid object: FALSE
|
||||
// Return value if spell cast is not a player spell: - 1
|
||||
// Return value if spell resisted: 1
|
||||
// Return value if spell resisted via magic immunity: 2
|
||||
// Return value if spell resisted via spell absorption: 3
|
||||
int MyResistSpell(object oCaster, object oTarget, float fDelay = 0.0);
|
||||
|
||||
// * Used to route the saving throws through this function to check for spell countering by a saving throw.
|
||||
// Returns: 0 if the saving throw roll failed
|
||||
// Returns: 1 if the saving throw roll succeeded
|
||||
// Returns: 2 if the target was immune to the save type specified
|
||||
// Note: If used within an Area of Effect Object Script (On Enter, OnExit, OnHeartbeat), you MUST pass
|
||||
// GetAreaOfEffectCreator() into oSaveVersus!! \
|
||||
int MySavingThrow(int nSavingThrow, object oTarget, int nDC, int nSaveType=SAVING_THROW_TYPE_NONE, object oSaveVersus = OBJECT_SELF, float fDelay = 0.0);
|
||||
|
||||
// * Will pass back a linked effect for all the protection from alignment spells. The power represents the multiplier of strength.
|
||||
// * That is instead of +3 AC and +2 Saves a power of 2 will yield +6 AC and +4 Saves.
|
||||
effect CreateProtectionFromAlignmentLink(int nAlignment, int nPower = 1);
|
||||
|
||||
// * Will pass back a linked effect for all of the doom effects.
|
||||
effect CreateDoomEffectsLink();
|
||||
|
||||
// * Searchs through a persons effects and removes those from a particular spell by a particular caster.
|
||||
void RemoveSpellEffects(int nSpell_ID, object oCaster, object oTarget);
|
||||
|
||||
// * Searchs through a persons effects and removes all those of a specific type.
|
||||
void RemoveSpecificEffect(int nEffectTypeID, object oTarget);
|
||||
|
||||
// * Returns the time in seconds that the effect should be delayed before application.
|
||||
float GetSpellEffectDelay(location SpellTargetLocation, object oTarget);
|
||||
|
||||
// * This allows the application of a random delay to effects based on time parameters passed in. Min default = 0.4, Max default = 1.1
|
||||
float GetRandomDelay(float fMinimumTime = 0.4, float MaximumTime = 1.1);
|
||||
|
||||
// * Get Difficulty Duration
|
||||
int GetScaledDuration(int nActualDuration, object oTarget);
|
||||
|
||||
// * Get Scaled Effect
|
||||
effect GetScaledEffect(effect eStandard, object oTarget);
|
||||
|
||||
// * Remove all spell protections of a specific type
|
||||
int RemoveProtections(int nSpell_ID, object oTarget, int nCount);
|
||||
|
||||
// * Performs a spell breach up to nTotal spells are removed and nSR spell
|
||||
// * resistance is lowered.
|
||||
int GetSpellBreachProtection(int nLastChecked);
|
||||
|
||||
//* Assigns a debug string to the Area of Effect Creator
|
||||
void AssignAOEDebugString(string sString);
|
||||
|
||||
// * Plays a random dragon battlecry based on age.
|
||||
void PlayDragonBattleCry();
|
||||
|
||||
// * Returns true if Target is a humanoid
|
||||
int AmIAHumanoid(object oTarget);
|
||||
|
||||
|
||||
// * Performs a spell breach up to nTotal spell are removed and
|
||||
// * nSR spell resistance is lowered. nSpellId can be used to override
|
||||
// * the originating spell ID. If not specified, SPELL_GREATER_SPELL_BREACH
|
||||
// * is used
|
||||
void DoSpellBreach(object oTarget, int nTotal, int nSR, int nSpellId = -1);
|
||||
|
||||
|
||||
// * Returns true if Target is a humanoid
|
||||
int AmIAHumanoid(object oTarget)
|
||||
{
|
||||
int nRacial = GetRacialType(oTarget);
|
||||
|
||||
if((nRacial == RACIAL_TYPE_DWARF) ||
|
||||
(nRacial == RACIAL_TYPE_HALFELF) ||
|
||||
(nRacial == RACIAL_TYPE_HALFORC) ||
|
||||
(nRacial == RACIAL_TYPE_ELF) ||
|
||||
(nRacial == RACIAL_TYPE_GNOME) ||
|
||||
(nRacial == RACIAL_TYPE_HUMANOID_GOBLINOID) ||
|
||||
(nRacial == RACIAL_TYPE_HALFLING) ||
|
||||
(nRacial == RACIAL_TYPE_HUMAN) ||
|
||||
(nRacial == RACIAL_TYPE_HUMANOID_MONSTROUS) ||
|
||||
(nRacial == RACIAL_TYPE_HUMANOID_ORC) ||
|
||||
(nRacial == RACIAL_TYPE_HUMANOID_REPTILIAN))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: spellsCure
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Used by the 'cure' series of spells.
|
||||
Will do max heal/damage if at normal or low
|
||||
difficulty.
|
||||
Random rolls occur at higher difficulties.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void spellsCure(int nDamage, int nMaxExtraDamage, int nMaximized, int vfx_impactHurt, int vfx_impactHeal, int nSpellID)
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHeal;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eVis = EffectVisualEffect(vfx_impactHurt);
|
||||
effect eVis2 = EffectVisualEffect(vfx_impactHeal);
|
||||
effect eHeal, eDam;
|
||||
|
||||
int nExtraDamage = GetCasterLevel(OBJECT_SELF); // * figure out the bonus damage
|
||||
if (nExtraDamage > nMaxExtraDamage)
|
||||
{
|
||||
nExtraDamage = nMaxExtraDamage;
|
||||
}
|
||||
// * if low or normal difficulty is treated as MAXIMIZED
|
||||
if(GetIsPC(oTarget) && GetGameDifficulty() < GAME_DIFFICULTY_CORE_RULES)
|
||||
{
|
||||
nDamage = nMaximized + nExtraDamage;
|
||||
}
|
||||
else
|
||||
{
|
||||
nDamage = nDamage + nExtraDamage;
|
||||
}
|
||||
|
||||
|
||||
//Make metamagic checks
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = 8 + nExtraDamage;
|
||||
// * if low or normal difficulty then MAXMIZED is doubled.
|
||||
if(GetIsPC(OBJECT_SELF) && GetGameDifficulty() < GAME_DIFFICULTY_CORE_RULES)
|
||||
{
|
||||
nDamage = nDamage + nExtraDamage;
|
||||
}
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EMPOWER || GetHasFeat(FEAT_HEALING_DOMAIN_POWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2);
|
||||
}
|
||||
|
||||
|
||||
if (GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Figure out the amount of damage to heal
|
||||
nHeal = nDamage;
|
||||
//Set the heal effect
|
||||
eHeal = EffectHeal(nHeal);
|
||||
//Apply heal effect and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellID, FALSE));
|
||||
|
||||
|
||||
}
|
||||
//Check that the target is undead
|
||||
else
|
||||
{
|
||||
int nTouch = TouchAttackMelee(oTarget);
|
||||
if (nTouch > 0)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellID));
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
eDam = EffectDamage(nDamage,DAMAGE_TYPE_NEGATIVE);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: DoSpelLBreach
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Performs a spell breach up to nTotal spells
|
||||
are removed and nSR spell resistance is
|
||||
lowered.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: September 2002
|
||||
//:: Modified : Georg, Oct 31, 2003
|
||||
//:://////////////////////////////////////////////
|
||||
void DoSpellBreach(object oTarget, int nTotal, int nSR, int nSpellId = -1)
|
||||
{
|
||||
if (nSpellId == -1)
|
||||
{
|
||||
nSpellId = SPELL_GREATER_SPELL_BREACH;
|
||||
}
|
||||
effect eSR = EffectSpellResistanceDecrease(nSR);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eDur, eSR);
|
||||
//--------------------------------------------------------------------------
|
||||
// This can not be dispelled
|
||||
//--------------------------------------------------------------------------
|
||||
eLink = ExtraordinaryEffect(eLink);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_BREACH);
|
||||
int nCnt, nIdx;
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellId ));
|
||||
//Search through and remove protections.
|
||||
while(nCnt <= NW_I0_SPELLS_MAX_BREACH && nIdx < nTotal)
|
||||
{
|
||||
nIdx = nIdx + RemoveProtections(GetSpellBreachProtection(nCnt), oTarget, nCnt);
|
||||
nCnt++;
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10));
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
|
||||
}
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: GetDragonFearDC
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Adding a function, we were using two different
|
||||
sets of numbers before. Standardizing it to be
|
||||
closer to 3e.
|
||||
nAge - hit dice
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: Sep 13, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
int GetDragonFearDC(int nAge)
|
||||
{
|
||||
int nDC = 13;
|
||||
int nCount = 1;
|
||||
//Determine the duration and save DC
|
||||
if (nAge <= 6) //Wyrmling
|
||||
{
|
||||
nDC = 13;
|
||||
nCount = 1;
|
||||
}
|
||||
else if (nAge >= 7 && nAge <= 9) //Very Young
|
||||
{
|
||||
nDC = 15;
|
||||
nCount = 2;
|
||||
}
|
||||
else if (nAge >= 10 && nAge <= 12) //Young
|
||||
{
|
||||
nDC = 17;
|
||||
nCount = 3;
|
||||
}
|
||||
else if (nAge >= 13 && nAge <= 15) //Juvenile
|
||||
{
|
||||
nDC = 19;
|
||||
nCount = 4;
|
||||
}
|
||||
else if (nAge >= 16 && nAge <= 18) //Young Adult
|
||||
{
|
||||
nDC = 21;
|
||||
nCount = 5;
|
||||
}
|
||||
else if (nAge >= 19 && nAge <= 21) //Adult
|
||||
{
|
||||
nDC = 24;
|
||||
nCount = 6;
|
||||
}
|
||||
else if (nAge >= 22 && nAge <= 24) //Mature Adult
|
||||
{
|
||||
nDC = 27;
|
||||
nCount = 7;
|
||||
}
|
||||
else if (nAge >= 25 && nAge <= 27) //Old
|
||||
{
|
||||
nDC = 28;
|
||||
nCount = 8;
|
||||
}
|
||||
else if (nAge >= 28 && nAge <= 30) //Very Old
|
||||
{
|
||||
nDC = 30;
|
||||
nCount = 9;
|
||||
}
|
||||
else if (nAge >= 31 && nAge <= 33) //Ancient
|
||||
{
|
||||
nDC = 32;
|
||||
nCount = 10;
|
||||
}
|
||||
else if (nAge >= 34 && nAge <= 37) //Wyrm
|
||||
{
|
||||
nDC = 34;
|
||||
nCount = 11;
|
||||
}
|
||||
else if (nAge > 37) //Great Wyrm
|
||||
{
|
||||
nDC = 37;
|
||||
nCount = 12;
|
||||
}
|
||||
|
||||
return nDC;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Kovi function: calculates the appropriate base number of attacks
|
||||
// for spells that increase this (tensers, divine power)
|
||||
//------------------------------------------------------------------------------
|
||||
int CalcNumberOfAttacks()
|
||||
{
|
||||
int n = GetCasterLevel(OBJECT_SELF);
|
||||
int nBAB1 = GetLevelByClass(CLASS_TYPE_RANGER)
|
||||
+ GetLevelByClass(CLASS_TYPE_FIGHTER)
|
||||
+ GetLevelByClass(CLASS_TYPE_PALADIN)
|
||||
+ GetLevelByClass(CLASS_TYPE_BARBARIAN);
|
||||
int nBAB2 = GetLevelByClass(CLASS_TYPE_DRUID)
|
||||
+ GetLevelByClass(CLASS_TYPE_MONK)
|
||||
+ GetLevelByClass(CLASS_TYPE_ROGUE)
|
||||
+ GetLevelByClass(CLASS_TYPE_BARD);
|
||||
int nBAB3 = GetLevelByClass(CLASS_TYPE_WIZARD)
|
||||
+ GetLevelByClass(CLASS_TYPE_SORCERER);
|
||||
|
||||
int nOldBAB = nBAB1 + (nBAB2 + n) * 3 / 4 + nBAB3 / 2;
|
||||
int nNewBAB = nBAB1 + n + nBAB2 * 3 / 4 + nBAB3 / 2;
|
||||
if (nNewBAB / 5 > nOldBAB / 5)
|
||||
return 2; // additional attack
|
||||
else
|
||||
return 1; // everything is normal
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// GZ: gets rids of temporary hit points so that they will not stack
|
||||
//------------------------------------------------------------------------------
|
||||
void RemoveTempHitPoints()
|
||||
{
|
||||
effect eProtection;
|
||||
int nCnt = 0;
|
||||
|
||||
eProtection = GetFirstEffect(OBJECT_SELF);
|
||||
while (GetIsEffectValid(eProtection))
|
||||
{
|
||||
if(GetEffectType(eProtection) == EFFECT_TYPE_TEMPORARY_HITPOINTS)
|
||||
RemoveEffect(OBJECT_SELF, eProtection);
|
||||
eProtection = GetNextEffect(OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
|
||||
// * Kovi. removes any effects from this type of spell
|
||||
// * i.e., used in Mage Armor to remove any previous
|
||||
// * mage armors
|
||||
void RemoveEffectsFromSpell(object oTarget, int SpellID)
|
||||
{
|
||||
effect eLook = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eLook)) {
|
||||
if (GetEffectSpellId(eLook) == SpellID)
|
||||
RemoveEffect(oTarget, eLook);
|
||||
eLook = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
int MyResistSpell(object oCaster, object oTarget, float fDelay = 0.0)
|
||||
{
|
||||
if (fDelay > 0.5)
|
||||
{
|
||||
fDelay = fDelay - 0.1;
|
||||
}
|
||||
int nResist = ResistSpell(oCaster, oTarget);
|
||||
effect eSR = EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE);
|
||||
effect eGlobe = EffectVisualEffect(VFX_IMP_GLOBE_USE);
|
||||
effect eMantle = EffectVisualEffect(VFX_IMP_SPELL_MANTLE_USE);
|
||||
if(nResist == 1) //Spell Resistance
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eSR, oTarget));
|
||||
}
|
||||
else if(nResist == 2) //Globe
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGlobe, oTarget));
|
||||
}
|
||||
else if(nResist == 3) //Spell Mantle
|
||||
{
|
||||
if (fDelay > 0.5)
|
||||
{
|
||||
fDelay = fDelay - 0.1;
|
||||
}
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eMantle, oTarget));
|
||||
}
|
||||
return nResist;
|
||||
}
|
||||
|
||||
int MySavingThrow(int nSavingThrow, object oTarget, int nDC, int nSaveType=SAVING_THROW_TYPE_NONE, object oSaveVersus = OBJECT_SELF, float fDelay = 0.0)
|
||||
{
|
||||
// -------------------------------------------------------------------------
|
||||
// GZ: sanity checks to prevent wrapping around
|
||||
// -------------------------------------------------------------------------
|
||||
if (nDC<1)
|
||||
{
|
||||
nDC = 1;
|
||||
}
|
||||
else if (nDC > 255)
|
||||
{
|
||||
nDC = 255;
|
||||
}
|
||||
|
||||
effect eVis;
|
||||
int bValid = FALSE;
|
||||
int nSpellID;
|
||||
if(nSavingThrow == SAVING_THROW_FORT)
|
||||
{
|
||||
bValid = FortitudeSave(oTarget, nDC, nSaveType, oSaveVersus);
|
||||
if(bValid == 1)
|
||||
{
|
||||
eVis = EffectVisualEffect(VFX_IMP_FORTITUDE_SAVING_THROW_USE);
|
||||
}
|
||||
}
|
||||
else if(nSavingThrow == SAVING_THROW_REFLEX)
|
||||
{
|
||||
bValid = ReflexSave(oTarget, nDC, nSaveType, oSaveVersus);
|
||||
if(bValid == 1)
|
||||
{
|
||||
eVis = EffectVisualEffect(VFX_IMP_REFLEX_SAVE_THROW_USE);
|
||||
}
|
||||
}
|
||||
else if(nSavingThrow == SAVING_THROW_WILL)
|
||||
{
|
||||
bValid = WillSave(oTarget, nDC, nSaveType, oSaveVersus);
|
||||
if(bValid == 1)
|
||||
{
|
||||
eVis = EffectVisualEffect(VFX_IMP_WILL_SAVING_THROW_USE);
|
||||
}
|
||||
}
|
||||
|
||||
nSpellID = GetSpellId();
|
||||
|
||||
/*
|
||||
return 0 = FAILED SAVE
|
||||
return 1 = SAVE SUCCESSFUL
|
||||
return 2 = IMMUNE TO WHAT WAS BEING SAVED AGAINST
|
||||
*/
|
||||
if(bValid == 0)
|
||||
{
|
||||
if((nSaveType == SAVING_THROW_TYPE_DEATH
|
||||
|| nSpellID == SPELL_WEIRD
|
||||
|| nSpellID == SPELL_FINGER_OF_DEATH) &&
|
||||
nSpellID != SPELL_HORRID_WILTING)
|
||||
{
|
||||
eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
if(bValid == 2)
|
||||
{
|
||||
eVis = EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE);
|
||||
}
|
||||
if(bValid == 1 || bValid == 2)
|
||||
{
|
||||
if(bValid == 2)
|
||||
{
|
||||
/*
|
||||
If the spell is save immune then the link must be applied in order to get the true immunity
|
||||
to be resisted. That is the reason for returing false and not true. True blocks the
|
||||
application of effects.
|
||||
*/
|
||||
bValid = FALSE;
|
||||
}
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
return bValid;
|
||||
}
|
||||
|
||||
effect CreateProtectionFromAlignmentLink(int nAlignment, int nPower = 1)
|
||||
{
|
||||
int nFinal = nPower * 2;
|
||||
effect eAC = EffectACIncrease(nFinal, AC_DEFLECTION_BONUS);
|
||||
eAC = VersusAlignmentEffect(eAC, ALIGNMENT_ALL, nAlignment);
|
||||
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, nFinal);
|
||||
eSave = VersusAlignmentEffect(eSave,ALIGNMENT_ALL, nAlignment);
|
||||
effect eImmune = EffectImmunity(IMMUNITY_TYPE_MIND_SPELLS);
|
||||
eImmune = VersusAlignmentEffect(eImmune,ALIGNMENT_ALL, nAlignment);
|
||||
effect eDur;
|
||||
if(nAlignment == ALIGNMENT_EVIL)
|
||||
{
|
||||
eDur = EffectVisualEffect(VFX_DUR_PROTECTION_GOOD_MINOR);
|
||||
}
|
||||
else if(nAlignment == ALIGNMENT_GOOD)
|
||||
{
|
||||
eDur = EffectVisualEffect(VFX_DUR_PROTECTION_EVIL_MINOR);
|
||||
}
|
||||
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eImmune, eSave);
|
||||
eLink = EffectLinkEffects(eLink, eAC);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
return eLink;
|
||||
}
|
||||
|
||||
effect CreateDoomEffectsLink()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eSaves = EffectSavingThrowDecrease(SAVING_THROW_ALL, 2);
|
||||
effect eAttack = EffectAttackDecrease(2);
|
||||
effect eDamage = EffectDamageDecrease(2);
|
||||
effect eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, 2);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eAttack, eDamage);
|
||||
eLink = EffectLinkEffects(eLink, eSaves);
|
||||
eLink = EffectLinkEffects(eLink, eSkill);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
return eLink;
|
||||
}
|
||||
|
||||
void RemoveSpellEffects(int nSpell_ID, object oCaster, object oTarget)
|
||||
{
|
||||
//Declare major variables
|
||||
int bValid = FALSE;
|
||||
effect eAOE;
|
||||
if(GetHasSpellEffect(nSpell_ID, oTarget))
|
||||
{
|
||||
//Search through the valid effects on the target.
|
||||
eAOE = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eAOE) && bValid == FALSE)
|
||||
{
|
||||
if (GetEffectCreator(eAOE) == oCaster)
|
||||
{
|
||||
//If the effect was created by the spell then remove it
|
||||
if(GetEffectSpellId(eAOE) == nSpell_ID)
|
||||
{
|
||||
RemoveEffect(oTarget, eAOE);
|
||||
bValid = TRUE;
|
||||
}
|
||||
}
|
||||
//Get next effect on the target
|
||||
eAOE = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveSpecificEffect(int nEffectTypeID, object oTarget)
|
||||
{
|
||||
//Declare major variables
|
||||
//Get the object that is exiting the AOE
|
||||
int bValid = FALSE;
|
||||
effect eAOE;
|
||||
//Search through the valid effects on the target.
|
||||
eAOE = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eAOE))
|
||||
{
|
||||
if (GetEffectType(eAOE) == nEffectTypeID)
|
||||
{
|
||||
//If the effect was created by the spell then remove it
|
||||
bValid = TRUE;
|
||||
RemoveEffect(oTarget, eAOE);
|
||||
}
|
||||
//Get next effect on the target
|
||||
eAOE = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
float GetSpellEffectDelay(location SpellTargetLocation, object oTarget)
|
||||
{
|
||||
float fDelay;
|
||||
return fDelay = GetDistanceBetweenLocations(SpellTargetLocation, GetLocation(oTarget))/20;
|
||||
}
|
||||
|
||||
float GetRandomDelay(float fMinimumTime = 0.4, float MaximumTime = 1.1)
|
||||
{
|
||||
float fRandom = MaximumTime - fMinimumTime;
|
||||
int nRandom;
|
||||
if(fRandom < 0.0)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
nRandom = FloatToInt(fRandom * 10.0);
|
||||
nRandom = Random(nRandom) + 1;
|
||||
fRandom = IntToFloat(nRandom);
|
||||
fRandom /= 10.0;
|
||||
return fRandom + fMinimumTime;
|
||||
}
|
||||
}
|
||||
|
||||
int GetScaledDuration(int nActualDuration, object oTarget)
|
||||
{
|
||||
|
||||
int nDiff = GetGameDifficulty();
|
||||
int nNew = nActualDuration;
|
||||
if(GetIsPC(oTarget) && nActualDuration > 3)
|
||||
{
|
||||
if(nDiff == GAME_DIFFICULTY_VERY_EASY || nDiff == GAME_DIFFICULTY_EASY)
|
||||
{
|
||||
nNew = nActualDuration / 4;
|
||||
}
|
||||
else if(nDiff == GAME_DIFFICULTY_NORMAL)
|
||||
{
|
||||
nNew = nActualDuration / 2;
|
||||
}
|
||||
if(nNew == 0)
|
||||
{
|
||||
nNew = 1;
|
||||
}
|
||||
}
|
||||
return nNew;
|
||||
}
|
||||
|
||||
effect GetScaledEffect(effect eStandard, object oTarget)
|
||||
{
|
||||
int nDiff = GetGameDifficulty();
|
||||
effect eNew = eStandard;
|
||||
object oMaster = GetMaster(oTarget);
|
||||
if(GetIsPC(oTarget) || (GetIsObjectValid(oMaster) && GetIsPC(oMaster)))
|
||||
{
|
||||
if(GetEffectType(eStandard) == EFFECT_TYPE_FRIGHTENED && nDiff == GAME_DIFFICULTY_VERY_EASY)
|
||||
{
|
||||
eNew = EffectAttackDecrease(-2);
|
||||
return eNew;
|
||||
}
|
||||
if(GetEffectType(eStandard) == EFFECT_TYPE_FRIGHTENED && nDiff == GAME_DIFFICULTY_EASY)
|
||||
{
|
||||
eNew = EffectAttackDecrease(-4);
|
||||
return eNew;
|
||||
}
|
||||
if(nDiff == GAME_DIFFICULTY_VERY_EASY &&
|
||||
(GetEffectType(eStandard) == EFFECT_TYPE_PARALYZE ||
|
||||
GetEffectType(eStandard) == EFFECT_TYPE_STUNNED ||
|
||||
GetEffectType(eStandard) == EFFECT_TYPE_CONFUSED))
|
||||
{
|
||||
eNew = EffectDazed();
|
||||
return eNew;
|
||||
}
|
||||
else if(GetEffectType(eStandard) == EFFECT_TYPE_CHARMED || GetEffectType(eStandard) == EFFECT_TYPE_DOMINATED)
|
||||
{
|
||||
eNew = EffectDazed();
|
||||
return eNew;
|
||||
}
|
||||
}
|
||||
return eNew;
|
||||
}
|
||||
|
||||
int RemoveProtections(int nSpell_ID, object oTarget, int nCount)
|
||||
{
|
||||
//Declare major variables
|
||||
effect eProtection;
|
||||
int nCnt = 0;
|
||||
if(GetHasSpellEffect(nSpell_ID, oTarget))
|
||||
{
|
||||
//Search through the valid effects on the target.
|
||||
eProtection = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eProtection))
|
||||
{
|
||||
//If the effect was created by the spell then remove it
|
||||
if(GetEffectSpellId(eProtection) == nSpell_ID)
|
||||
{
|
||||
RemoveEffect(oTarget, eProtection);
|
||||
//return 1;
|
||||
nCnt++;
|
||||
}
|
||||
//Get next effect on the target
|
||||
eProtection = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
if(nCnt > 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Returns the nLastChecked-nth highest spell on the creature for use in
|
||||
// the spell breach routines
|
||||
// Please modify the constatn NW_I0_SPELLS_MAX_BREACH at the top of this file
|
||||
// if you change the number of spells.
|
||||
//------------------------------------------------------------------------------
|
||||
int GetSpellBreachProtection(int nLastChecked)
|
||||
{
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ: Protections are stripped in the order they appear here
|
||||
//--------------------------------------------------------------------------
|
||||
if(nLastChecked == 1) {return SPELL_GREATER_SPELL_MANTLE;}
|
||||
else if (nLastChecked == 2){return SPELL_PREMONITION;}
|
||||
else if(nLastChecked == 3) {return SPELL_SPELL_MANTLE;}
|
||||
else if(nLastChecked == 4) {return SPELL_SHADOW_SHIELD;}
|
||||
else if(nLastChecked == 5) {return SPELL_GREATER_STONESKIN;}
|
||||
else if(nLastChecked == 6) {return SPELL_ETHEREAL_VISAGE;}
|
||||
else if(nLastChecked == 7) {return SPELL_GLOBE_OF_INVULNERABILITY;}
|
||||
else if(nLastChecked == 8) {return SPELL_ENERGY_BUFFER;}
|
||||
else if(nLastChecked == 9) {return 443;} // greater sanctuary
|
||||
else if(nLastChecked == 10) {return SPELL_MINOR_GLOBE_OF_INVULNERABILITY;}
|
||||
else if(nLastChecked == 11) {return SPELL_SPELL_RESISTANCE;}
|
||||
else if(nLastChecked == 12) {return SPELL_STONESKIN;}
|
||||
else if(nLastChecked == 13) {return SPELL_LESSER_SPELL_MANTLE;}
|
||||
else if(nLastChecked == 14) {return SPELL_MESTILS_ACID_SHEATH;}
|
||||
else if(nLastChecked == 15) {return SPELL_MIND_BLANK;}
|
||||
else if(nLastChecked == 16) {return SPELL_ELEMENTAL_SHIELD;}
|
||||
else if(nLastChecked == 17) {return SPELL_PROTECTION_FROM_SPELLS;}
|
||||
else if(nLastChecked == 18) {return SPELL_PROTECTION_FROM_ELEMENTS;}
|
||||
else if(nLastChecked == 19) {return SPELL_RESIST_ELEMENTS;}
|
||||
else if(nLastChecked == 20) {return SPELL_DEATH_ARMOR;}
|
||||
else if(nLastChecked == 21) {return SPELL_GHOSTLY_VISAGE;}
|
||||
else if(nLastChecked == 22) {return SPELL_ENDURE_ELEMENTS;}
|
||||
else if(nLastChecked == 23) {return SPELL_SHADOW_SHIELD;}
|
||||
else if(nLastChecked == 24) {return SPELL_SHADOW_CONJURATION_MAGE_ARMOR;}
|
||||
else if(nLastChecked == 25) {return SPELL_NEGATIVE_ENERGY_PROTECTION;}
|
||||
else if(nLastChecked == 26) {return SPELL_SANCTUARY;}
|
||||
else if(nLastChecked == 27) {return SPELL_MAGE_ARMOR;}
|
||||
else if(nLastChecked == 28) {return SPELL_STONE_BONES;}
|
||||
else if(nLastChecked == 29) {return SPELL_SHIELD;}
|
||||
else if(nLastChecked == 30) {return SPELL_SHIELD_OF_FAITH;}
|
||||
else if(nLastChecked == 31) {return SPELL_LESSER_MIND_BLANK;}
|
||||
else if(nLastChecked == 32) {return SPELL_IRONGUTS;}
|
||||
else if(nLastChecked == 33) {return SPELL_RESISTANCE;}
|
||||
return nLastChecked;
|
||||
}
|
||||
|
||||
void AssignAOEDebugString(string sString)
|
||||
{
|
||||
object oTarget = GetAreaOfEffectCreator();
|
||||
AssignCommand(oTarget, SpeakString(sString));
|
||||
}
|
||||
|
||||
|
||||
void PlayDragonBattleCry()
|
||||
{
|
||||
if(d100() > 50)
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
}
|
||||
}
|
||||
|
||||
void TrapDoElectricalDamage(int ngDamageMaster, int nSaveDC, int nSecondary)
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetEnteringObject();
|
||||
object o2ndTarget;
|
||||
effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oTarget, BODY_NODE_CHEST);
|
||||
int nDamageMaster = ngDamageMaster;
|
||||
int nDamage = nDamageMaster;
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
|
||||
location lTarget = GetLocation(oTarget);
|
||||
int nCount = 0;
|
||||
//Adjust the trap damage based on the feats of the target
|
||||
if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, nSaveDC, SAVING_THROW_TYPE_TRAP))
|
||||
{
|
||||
if (GetHasFeat(FEAT_IMPROVED_EVASION, oTarget))
|
||||
{
|
||||
nDamage /= 2;
|
||||
}
|
||||
}
|
||||
else if (GetHasFeat(FEAT_EVASION, oTarget) || GetHasFeat(FEAT_IMPROVED_EVASION, oTarget))
|
||||
{
|
||||
nDamage = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
nDamage /= 2;
|
||||
}
|
||||
if (nDamage > 0)
|
||||
{
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
//Reset the damage;
|
||||
nDamage = nDamageMaster;
|
||||
o2ndTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lTarget);
|
||||
while (GetIsObjectValid(o2ndTarget) && nCount <= nSecondary)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//check to see that the original target is not hit again.
|
||||
if(o2ndTarget != oTarget)
|
||||
{
|
||||
//Adjust the trap damage based on the feats of the target
|
||||
if(!MySavingThrow(SAVING_THROW_REFLEX, o2ndTarget, nSaveDC, SAVING_THROW_TYPE_ELECTRICITY))
|
||||
{
|
||||
if (GetHasFeat(FEAT_IMPROVED_EVASION, o2ndTarget))
|
||||
{
|
||||
nDamage /= 2;
|
||||
}
|
||||
}
|
||||
else if (GetHasFeat(FEAT_EVASION, o2ndTarget) || GetHasFeat(FEAT_IMPROVED_EVASION, o2ndTarget))
|
||||
{
|
||||
nDamage = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
nDamage /= 2;
|
||||
}
|
||||
if (nDamage > 0)
|
||||
{
|
||||
//Set the damage effect
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||
//Apply the VFX impact and damage effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, o2ndTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, o2ndTarget);
|
||||
//Connect the lightning stream from one target to another.
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLightning, o2ndTarget, 0.75);
|
||||
//Set the last target as the new start for the lightning stream
|
||||
eLightning = EffectBeam(VFX_BEAM_LIGHTNING, o2ndTarget, BODY_NODE_CHEST);
|
||||
}
|
||||
}
|
||||
//Reset the damage
|
||||
nDamage = nDamageMaster;
|
||||
//Increment the count
|
||||
nCount++;
|
||||
}
|
||||
//Get next target in the shape.
|
||||
o2ndTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lTarget);
|
||||
}
|
||||
}
|
||||
|
||||
int ScrollResist(object oCaster, object oTarget, float fDelay = 0.0)
|
||||
{
|
||||
|
||||
oCaster=GetObjectByTag("PR_Zacharias");
|
||||
if (fDelay > 0.5)
|
||||
{
|
||||
fDelay = fDelay - 0.1;
|
||||
}
|
||||
int nResist = ResistSpell(oCaster, oTarget);
|
||||
effect eSR = EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE);
|
||||
effect eGlobe = EffectVisualEffect(VFX_IMP_GLOBE_USE);
|
||||
effect eMantle = EffectVisualEffect(VFX_IMP_SPELL_MANTLE_USE);
|
||||
if(nResist == 1) //Spell Resistance
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eSR, oTarget));
|
||||
}
|
||||
else if(nResist == 2) //Globe
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGlobe, oTarget));
|
||||
}
|
||||
else if(nResist == 3) //Spell Mantle
|
||||
{
|
||||
if (fDelay > 0.5)
|
||||
{
|
||||
fDelay = fDelay - 0.1;
|
||||
}
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eMantle, oTarget));
|
||||
}
|
||||
return nResist;
|
||||
}
|
||||
|
||||
2774
_working/nw_o2_classweap.nss
Normal file
2774
_working/nw_o2_classweap.nss
Normal file
File diff suppressed because it is too large
Load Diff
23
_working/nw_s0_1brntoth.nss
Normal file
23
_working/nw_s0_1brntoth.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Burnt Other Fumes On Hit
|
||||
//:: NW_S0_1BrntOth
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
1 Point Permenent Constitution Damage
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 11, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
effect eDrain = EffectAbilityDecrease(ABILITY_CONSTITUTION, -1);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
22
_working/nw_s0_1carrion.nss
Normal file
22
_working/nw_s0_1carrion.nss
Normal file
@@ -0,0 +1,22 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Carrions Crawler Brain Juice
|
||||
//:: NW_S0_1Carrion
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Induces Paralysis
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 11, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
effect eParal = EffectParalyze();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
effect eLink = EffectLinkEffects(eParal, eLink);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10));
|
||||
}
|
||||
19
_working/nw_s0_1sassone.nss
Normal file
19
_working/nw_s0_1sassone.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Sassone Leaf Residue On Hit
|
||||
//:: NW_S0_1Sassone
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Does 2d12 damage on hit.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 11, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
effect eDam = EffectDamage(d12(2), DAMAGE_TYPE_ACID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
}
|
||||
23
_working/nw_s0_1shadess.nss
Normal file
23
_working/nw_s0_1shadess.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Shadow Essence On Hit
|
||||
//:: NW_S0_1ShadEss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
1 Point Permenent Strength Damage
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 11, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
effect eDrain = EffectAbilityDecrease(ABILITY_STRENGTH, -1);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
21
_working/nw_s0_2bluwhinn.nss
Normal file
21
_working/nw_s0_2bluwhinn.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Blue Whinnis Poison Payload
|
||||
//:: NW_S0_2BluWhinn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Character is rendered unconscious for 10 rounds.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 11, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
effect eSleep = EffectSleep();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eLink = EffectLinkEffects(eSleep, eVis);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10));
|
||||
}
|
||||
17
_working/nw_s0_blessweap.nss
Normal file
17
_working/nw_s0_blessweap.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Bless Weapon
|
||||
//:: NW_S0_BlessWeap.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Bless Weapon", 0);
|
||||
}
|
||||
|
||||
71
_working/nw_s0_bullstr.nss
Normal file
71
_working/nw_s0_bullstr.nss
Normal file
@@ -0,0 +1,71 @@
|
||||
//////////////////////////////////////////////////
|
||||
// Bull's Strength
|
||||
//-----------------------------------------------
|
||||
// Created By: Brenon Holmes
|
||||
// Created On: 10/12/2000
|
||||
// Description: This script changes someone's strength
|
||||
// Updated 2003-07-17 to fix stacking issue with blackguard
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
#include "nw_i0_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eStr;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int nModify = d4() + 1;
|
||||
float fDuration = HoursToSeconds(nCasterLvl);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Signal the spell cast at event
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_BULLS_STRENGTH, FALSE));
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nModify = 5;//Damage is at max
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nModify = nModify + (nModify/2);
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
fDuration = fDuration * 2.0; //Duration is +100%
|
||||
}
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
// This code was there to prevent stacking issues, but programming says thats handled in code...
|
||||
/* if (GetHasSpellEffect(SPELL_GREATER_BULLS_STRENGTH))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//Apply effects and VFX to target
|
||||
RemoveSpellEffects(SPELL_BULLS_STRENGTH, OBJECT_SELF, oTarget);
|
||||
RemoveSpellEffects(SPELLABILITY_BG_BULLS_STRENGTH, OBJECT_SELF, oTarget);
|
||||
*/
|
||||
eStr = EffectAbilityIncrease(ABILITY_STRENGTH,nModify);
|
||||
effect eLink = EffectLinkEffects(eStr, eDur);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration);
|
||||
|
||||
}
|
||||
17
_working/nw_s0_burnhands.nss
Normal file
17
_working/nw_s0_burnhands.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Burning Hands
|
||||
//:: NW_S0_BurnHands.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Burning Hands", 0);
|
||||
}
|
||||
|
||||
26
_working/nw_s0_calmemot.nss
Normal file
26
_working/nw_s0_calmemot.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Calm Emotions
|
||||
//:: NW_S0_CalmEmot.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eImpact = EffectVisualEffect(192);//VFX_FNF_LOS_NORMAL_20
|
||||
location lLocal = GetSpellTargetLocation();
|
||||
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lLocal);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(2));
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lLocal);
|
||||
}
|
||||
}
|
||||
|
||||
74
_working/nw_s0_catgrace.nss
Normal file
74
_working/nw_s0_catgrace.nss
Normal file
@@ -0,0 +1,74 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Cat's Grace
|
||||
//:: NW_S0_CatGrace
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// The transmuted creature becomes more graceful,
|
||||
// agile, and coordinated. The spell grants an
|
||||
// enhancement bonus to Dexterity of 1d4+1
|
||||
// points, adding the usual benefits to AC,
|
||||
// Reflex saves, Dexterity-based skills, etc.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 18, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk
|
||||
//:: Last Updated On: April 5th, 2001
|
||||
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eDex;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int nModify = d4() + 1;
|
||||
float fDuration = HoursToSeconds(nCasterLvl);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Signal spell cast at event to fire on the target.
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CATS_GRACE, FALSE));
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nModify = 5;//Damage is at max
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nModify = FloatToInt( IntToFloat(nModify) * 1.5 ); //Damage/Healing is +50%
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
fDuration = fDuration * 2.0; //Duration is +100%
|
||||
}
|
||||
//Create the Ability Bonus effect with the correct modifier
|
||||
eDex = EffectAbilityIncrease(ABILITY_DEXTERITY,nModify);
|
||||
effect eLink = EffectLinkEffects(eDex, eDur);
|
||||
|
||||
//Apply visual and bonus effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
17
_working/nw_s0_circchaos.nss
Normal file
17
_working/nw_s0_circchaos.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Magic Circle Against Chaos
|
||||
//:: NW_S0_CircChaos.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Magic Circle Against Chaos", 0);
|
||||
}
|
||||
|
||||
63
_working/nw_s0_circevil.nss
Normal file
63
_working/nw_s0_circevil.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Magic Circle Against Evil
|
||||
//:: NW_S0_CircEvil.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: March 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables including Area of Effect Object
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_CIRCGOOD);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROTECTION_GOOD_MINOR);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_GOOD_HELP);
|
||||
|
||||
effect eLink = EffectLinkEffects(eAOE, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Make sure duration does no equal 0
|
||||
if (nDuration < 1)
|
||||
{
|
||||
nDuration = 1;
|
||||
}
|
||||
//Check Extend metamagic feat.
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MAGIC_CIRCLE_AGAINST_EVIL, FALSE));
|
||||
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
}
|
||||
60
_working/nw_s0_circgood.nss
Normal file
60
_working/nw_s0_circgood.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Magic Circle Against Good
|
||||
//:: NW_S0_CircGood.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables including Area of Effect Object
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_CIRCEVIL);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROTECTION_EVIL_MINOR);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eEvil = EffectVisualEffect(VFX_IMP_EVIL_HELP);
|
||||
|
||||
effect eLink = EffectLinkEffects(eAOE, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Make sure duration does no equal 0
|
||||
if (nDuration < 1)
|
||||
{
|
||||
nDuration = 1;
|
||||
}
|
||||
//Check Extend metamagic feat.
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MAGIC_CIRCLE_AGAINST_GOOD, FALSE));
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEvil, oTarget);
|
||||
}
|
||||
17
_working/nw_s0_circlaw.nss
Normal file
17
_working/nw_s0_circlaw.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Magic Circle Against Law
|
||||
//:: NW_S0_CircLaw.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Magic Circle Against Law", 0);
|
||||
}
|
||||
|
||||
19
_working/nw_s0_clokchaos.nss
Normal file
19
_working/nw_s0_clokchaos.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Cloak of Chaos
|
||||
//:: NW_S0_CloakChaos.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//::///////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP);
|
||||
object oTarget = GetSpellTargetObject();
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);;
|
||||
}
|
||||
|
||||
45
_working/nw_s0_curcrwn.nss
Normal file
45
_working/nw_s0_curcrwn.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Cure Critical Wounds
|
||||
//:: NW_S0_CurCrWn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// As cure light wounds, except cure critical wounds
|
||||
// cures 4d8 points of damage plus 1 point per
|
||||
// caster level (up to +20).
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 18, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: July 26, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
spellsCure(d8(4), 20, 32, VFX_IMP_SUNSTRIKE, VFX_IMP_HEALING_G, GetSpellId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
48
_working/nw_s0_curlgtw.nss
Normal file
48
_working/nw_s0_curlgtw.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Cure Light Wounds
|
||||
//:: NW_S0_CurLgtW
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// When laying your hand upon a living creature,
|
||||
// you channel positive energy that cures 1d8 points
|
||||
// of damage plus 1 point per caster level (up to +5).
|
||||
// Since undead are powered by negative energy, this
|
||||
// spell inflicts damage on them instead of curing
|
||||
// their wounds. An undead creature can attempt a
|
||||
// Will save to take half damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brennon Holmes
|
||||
//:: Created On: Oct 12, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: July 26, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
spellsCure(d8(), 5, 8, VFX_IMP_SUNSTRIKE, VFX_IMP_HEALING_S, GetSpellId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
41
_working/nw_s0_curminw.nss
Normal file
41
_working/nw_s0_curminw.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Cure Minor Wounds
|
||||
//:: NW_S0_CurMinW
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// As cure light wounds, except cure minor wounds
|
||||
// cures only 1 point of damage
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 18, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: Feb 22, 2001
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 6, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
spellsCure(4, 0, 4, VFX_IMP_SUNSTRIKE, VFX_IMP_HEAD_HEAL, GetSpellId());
|
||||
}
|
||||
45
_working/nw_s0_curmodw.nss
Normal file
45
_working/nw_s0_curmodw.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Cure Moderate Wounds
|
||||
//:: NW_S0_CurModW
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// As cure light wounds, except cure moderate wounds
|
||||
// cures 2d8 points of damage plus 1 point per
|
||||
// caster level (up to +10).
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: July 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
spellsCure(d8(2), 10, 16, VFX_IMP_SUNSTRIKE, VFX_IMP_HEALING_M, GetSpellId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
49
_working/nw_s0_curserw.nss
Normal file
49
_working/nw_s0_curserw.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cure Serious Wounds
|
||||
//:: NW_S0_CurSerW
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// As cure light wounds, except cure moderate wounds
|
||||
// cures 3d8 points of damage plus 1 point per caster
|
||||
// level (up to +15).
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 18, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: July 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
spellsCure(d8(3), 15, 24, VFX_IMP_SUNSTRIKE, VFX_IMP_HEALING_L, GetSpellId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
61
_working/nw_s0_darkvis.nss
Normal file
61
_working/nw_s0_darkvis.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Darkvision
|
||||
//:: NW_S0_DarkVis
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Applies the darkvision effect to the target for
|
||||
1 hour per caster level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 13, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//Needed: New effect
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ULTRAVISION);
|
||||
//effect eVis2 = EffectVisualEffect(VFX_DUR_MAGICAL_SIGHT);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eUltra = EffectUltravision();
|
||||
effect eLink = EffectLinkEffects(eVis, eDur);
|
||||
//eLink = EffectLinkEffects(eLink, eVis2);
|
||||
eLink = EffectLinkEffects(eLink, eUltra);
|
||||
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DARKVISION, FALSE));
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
72
_working/nw_s0_eaglespl.nss
Normal file
72
_working/nw_s0_eaglespl.nss
Normal file
@@ -0,0 +1,72 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Eagles Splendor
|
||||
//:: NW_S0_EagleSpl
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Raises targets Chr by 1d4+1
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 15, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eRaise;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nRaise = d4(1) + 1;
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
//Fire cast spell at event for the specified target
|
||||
//SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_EAGLES_SPLENDOR));
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nRaise = 5;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nRaise = nRaise + (nRaise/2); //Damage/Healing is +50%
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Set Adjust Ability Score effect
|
||||
eRaise = EffectAbilityIncrease(ABILITY_CHARISMA, nRaise);
|
||||
effect eLink = EffectLinkEffects(eRaise, eDur);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_EAGLE_SPLEDOR, FALSE));
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
|
||||
|
||||
}
|
||||
77
_working/nw_s0_endele.nss
Normal file
77
_working/nw_s0_endele.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Endure Elements
|
||||
//:: NW_S0_EndEle
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Offers 10 points of elemental resistance. If 20
|
||||
points of a single elemental type is done to the
|
||||
protected creature the spell fades
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 23, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "nw_i0_spells"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nAmount = 20;
|
||||
int nResistance = 10;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eCold = EffectDamageResistance(DAMAGE_TYPE_COLD, nResistance, nAmount);
|
||||
effect eFire = EffectDamageResistance(DAMAGE_TYPE_FIRE, nResistance, nAmount);
|
||||
effect eAcid = EffectDamageResistance(DAMAGE_TYPE_ACID, nResistance, nAmount);
|
||||
effect eSonic = EffectDamageResistance(DAMAGE_TYPE_SONIC, nResistance, nAmount);
|
||||
effect eElec = EffectDamageResistance(DAMAGE_TYPE_ELECTRICAL, nResistance, nAmount);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_ELEMENTS);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ELEMENTAL_PROTECTION);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENDURE_ELEMENTS, FALSE));
|
||||
|
||||
//Link Effects
|
||||
effect eLink = EffectLinkEffects(eCold, eFire);
|
||||
eLink = EffectLinkEffects(eLink, eAcid);
|
||||
eLink = EffectLinkEffects(eLink, eSonic);
|
||||
eLink = EffectLinkEffects(eLink, eElec);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
RemoveEffectsFromSpell(oTarget, GetSpellId());
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(24));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
64
_working/nw_s0_endurce.nss
Normal file
64
_working/nw_s0_endurce.nss
Normal file
@@ -0,0 +1,64 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: [Endurance]
|
||||
//:: [NW_S0_Endurce.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Gives the target 1d4+1 Constitution.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 31, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eCon;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int nModify = d4() + 1;
|
||||
float fDuration = HoursToSeconds(nCasterLvl);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENDURANCE, FALSE));
|
||||
//Check for metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nModify = 5;
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nModify = FloatToInt( IntToFloat(nModify) * 1.5 );
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
fDuration = fDuration * 2.0;
|
||||
}
|
||||
//Set the ability bonus effect
|
||||
eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION,nModify);
|
||||
effect eLink = EffectLinkEffects(eCon, eDur);
|
||||
|
||||
//Appyly the VFX impact and ability bonus effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
17
_working/nw_s0_flmblade.nss
Normal file
17
_working/nw_s0_flmblade.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Flame Blade
|
||||
//:: NW_S0_FlmBlade.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Flame Blade", 0);
|
||||
}
|
||||
|
||||
68
_working/nw_s0_foxcunng.nss
Normal file
68
_working/nw_s0_foxcunng.nss
Normal file
@@ -0,0 +1,68 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Fox's Cunning
|
||||
//:: NW_S0_FoxCunng
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Raises targets Int by 1d4+1
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 15, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eRaise;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nRaise = d4(1) + 1;
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FOXS_CUNNING, FALSE));
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nRaise = 5;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nRaise = nRaise + (nRaise/2); //Damage/Healing is +50%
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Set Adjust Ability Score effect
|
||||
eRaise = EffectAbilityIncrease(ABILITY_INTELLIGENCE, nRaise);
|
||||
effect eLink = EffectLinkEffects(eRaise, eDur);
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
17
_working/nw_s0_grmgweap.nss
Normal file
17
_working/nw_s0_grmgweap.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Greater Magic Weapon
|
||||
//:: NW_S0_GrMgWeap.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Greater Magic Weapon", 0);
|
||||
}
|
||||
|
||||
108
_working/nw_s0_grrestore.nss
Normal file
108
_working/nw_s0_grrestore.nss
Normal file
@@ -0,0 +1,108 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Greater Restoration
|
||||
//:: NW_S0_GrRestore.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Removes all negative effects of a temporary nature
|
||||
and all permanent effects of a supernatural nature
|
||||
from the character. Does not remove the effects
|
||||
relating to Mind-Affecting spells or movement alteration.
|
||||
Heals target for 5d8 + 1 point per caster level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
// return TRUE if the effect created by a supernatural force and can't be dispelled by spells
|
||||
int GetIsSupernaturalCurse(effect eEff);
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
|
||||
|
||||
effect eBad = GetFirstEffect(oTarget);
|
||||
//Search for negative effects
|
||||
while(GetIsEffectValid(eBad))
|
||||
{
|
||||
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_CURSE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DISEASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_POISON ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_CHARMED ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DOMINATED ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAZED ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_CONFUSED ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_FRIGHTENED ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SLOW ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_STUNNED)
|
||||
{
|
||||
//Remove effect if it is negative.
|
||||
if(!GetIsSupernaturalCurse(eBad))
|
||||
RemoveEffect(oTarget, eBad);
|
||||
}
|
||||
eBad = GetNextEffect(oTarget);
|
||||
}
|
||||
if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
int nHeal = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget);
|
||||
effect eHeal = EffectHeal(nHeal);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_RESTORATION, FALSE));
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
|
||||
}
|
||||
|
||||
int GetIsSupernaturalCurse(effect eEff)
|
||||
{
|
||||
object oCreator = GetEffectCreator(eEff);
|
||||
if(GetTag(oCreator) == "q6e_ShaorisFellTemple")
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
111
_working/nw_s0_grshconj.nss
Normal file
111
_working/nw_s0_grshconj.nss
Normal file
@@ -0,0 +1,111 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Greater Shadow Conjuration
|
||||
//:: NW_S0_GrShConj.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
If the opponent is clicked on Shadow Bolt is cast.
|
||||
If the caster clicks on himself he will cast
|
||||
Clarity and Mirror Image. If they click on
|
||||
the ground they will summon a Shadow Assassin.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void ShadowBolt (object oTarget, int nMetaMagic);
|
||||
|
||||
void main()
|
||||
{
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nCast;
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (oTarget == OBJECT_SELF)
|
||||
{
|
||||
nCast = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nCast = 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nCast = 3;
|
||||
}
|
||||
effect eMirror;
|
||||
effect eClarity;
|
||||
effect eMind;
|
||||
effect eLink;
|
||||
int nCasterLevel;
|
||||
effect eSummon;
|
||||
effect eGate;
|
||||
|
||||
switch (nCast)
|
||||
{
|
||||
case 1:
|
||||
/*
|
||||
Cast Clarity and Mirror Image on the caster
|
||||
*/
|
||||
eMirror = EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT);
|
||||
eClarity = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
|
||||
eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_POSITIVE);
|
||||
eLink = EffectLinkEffects(eMirror, eMind);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink,oTarget, RoundsToSeconds(2));
|
||||
break;
|
||||
case 2:
|
||||
if (!ResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
ShadowBolt(oTarget, nMetaMagic);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||
eSummon = EffectSummonCreature("sbio_shadassa");
|
||||
eGate = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowBolt (object oTarget, int nMetaMagic)
|
||||
{
|
||||
int nDamage;
|
||||
int nBolts = GetCasterLevel(OBJECT_SELF)/5;
|
||||
int nCnt;
|
||||
for (nCnt = 0; nCnt < nBolts; nCnt++)
|
||||
{
|
||||
int nDam = d6(3);
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = 18;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDamage = nDamage + nDamage/2; //Damage/Healing is +50%
|
||||
}
|
||||
if (ReflexSave(oTarget, GetSpellSaveDC()))
|
||||
{
|
||||
nDamage = nDamage/2;
|
||||
}
|
||||
effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
75
_working/nw_s0_grstonesk.nss
Normal file
75
_working/nw_s0_grstonesk.nss
Normal file
@@ -0,0 +1,75 @@
|
||||
///::////////////////////////////////////////////////
|
||||
//:: Greater Stoneskin
|
||||
//:: NW_S0_GrStoneSk
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Gives the gives the creature touched 20/+5
|
||||
damage reduction. This lasts for 1 hour per
|
||||
caster level or until 10 * Caster Level (150 Max)
|
||||
is dealt to the person.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: March 16 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Andrew Nobbs March 4, 2003
|
||||
#include "nw_i0_spells"
|
||||
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nAmount = GetCasterLevel(OBJECT_SELF);
|
||||
int nDuration = nAmount;
|
||||
object oTarget = GetSpellTargetObject();
|
||||
|
||||
///Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_STONESKIN, FALSE));
|
||||
|
||||
if (nAmount > 15)
|
||||
{
|
||||
nAmount = 15;
|
||||
}
|
||||
int nDamage = nAmount * 10;
|
||||
if (GetMetaMagicFeat() == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration *= 2;
|
||||
}
|
||||
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect eStone = EffectDamageReduction(20, DAMAGE_POWER_PLUS_FIVE, nDamage);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
//Link the texture replacement and the damage reduction effect
|
||||
effect eLink = EffectLinkEffects(eVis, eStone);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
//Remove effects from target if they have Greater Stoneskin cast on them already.
|
||||
RemoveEffectsFromSpell(oTarget, SPELL_GREATER_STONESKIN);
|
||||
|
||||
//Apply the linked effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
}
|
||||
17
_working/nw_s0_gustwind.nss
Normal file
17
_working/nw_s0_gustwind.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Gust of Wind
|
||||
//:: NW_S0_GustWind.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Gust of Wind", 0);
|
||||
}
|
||||
|
||||
88
_working/nw_s0_harm.nss
Normal file
88
_working/nw_s0_harm.nss
Normal file
@@ -0,0 +1,88 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: [Harm]
|
||||
//:: [NW_S0_Harm.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Reduces target to 1d4 HP on successful touch
|
||||
//:: attack. If the target is undead it is healed.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Soleski
|
||||
//:: Created On: Jan 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDamage, nHeal;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nTouch = TouchAttackMelee(oTarget);
|
||||
effect eVis = EffectVisualEffect(246);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_G);
|
||||
effect eHeal, eDam;
|
||||
AdjustAlignment(OBJECT_SELF,ALIGNMENT_EVIL,2);
|
||||
//Check that the target is undead
|
||||
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Figure out the amount of damage to heal
|
||||
nHeal = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget);
|
||||
//Set the heal effect
|
||||
eHeal = EffectHeal(nHeal);
|
||||
//Apply heal effect and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HARM, FALSE));
|
||||
}
|
||||
else if (nTouch) //== TRUE) 1 or 2 are valid return numbers from TouchAttackMelee
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HARM));
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
nDamage = GetCurrentHitPoints(oTarget) - d4(1);
|
||||
//Check for metamagic
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = GetCurrentHitPoints(oTarget) - 1;
|
||||
}
|
||||
|
||||
if (FortitudeSave(oTarget,24,SAVING_THROW_TYPE_NEGATIVE)!=0)
|
||||
{
|
||||
nDamage = GetCurrentHitPoints(oTarget)/2;
|
||||
}
|
||||
|
||||
eDam = EffectDamage(nDamage,DAMAGE_TYPE_NEGATIVE);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
91
_working/nw_s0_heal.nss
Normal file
91
_working/nw_s0_heal.nss
Normal file
@@ -0,0 +1,91 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Heal
|
||||
//:: [NW_S0_Heal.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Heals the target to full unless they are undead.
|
||||
//:: If undead they reduced to 1d4 HP.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eKill, eHeal;
|
||||
int nDamage, nHeal, nModify, nMetaMagic, nTouch;
|
||||
effect eSun = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_X);
|
||||
//Check to see if the target is an undead
|
||||
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL));
|
||||
//Make a touch attack
|
||||
if (TouchAttackMelee(oTarget))
|
||||
{
|
||||
//Make SR check
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
//Roll damage
|
||||
nModify = d4();
|
||||
nMetaMagic = GetMetaMagicFeat();
|
||||
//Make metamagic check
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nModify = 1;
|
||||
}
|
||||
//Figure out the amount of damage to inflict
|
||||
nDamage = GetCurrentHitPoints(oTarget) - nModify;
|
||||
//Set damage
|
||||
eKill = EffectDamage(nDamage, DAMAGE_TYPE_POSITIVE);
|
||||
//Apply damage effect and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSun, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL, FALSE));
|
||||
//Figure out how much to heal
|
||||
nHeal = GetMaxHitPoints(oTarget);
|
||||
//Set the heal effect
|
||||
eHeal = EffectHeal(nHeal);
|
||||
//Apply the heal effect and the VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHealVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
17
_working/nw_s0_holyswrd.nss
Normal file
17
_working/nw_s0_holyswrd.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Holy Sword
|
||||
//:: NW_S0_HolySwrd.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Holy Sword", 0);
|
||||
}
|
||||
|
||||
62
_working/nw_s0_lsrestor.nss
Normal file
62
_working/nw_s0_lsrestor.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Lesser Restoration
|
||||
//:: NW_S0_LsRestor.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Removes all supernatural effects related to ability
|
||||
damage, as well as AC, Damage,
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_LESSER);
|
||||
effect eBad = GetFirstEffect(oTarget);
|
||||
//Search for negative effects
|
||||
while(GetIsEffectValid(eBad))
|
||||
{
|
||||
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE)
|
||||
{
|
||||
//Remove effect if it is negative.
|
||||
RemoveEffect(oTarget, eBad);
|
||||
}
|
||||
eBad = GetNextEffect(oTarget);
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LESSER_RESTORATION, FALSE));
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
|
||||
}
|
||||
|
||||
21
_working/nw_s0_lsspturn.nss
Normal file
21
_working/nw_s0_lsspturn.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Lesser Spell Turning
|
||||
//:: NW_S0_LsSpTurn.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_SPELLTURNING);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
;
|
||||
}
|
||||
|
||||
21
_working/nw_s0_magvest.nss
Normal file
21
_working/nw_s0_magvest.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Magic Vestment
|
||||
//:: NW_S0_MagVest.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
|
||||
}
|
||||
|
||||
17
_working/nw_s0_magweap.nss
Normal file
17
_working/nw_s0_magweap.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Magic Weapon
|
||||
//:: NW_S0_MagWeap.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SpeakString("Casting Magic Weapon", 0);
|
||||
}
|
||||
|
||||
72
_working/nw_s0_masdomn.nss
Normal file
72
_working/nw_s0_masdomn.nss
Normal file
@@ -0,0 +1,72 @@
|
||||
///::////////////////////////////////////////////////
|
||||
//:: [Mass Dominate]
|
||||
//:: [NW_S0_MsDomn.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The caster attempts to dominate a group of individuals
|
||||
who's HD can be no more than his level combined.
|
||||
The spell starts checking the area and those that
|
||||
fail a will save are dominated. The affected persons
|
||||
are dominated for 1 round per 2 caster levels.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Feb 4, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 10, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major varialbes
|
||||
object oTarget;
|
||||
effect eDom = EffectDominated();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eMind, eDom);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DOMINATE_S);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||
int nDuration = nCasterLevel/2;
|
||||
int nHD = nCasterLevel;
|
||||
int nCnt = 0;
|
||||
int nRacial = GetRacialType(oTarget);
|
||||
//Check for metamagic extension
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nCasterLevel;
|
||||
}
|
||||
//Get first target in spell area
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget) && nCnt < nHD)
|
||||
{
|
||||
//Make sure the target is not in the caster's faction
|
||||
if(GetIsEnemy(oTarget))
|
||||
{
|
||||
//Make sure the target is a humanoid
|
||||
if (GetIsPlayableRacialType(oTarget) ||
|
||||
(nRacial == RACIAL_TYPE_HUMANOID_MONSTROUS) ||
|
||||
(nRacial == RACIAL_TYPE_HUMANOID_ORC) ||
|
||||
(nRacial == RACIAL_TYPE_HUMANOID_REPTILIAN) ||
|
||||
(nRacial == RACIAL_TYPE_ANIMAL) ||
|
||||
((nHD-nCnt) > GetHitDice(oTarget)))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DOMINATE_PERSON));
|
||||
//Make an SR check
|
||||
if (!ResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
//Make a Will save to negate
|
||||
if (!WillSave(oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
//Add targets HD to the total
|
||||
nCnt = nCnt + GetHitDice(oTarget);
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation());
|
||||
}
|
||||
}
|
||||
101
_working/nw_s0_masheal.nss
Normal file
101
_working/nw_s0_masheal.nss
Normal file
@@ -0,0 +1,101 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Mass Heal
|
||||
//:: [NW_S0_MasHeal.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Heals all friendly targets within 10ft to full
|
||||
//:: unless they are undead.
|
||||
//:: If undead they reduced to 1d4 HP.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 11, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
//Declare major variables
|
||||
effect eKill;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eHeal;
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_G);
|
||||
effect eStrike = EffectVisualEffect(VFX_FNF_LOS_HOLY_10);
|
||||
int nTouch, nModify, nDamage, nHeal;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
float fDelay;
|
||||
//Apply VFX area impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation());
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation());
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
fDelay = GetRandomDelay();
|
||||
//Check to see if the target is an undead
|
||||
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD && !GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MASS_HEAL));
|
||||
//Make a touch attack
|
||||
nTouch = TouchAttackRanged(oTarget);
|
||||
if (nTouch == 1)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Make an SR check
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay))
|
||||
{
|
||||
//Roll damage
|
||||
nModify = d4();
|
||||
//make metamagic check
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nModify = 1;
|
||||
}
|
||||
//Detemine the damage to inflict to the undead
|
||||
nDamage = GetCurrentHitPoints(oTarget) - nModify;
|
||||
//Set the damage effect
|
||||
eKill = EffectDamage(nDamage, DAMAGE_TYPE_POSITIVE);
|
||||
//Apply the VFX impact and damage effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Make a faction check
|
||||
if(GetIsFriend(oTarget) && GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MASS_HEAL, FALSE));
|
||||
//Determine amount to heal
|
||||
nHeal = GetMaxHitPoints(oTarget);
|
||||
//Set the damage effect
|
||||
eHeal = EffectHeal(nHeal);
|
||||
//Apply the VFX impact and heal effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in the spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation());
|
||||
}
|
||||
}
|
||||
20
_working/nw_s0_mirrimage.nss
Normal file
20
_working/nw_s0_mirrimage.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Mirror Image
|
||||
//:: NW_S0_MirrImage.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(2));
|
||||
}
|
||||
|
||||
20
_working/nw_s0_mislead.nss
Normal file
20
_working/nw_s0_mislead.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Mislead
|
||||
//:: NW_S0_Mislead.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//::///////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GHOST_SMOKE_2);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(2));
|
||||
}
|
||||
|
||||
38
_working/nw_s0_neutpois.nss
Normal file
38
_working/nw_s0_neutpois.nss
Normal file
@@ -0,0 +1,38 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Neutralize Poison
|
||||
//:: NW_S0_NeutPois.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Removes all poison effects from the target.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: Aug 3, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nType;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
|
||||
//Get the first effect on the target
|
||||
effect ePoison = GetFirstEffect(oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_NEUTRALIZE_POISON, FALSE));
|
||||
while(GetIsEffectValid(ePoison))
|
||||
{
|
||||
//Check to see if the effect is type poison
|
||||
if (GetEffectType(ePoison) == EFFECT_TYPE_POISON)
|
||||
{
|
||||
//Remove poison effect and apply VFX constant
|
||||
RemoveEffect(oTarget, ePoison);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
//Get next effect on target
|
||||
GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
70
_working/nw_s0_owlwis.nss
Normal file
70
_working/nw_s0_owlwis.nss
Normal file
@@ -0,0 +1,70 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Owl's Wisdom
|
||||
//:: NW_S0_OwlWis
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Raises targets Wis by 1d4+1
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 15, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eRaise;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nRaise = d4(1) + 1;
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nRaise = 5;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nRaise = nRaise + (nRaise/2); //Damage/Healing is +50%
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Set Adjust Ability Score effect
|
||||
eRaise = EffectAbilityIncrease(ABILITY_WISDOM, nRaise);
|
||||
effect eLink = EffectLinkEffects(eRaise, eDur);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_OWLS_WISDOM, FALSE));
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
20
_working/nw_s0_prchaos.nss
Normal file
20
_working/nw_s0_prchaos.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Protection from Chaos
|
||||
//:: NW_S0_PrChaos.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
|
||||
61
_working/nw_s0_premo.nss
Normal file
61
_working/nw_s0_premo.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Premonition
|
||||
//:: NW_S0_Premo
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Gives the gives the creature touched 30/+5
|
||||
damage reduction. This lasts for 1 hour per
|
||||
caster level or until 10 * Caster Level
|
||||
is dealt to the person.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: March 16 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nDamage=nDuration*10;
|
||||
if (nDamage>150)
|
||||
{
|
||||
nDamage=150;
|
||||
}
|
||||
int nLimit = nDuration * 10;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eStone = EffectDamageReduction(30, DAMAGE_POWER_PLUS_FIVE, nDamage);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_PREMONITION);
|
||||
//Link the visual and the damage reduction effect
|
||||
effect eLink = EffectLinkEffects(eStone, eVis);
|
||||
//Enter Metamagic conditions
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_PREMONITION, FALSE));
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
RemoveEffectsFromSpell(OBJECT_SELF, SPELL_PREMONITION);
|
||||
|
||||
//Apply the linked effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, TurnsToSeconds(nDuration));
|
||||
}
|
||||
74
_working/nw_s0_previl.nss
Normal file
74
_working/nw_s0_previl.nss
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Protection from Evil
|
||||
//:: NW_S0_PrEvil.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
When confronted by evil the protected character
|
||||
gains +2 AC, +2 to Saves and immunity to all
|
||||
mind-affecting spells cast by evil creatures
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Sept 28, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nAlign = ALIGNMENT_EVIL;
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//effect eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP);
|
||||
effect eAC = EffectACIncrease(2, AC_DEFLECTION_BONUS);
|
||||
//Change the effects so that it only applies when the target is evil
|
||||
//Try wrapping the sanctuary effect in the Evil wrapper and see if the effect works.
|
||||
|
||||
eAC = VersusAlignmentEffect(eAC,ALIGNMENT_ALL, nAlign);
|
||||
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 2);
|
||||
eSave = VersusAlignmentEffect(eSave,ALIGNMENT_ALL, nAlign);
|
||||
effect eImmune = EffectImmunity(IMMUNITY_TYPE_MIND_SPELLS);
|
||||
eImmune = VersusAlignmentEffect(eImmune,ALIGNMENT_ALL, nAlign);
|
||||
//effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_GOOD_MINOR);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eImmune, eSave);
|
||||
eLink = EffectLinkEffects(eLink, eAC);
|
||||
//eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PROTECTION_FROM_EVIL, FALSE));
|
||||
//ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
}
|
||||
|
||||
74
_working/nw_s0_prgood.nss
Normal file
74
_working/nw_s0_prgood.nss
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Protection from Good
|
||||
//:: NW_S0_PrGood.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
When confronted by good the protected character
|
||||
gains +2 AC, +2 to Saves and immunity to all
|
||||
mind-affecting spells cast by good creatures
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Sept 28, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nAlign = ALIGNMENT_GOOD;
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//effect eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP);
|
||||
effect eAC = EffectACIncrease(2, AC_DEFLECTION_BONUS);
|
||||
//Change the effects so that it only applies when the target is evil
|
||||
eAC = VersusAlignmentEffect(eAC, ALIGNMENT_ALL, nAlign);
|
||||
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 2);
|
||||
eSave = VersusAlignmentEffect(eSave,ALIGNMENT_ALL, nAlign);
|
||||
effect eImmune = EffectImmunity(IMMUNITY_TYPE_MIND_SPELLS);
|
||||
eImmune = VersusAlignmentEffect(eImmune,ALIGNMENT_ALL, nAlign);
|
||||
//effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_EVIL_MINOR);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
|
||||
effect eLink = EffectLinkEffects(eImmune, eSave);
|
||||
eLink = EffectLinkEffects(eLink, eAC);
|
||||
//eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PROTECTION_FROM_GOOD, FALSE));
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
//ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
}
|
||||
|
||||
20
_working/nw_s0_prlaw.nss
Normal file
20
_working/nw_s0_prlaw.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Protection from Law
|
||||
//:: NW_S0_PrLaw.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_EVIL_HELP);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
|
||||
77
_working/nw_s0_proele.nss
Normal file
77
_working/nw_s0_proele.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Protection from Elements
|
||||
//:: NW_S0_ProEle
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Offers 30 points of elemental resistance. If 40
|
||||
points of a single elemental type is done to the
|
||||
protected creature the spell fades
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "nw_i0_spells"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = 24;
|
||||
int nAmount = 40;
|
||||
int nResistance = 30;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eCold = EffectDamageResistance(DAMAGE_TYPE_COLD, nResistance, nAmount);
|
||||
effect eFire = EffectDamageResistance(DAMAGE_TYPE_FIRE, nResistance, nAmount);
|
||||
effect eAcid = EffectDamageResistance(DAMAGE_TYPE_ACID, nResistance, nAmount);
|
||||
effect eSonic = EffectDamageResistance(DAMAGE_TYPE_SONIC, nResistance, nAmount);
|
||||
effect eElec = EffectDamageResistance(DAMAGE_TYPE_ELECTRICAL, nResistance, nAmount);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_ELEMENTS);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ELEMENTAL_PROTECTION);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PROTECTION_FROM_ELEMENTS, FALSE));
|
||||
|
||||
//Link Effects
|
||||
effect eLink = EffectLinkEffects(eCold, eFire);
|
||||
eLink = EffectLinkEffects(eLink, eAcid);
|
||||
eLink = EffectLinkEffects(eLink, eSonic);
|
||||
eLink = EffectLinkEffects(eLink, eElec);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
RemoveEffectsFromSpell(oTarget, GetSpellId());
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
126
_working/nw_s0_raisdead.nss
Normal file
126
_working/nw_s0_raisdead.nss
Normal file
@@ -0,0 +1,126 @@
|
||||
/////::///////////////////////////////////////////////
|
||||
//:: [Raise Dead]
|
||||
//:: [NW_S0_RaisDead.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Brings a character back to life with 1 HP.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 31, 2001
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "rpo_inc"
|
||||
#include "jw_xp_penalty"
|
||||
|
||||
|
||||
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
if (GetIsInCombat(OBJECT_SELF))
|
||||
{
|
||||
SendMessageToPC(OBJECT_SELF,"You need peace and quiet to concentrate while casting this spell. You cannot cast it in combat, or while party members are distratcing you");
|
||||
return;
|
||||
}
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eRaise = EffectResurrection();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||
if(GetIsDead(oTarget))
|
||||
{
|
||||
|
||||
|
||||
if (GetLocalInt(oTarget,"cantres"))
|
||||
{
|
||||
SendMessageToPC(oTarget,"The raise dead spell fails");
|
||||
FloatingTextStringOnCreature("The raise dead spell fails",OBJECT_SELF,TRUE);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
return;
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE));
|
||||
//Apply raise dead effect and VFX impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
|
||||
|
||||
|
||||
object oDead=oTarget;
|
||||
int nPenalty=40;
|
||||
int nXP = GetXP(oDead);
|
||||
nPenalty = nPenalty * GetHitDice(oDead);
|
||||
int nHD = GetHitDice(oDead);
|
||||
|
||||
// * You can not lose a level with this respawning
|
||||
int nMin = ((nHD * (nHD - 1)) / 2) * 1000;
|
||||
|
||||
int nNewXP = nXP - nPenalty;
|
||||
if (nNewXP < nMin)
|
||||
{
|
||||
nNewXP = nMin;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (nHD==1)
|
||||
{
|
||||
nNewXP = (nXP-10);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (nNewXP < (nXP/10*9))
|
||||
{
|
||||
nNewXP = (nXP/10*9);
|
||||
}
|
||||
|
||||
|
||||
if (nNewXP < 1)
|
||||
{
|
||||
nNewXP = 1;
|
||||
}
|
||||
|
||||
|
||||
SetXP(oDead, nNewXP);
|
||||
|
||||
if (GetSpellCastItem() != OBJECT_INVALID)
|
||||
{
|
||||
effect eStr=EffectAbilityDecrease(ABILITY_STRENGTH,3);
|
||||
effect eDex=EffectAbilityDecrease(ABILITY_DEXTERITY,3);
|
||||
effect eWis=EffectAbilityDecrease(ABILITY_WISDOM,3);
|
||||
effect eInt=EffectAbilityDecrease(ABILITY_INTELLIGENCE,3);
|
||||
effect eChar=EffectAbilityDecrease(ABILITY_CHARISMA,3);
|
||||
effect eLink=EffectLinkEffects(eStr,eDex);
|
||||
eLink=EffectLinkEffects(eWis,eLink);
|
||||
eLink=EffectLinkEffects(eInt,eLink);
|
||||
eLink=EffectLinkEffects(eChar,eLink);
|
||||
effect eSpeed=EffectMovementSpeedDecrease(30);
|
||||
effect eCurse=ExtraordinaryEffect(eLink);
|
||||
eSpeed=ExtraordinaryEffect(eSpeed);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eCurse,oDead,600.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSpeed,oDead,300.0);
|
||||
}
|
||||
|
||||
RemoveDeathAmulet(oTarget);
|
||||
|
||||
RemoveDeathAmulet(oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
77
_working/nw_s0_resele.nss
Normal file
77
_working/nw_s0_resele.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Resist Elements
|
||||
//:: NW_S0_ResEle
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Offers 20 points of elemental resistance. If 30
|
||||
points of a single elemental type is done to the
|
||||
protected creature the spell fades
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_spells"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nAmount = 30;
|
||||
int nResistance = 20;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eCold = EffectDamageResistance(DAMAGE_TYPE_COLD, nResistance, nAmount);
|
||||
effect eFire = EffectDamageResistance(DAMAGE_TYPE_FIRE, nResistance, nAmount);
|
||||
effect eAcid = EffectDamageResistance(DAMAGE_TYPE_ACID, nResistance, nAmount);
|
||||
effect eSonic = EffectDamageResistance(DAMAGE_TYPE_SONIC, nResistance, nAmount);
|
||||
effect eElec = EffectDamageResistance(DAMAGE_TYPE_ELECTRICAL, nResistance, nAmount);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_ELEMENTS);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ELEMENTAL_PROTECTION);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESIST_ELEMENTS, FALSE));
|
||||
|
||||
//Link Effects
|
||||
effect eLink = EffectLinkEffects(eCold, eFire);
|
||||
eLink = EffectLinkEffects(eLink, eAcid);
|
||||
eLink = EffectLinkEffects(eLink, eSonic);
|
||||
eLink = EffectLinkEffects(eLink, eElec);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
RemoveEffectsFromSpell(oTarget, GetSpellId());
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
130
_working/nw_s0_resserec.nss
Normal file
130
_working/nw_s0_resserec.nss
Normal file
@@ -0,0 +1,130 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: [Ressurection]
|
||||
//:: [NW_S0_Ressurec.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Brings a character back to life with full
|
||||
//:: health.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
////:: Created On: Jan 31, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "rpo_inc"
|
||||
#include "jw_xp_penalty"
|
||||
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
if (GetIsInCombat(OBJECT_SELF))
|
||||
{
|
||||
SendMessageToPC(OBJECT_SELF,"You need peace and quiet to concentrate while casting this spell. You cannot cast it in combat, or while party members are distratcing you");
|
||||
return;
|
||||
}
|
||||
|
||||
//Get the spell target
|
||||
object oTarget = GetSpellTargetObject();
|
||||
//Check to make sure the target is dead first
|
||||
if (GetIsDead(oTarget))
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||
if (GetLocalInt(oTarget,"cantres"))
|
||||
{
|
||||
SendMessageToPC(oTarget,"The ressurection spell fails");
|
||||
FloatingTextStringOnCreature("The ressurection spell fails",OBJECT_SELF,TRUE);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESURRECTION, FALSE));
|
||||
//Declare major variables
|
||||
int nHealed = GetMaxHitPoints(oTarget);
|
||||
effect eRaise = EffectResurrection();
|
||||
effect eHeal = EffectHeal(nHealed + 10);
|
||||
|
||||
|
||||
//Apply the heal, raise dead and VFX impact effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
|
||||
|
||||
object oDead=oTarget;
|
||||
int nPenalty=30;
|
||||
int nXP = GetXP(oDead);
|
||||
nPenalty = nPenalty * GetHitDice(oDead);
|
||||
int nHD = GetHitDice(oDead);
|
||||
|
||||
// * You can not lose a level with this respawning
|
||||
int nMin = ((nHD * (nHD - 1)) / 2) * 1000;
|
||||
|
||||
int nNewXP = nXP - nPenalty;
|
||||
if (nNewXP < nMin)
|
||||
{
|
||||
nNewXP = nMin;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (nHD==1)
|
||||
{
|
||||
nNewXP = (nXP-10);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (nNewXP < (nXP/10*9))
|
||||
{
|
||||
nNewXP = (nXP/10*9);
|
||||
}
|
||||
|
||||
|
||||
if (nNewXP < 1)
|
||||
{
|
||||
nNewXP = 1;
|
||||
}
|
||||
|
||||
|
||||
SetXP(oDead, nNewXP);
|
||||
if (GetSpellCastItem() != OBJECT_INVALID)
|
||||
{
|
||||
effect eStr=EffectAbilityDecrease(ABILITY_STRENGTH,2);
|
||||
effect eDex=EffectAbilityDecrease(ABILITY_DEXTERITY,2);
|
||||
effect eWis=EffectAbilityDecrease(ABILITY_WISDOM,2);
|
||||
effect eInt=EffectAbilityDecrease(ABILITY_INTELLIGENCE,2);
|
||||
effect eChar=EffectAbilityDecrease(ABILITY_CHARISMA,2);
|
||||
effect eLink=EffectLinkEffects(eStr,eDex);
|
||||
eLink=EffectLinkEffects(eWis,eLink);
|
||||
eLink=EffectLinkEffects(eInt,eLink);
|
||||
eLink=EffectLinkEffects(eChar,eLink);
|
||||
|
||||
effect eSpeed=EffectMovementSpeedDecrease(20);
|
||||
effect eCurse=ExtraordinaryEffect(eLink);
|
||||
eSpeed=ExtraordinaryEffect(eSpeed);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eCurse,oDead,450.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSpeed,oDead,200.0);
|
||||
}
|
||||
RemoveDeathAmulet(oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
98
_working/nw_s0_restore.nss
Normal file
98
_working/nw_s0_restore.nss
Normal file
@@ -0,0 +1,98 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Restoration
|
||||
//:: NW_S0_Restore.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Removes all negative effects unless they come
|
||||
from Poison, Disease or Curses.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "nw_i0_plot"
|
||||
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
SpeakString("I_AM_HEALING", TALKVOLUME_SILENT_TALK);
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION);
|
||||
int bValid;
|
||||
|
||||
effect eBad = GetFirstEffect(oTarget);
|
||||
//Search for negative effects
|
||||
while(GetIsEffectValid(eBad))
|
||||
{
|
||||
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
|
||||
{
|
||||
//Remove effect if it is negative.
|
||||
RemoveEffect(oTarget, eBad);
|
||||
}
|
||||
eBad = GetNextEffect(oTarget);
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
|
||||
|
||||
bValid;
|
||||
|
||||
eBad = GetFirstEffect(oTarget);
|
||||
//Search for negative effects
|
||||
while(GetIsEffectValid(eBad))
|
||||
{
|
||||
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
|
||||
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL
|
||||
)
|
||||
{
|
||||
//Remove effect if it is negative.
|
||||
RemoveEffect(oTarget, eBad);
|
||||
}
|
||||
eBad = GetNextEffect(oTarget);
|
||||
}
|
||||
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE));
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
|
||||
}
|
||||
55
_working/nw_s0_rmvblddef.nss
Normal file
55
_working/nw_s0_rmvblddef.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
////::///////////////////////////////////////////////
|
||||
//:: Remove Blindness / Deafness
|
||||
//:: NW_S0_RmvBldDef.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All allies within 10ft of the cast point have
|
||||
blindness and deafness removed.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: June 29, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
//:: Updated By: Preston W, On: June 29, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
int nType;
|
||||
effect eBlindDeaf;
|
||||
//Declare personal impact visual effect.
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation());
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Make a faction check so that only friends are affected.
|
||||
if (GetIsFriend(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_REMOVE_BLINDNESS_AND_DEAFNESS, FALSE));
|
||||
//Get the first effect on the present target.
|
||||
eBlindDeaf = GetFirstEffect(oTarget);
|
||||
while(GetIsEffectValid(eBlindDeaf))
|
||||
{
|
||||
nType = GetEffectType(eBlindDeaf);
|
||||
if (nType == EFFECT_TYPE_DEAF || nType == EFFECT_TYPE_BLINDNESS)
|
||||
{
|
||||
//Remove the effect if it matches the stated values
|
||||
RemoveEffect(oTarget, eBlindDeaf);
|
||||
//Apply the visual
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
//Get the next effect
|
||||
GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation());
|
||||
}
|
||||
}
|
||||
|
||||
38
_working/nw_s0_rmvcurse.nss
Normal file
38
_working/nw_s0_rmvcurse.nss
Normal file
@@ -0,0 +1,38 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Remove Curse
|
||||
//:: NW_S0_RmvCurse.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Goes through the effects on a character and removes
|
||||
all curse effects.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 7, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nType;
|
||||
effect eRemove = GetFirstEffect(oTarget);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_REMOVE_CURSE, FALSE));
|
||||
//Get the first effect on the target
|
||||
while(GetIsEffectValid(eRemove))
|
||||
{
|
||||
//Check if the current effect is of correct type
|
||||
if (GetEffectType(eRemove) == EFFECT_TYPE_CURSE)
|
||||
{
|
||||
//Remove the effect and apply VFX impact
|
||||
RemoveEffect(oTarget, eRemove);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
//Get the next effect on the target
|
||||
GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
44
_working/nw_s0_rmvdiseas.nss
Normal file
44
_working/nw_s0_rmvdiseas.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Remove Disease
|
||||
//:: NW_S0_RmvDiseas.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Removes all disease effects on the character.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 7, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nType;
|
||||
int bValid = FALSE;
|
||||
effect eParal = GetFirstEffect(oTarget);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_REMOVE_DISEASE, FALSE));
|
||||
//Get the first effect on the target
|
||||
while(GetIsEffectValid(eParal))
|
||||
{
|
||||
//Check if the current effect is of correct type
|
||||
if (GetEffectType(eParal) == EFFECT_TYPE_DISEASE)
|
||||
{
|
||||
//Remove the effect
|
||||
RemoveEffect(oTarget, eParal);
|
||||
bValid = TRUE;
|
||||
}
|
||||
//Get the next effect on the target
|
||||
GetNextEffect(oTarget);
|
||||
}
|
||||
if (bValid)
|
||||
{
|
||||
//Apply VFX Impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
125
_working/nw_s0_shadconj.nss
Normal file
125
_working/nw_s0_shadconj.nss
Normal file
@@ -0,0 +1,125 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Shadow Conjuration
|
||||
//:: NW_S0_ShadConj.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
If the opponent is clicked on Shadow Bolt is cast.
|
||||
If the caster clicks on himself he will cast
|
||||
Mage Armor and Mirror Image. If they click on
|
||||
the ground they will summon a Shadow.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
|
||||
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
void ShadowBolt (object oTarget, int nMetaMagic);
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nCast;
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eVis;
|
||||
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (oTarget == OBJECT_SELF)
|
||||
{
|
||||
nCast = 1;
|
||||
eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
|
||||
effect eAC = EffectACIncrease(4, AC_NATURAL_BONUS);
|
||||
effect eMirror = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
effect eLink = EffectLinkEffects(eAC, eMirror);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nDuration*3));
|
||||
}
|
||||
else
|
||||
{
|
||||
nCast = 2;
|
||||
if (!ResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
ShadowBolt(oTarget, nMetaMagic);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
// }
|
||||
eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||
effect eSummon = EffectSummonCreature("sbio_shadow");
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||
nCast = 3;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ShadowBolt (object oTarget, int nMetaMagic)
|
||||
{
|
||||
int nDamage;
|
||||
int nBolts = GetCasterLevel(OBJECT_SELF)/5;
|
||||
int nCnt;
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eDam;
|
||||
for (nCnt = 0; nCnt < nBolts; nCnt++)
|
||||
{
|
||||
int nDam = d6(2);
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = 12;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDamage = nDamage + nDamage/2; //Damage/Healing is +50%
|
||||
}
|
||||
if (ReflexSave(oTarget, GetSpellSaveDC()))
|
||||
{
|
||||
nDamage = nDamage/2;
|
||||
}
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
126
_working/nw_s0_shades.nss
Normal file
126
_working/nw_s0_shades.nss
Normal file
@@ -0,0 +1,126 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Shades
|
||||
//:: NW_S0_Shades.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
If the opponent is clicked on Shadow Bolt is cast.
|
||||
If the caster clicks on himself he will cast
|
||||
Stoneskin and Mirror Image. If they click on
|
||||
the ground they will summon a Shadow Lord.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
|
||||
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
void ShadowBolt (object oTarget, int nMetaMagic);
|
||||
void main()
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nCast;
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
effect eVis;
|
||||
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (oTarget == OBJECT_SELF)
|
||||
{
|
||||
nCast = 1;
|
||||
eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN);
|
||||
effect eStone = EffectDamageReduction(1, DAMAGE_POWER_PLUS_FIVE, nDuration * 10);
|
||||
effect eMirror = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
effect eLink = EffectLinkEffects(eStone, eMirror);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(nDuration));
|
||||
}
|
||||
else
|
||||
{
|
||||
nCast = 2;
|
||||
if (!ResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
ShadowBolt(oTarget, nMetaMagic);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nCast = 3;
|
||||
nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
// }
|
||||
eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||
effect eSummon = EffectSummonCreature("sbio_shadlord");
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ShadowBolt (object oTarget, int nMetaMagic)
|
||||
{
|
||||
int nDamage;
|
||||
int nBolts = GetCasterLevel(OBJECT_SELF)/5;
|
||||
int nCnt;
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
|
||||
for (nCnt = 0; nCnt < nBolts; nCnt++)
|
||||
{
|
||||
int nDam = d6(4);
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = 24;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDamage = nDamage + nDamage/2; //Damage/Healing is +50%
|
||||
}
|
||||
if (ReflexSave(oTarget, GetSpellSaveDC()))
|
||||
{
|
||||
nDamage = nDamage/2;
|
||||
}
|
||||
effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
21
_working/nw_s0_shldlaw.nss
Normal file
21
_working/nw_s0_shldlaw.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Shield of Law
|
||||
//:: NW_S0_ShldLaw.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
|
||||
}
|
||||
|
||||
22
_working/nw_s0_sphchaos.nss
Normal file
22
_working/nw_s0_sphchaos.nss
Normal file
@@ -0,0 +1,22 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Sphere of Chaos
|
||||
//:: NW_S0_SphChaos.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This applies random effects to everyone in the
|
||||
AOE depending on the level of the caster. Enemies
|
||||
get negative effects and allies get positive
|
||||
effects.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 9, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
// *GZ: This spell was cut from NWN and would cause stack underflows if you use it...
|
||||
WriteTimestampedLogEntry("** WARNING: 'Sphere of Chaos' was cast by " + GetName(OBJECT_SELF) + " " + GetTag(OBJECT_SELF) + " This spell does not exist in the game resources!");
|
||||
}
|
||||
|
||||
20
_working/nw_s0_spturn.nss
Normal file
20
_working/nw_s0_spturn.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Spell Turning
|
||||
//:: NW_S0_SpTurn.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: [Your Name]
|
||||
//:: Created On: [date]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_SPELLTURNING);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(2));
|
||||
}
|
||||
|
||||
61
_working/nw_s0_summon1.nss
Normal file
61
_working/nw_s0_summon1.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster I
|
||||
//:: NW_S0_Summon1
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a dire badger to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
effect eSummon = EffectSummonCreature("NW_S_badgerdire");
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||
{
|
||||
eSummon = EffectSummonCreature("NW_S_BOARDIRE");
|
||||
}
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
59
_working/nw_s0_summon2.nss
Normal file
59
_working/nw_s0_summon2.nss
Normal file
@@ -0,0 +1,59 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster II
|
||||
//:: NW_S0_Summon2
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a dire boar to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eSummon = EffectSummonCreature("NW_S_BOARDIRE");
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||
{
|
||||
eSummon = EffectSummonCreature("NW_S_WOLFDIRE");
|
||||
}
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(),RoundsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
61
_working/nw_s0_summon3.nss
Normal file
61
_working/nw_s0_summon3.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster III
|
||||
//:: NW_S0_Summon3
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a dire wolf to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brenon Holmes
|
||||
//:: Created On: Dec 10 , 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 12, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
effect eSummon = EffectSummonCreature("NW_S_WOLFDIRE");
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||
{
|
||||
eSummon = EffectSummonCreature("NW_S_SPIDDIRE");
|
||||
}
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
}
|
||||
59
_working/nw_s0_summon4.nss
Normal file
59
_working/nw_s0_summon4.nss
Normal file
@@ -0,0 +1,59 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster IV
|
||||
//:: NW_S0_Summon4
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a Sword Spider to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eSummon = EffectSummonCreature("NW_S_SPIDDIRE");
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||
{
|
||||
eSummon = EffectSummonCreature("NW_S_DIRETIGER");
|
||||
}
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
58
_working/nw_s0_summon5.nss
Normal file
58
_working/nw_s0_summon5.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster V
|
||||
//:: NW_S0_Summon5
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a dire spider to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eSummon = EffectSummonCreature("NW_S_diretiger");
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||
{
|
||||
eSummon = EffectSummonCreature("NW_S_beardire");
|
||||
}
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
}
|
||||
76
_working/nw_s0_summon6.nss
Normal file
76
_working/nw_s0_summon6.nss
Normal file
@@ -0,0 +1,76 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster VI
|
||||
//:: NW_S0_Summon6
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a dire bear to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eSummon = EffectSummonCreature("NW_S_beardire");
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||
{
|
||||
int nRoll = d4();
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
eSummon = EffectSummonCreature("NW_S_AIRHUGE");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
eSummon = EffectSummonCreature("NW_S_WATERHUGE");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
eSummon = EffectSummonCreature("NW_S_EARTHHUGE");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
eSummon = EffectSummonCreature("NW_S_FIREHUGE");
|
||||
break;
|
||||
}
|
||||
}
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
}
|
||||
97
_working/nw_s0_summon7.nss
Normal file
97
_working/nw_s0_summon7.nss
Normal file
@@ -0,0 +1,97 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster VII
|
||||
//:: NW_S0_Summon7
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a Minogon to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eSummon;
|
||||
int nRoll = d4();
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
eSummon = EffectSummonCreature("NW_S_AIRGREAT");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
eSummon = EffectSummonCreature("NW_S_WATERGREAT");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
eSummon = EffectSummonCreature("NW_S_EARTHGREAT");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
eSummon = EffectSummonCreature("NW_S_FIREGREAT");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
eSummon = EffectSummonCreature("NW_S_AIRHUGE");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
eSummon = EffectSummonCreature("NW_S_WATERHUGE");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
eSummon = EffectSummonCreature("NW_S_EARTHHUGE");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
eSummon = EffectSummonCreature("NW_S_FIREHUGE");
|
||||
break;
|
||||
}
|
||||
}
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(),RoundsToSeconds(nDuration));
|
||||
}
|
||||
99
_working/nw_s0_summon8.nss
Normal file
99
_working/nw_s0_summon8.nss
Normal file
@@ -0,0 +1,99 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster VIII
|
||||
//:: NW_S0_Summon8
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a greater earth elemental to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eSummon;
|
||||
int nRoll = d4();
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
eSummon = EffectSummonCreature("NW_S_AIRELDER");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
eSummon = EffectSummonCreature("NW_S_WATERELDER");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
eSummon = EffectSummonCreature("NW_S_EARTHELDER");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
eSummon = EffectSummonCreature("NW_S_FIREELDER");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
eSummon = EffectSummonCreature("NW_S_AIRGREAT");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
eSummon = EffectSummonCreature("NW_S_WATERGREAT");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
eSummon = EffectSummonCreature("NW_S_EARTHGREAT");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
eSummon = EffectSummonCreature("NW_S_FIREGREAT");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
}
|
||||
73
_working/nw_s0_summon9.nss
Normal file
73
_working/nw_s0_summon9.nss
Normal file
@@ -0,0 +1,73 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Summon Monster IX
|
||||
//:: NW_S0_Summon9
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a elder elemental to fight for the character
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eSummon;
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||
int nRoll = d4();
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
eSummon = EffectSummonCreature("NW_S_AIRELDER");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
eSummon = EffectSummonCreature("NW_S_WATERELDER");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
eSummon = EffectSummonCreature("NW_S_EARTHELDER");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
eSummon = EffectSummonCreature("NW_S_FIREELDER");
|
||||
break;
|
||||
}
|
||||
//Make metamagic check for extend
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
|
||||
if (nDuration<4)
|
||||
{
|
||||
nDuration=4;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
|
||||
}
|
||||
53
_working/nw_s1_bltacid.nss
Normal file
53
_working/nw_s1_bltacid.nss
Normal file
@@ -0,0 +1,53 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Acid
|
||||
//:: NW_S1_BltAcid
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Reflex or Will save is
|
||||
needed to halve damage or avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
effect eBolt;
|
||||
int nDC = 15 + (nHD);
|
||||
int nCount = nHD /2;
|
||||
if (nCount == 0)
|
||||
{
|
||||
nCount = 1;
|
||||
}
|
||||
|
||||
int nDamage = d6(nCount);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_ACID));
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ACID);
|
||||
//Make a ranged touch attack
|
||||
int nTouch = TouchAttackRanged(oTarget);
|
||||
if(nTouch > 0)
|
||||
{
|
||||
if(nTouch == 2)
|
||||
{
|
||||
nDamage *= 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
42
_working/nw_s1_bltcharm.nss
Normal file
42
_working/nw_s1_bltcharm.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Charm
|
||||
//:: NW_S1_BltCharm
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Reflex or Will save is
|
||||
needed to halve damage or avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_CHARM);
|
||||
effect eBolt = EffectCharmed();
|
||||
eBolt = GetScaledEffect(eBolt, oTarget);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
|
||||
int nDC = 15 + (nHD);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
nCount = GetScaledDuration(nCount, oTarget);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_CHARM));
|
||||
//Make a saving throw check
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
43
_working/nw_s1_bltchrdr.nss
Normal file
43
_working/nw_s1_bltchrdr.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Charisma Drain
|
||||
//:: NW_S1_BltChrDr
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Fortitude save is
|
||||
needed to avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 15 + (nHD);
|
||||
int nCount = (nHD /3);
|
||||
if (nCount == 0)
|
||||
{
|
||||
nCount = 1;
|
||||
}
|
||||
int nDamage = d6(nCount);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_ABILITY_DRAIN_CHARISMA));
|
||||
//Make a saving throw check
|
||||
if (!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_CHARISMA, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
53
_working/nw_s1_bltcold.nss
Normal file
53
_working/nw_s1_bltcold.nss
Normal file
@@ -0,0 +1,53 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Cold
|
||||
//:: NW_S1_BltCold
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Reflex or Will save is
|
||||
needed to halve damage or avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
effect eBolt;
|
||||
int nDC = 15 + (nHD);
|
||||
int nCount = nHD /2;
|
||||
if (nCount == 0)
|
||||
{
|
||||
nCount = 1;
|
||||
}
|
||||
|
||||
int nDamage = d6(nCount);
|
||||
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_COLD);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_COLD));
|
||||
//Make a ranged touch attack
|
||||
int nTouch = TouchAttackRanged(oTarget);
|
||||
if ( nTouch > 0 )
|
||||
{
|
||||
if(nTouch == 2)
|
||||
{
|
||||
nDamage *= 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eBolt = EffectDamage(nDamage, DAMAGE_TYPE_COLD);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
43
_working/nw_s1_bltcondr.nss
Normal file
43
_working/nw_s1_bltcondr.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Constitution Drain
|
||||
//:: NW_S1_BltConDr
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Fort save is
|
||||
needed to avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 15 + (nHD);
|
||||
int nCount = (nHD /3);
|
||||
if (nCount == 0)
|
||||
{
|
||||
nCount = 1;
|
||||
}
|
||||
int nDamage = d6(nCount);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_ABILITY_DRAIN_CONSTITUTION));
|
||||
//Make a saving throw check
|
||||
if (!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_CONSTITUTION, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
40
_working/nw_s1_bltconf.nss
Normal file
40
_working/nw_s1_bltconf.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Confuse
|
||||
//:: NW_S1_BltConf
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_CONFUSION_S);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eBolt = EffectConfused();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
int nDC = 15 + (nHD);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_CONFUSE));
|
||||
//Make a saving throw check
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_CHAOS) && TouchAttackRanged(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
}
|
||||
}
|
||||
40
_working/nw_s1_bltdaze.nss
Normal file
40
_working/nw_s1_bltdaze.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Daze
|
||||
//:: NW_S1_BltDaze
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eBolt = EffectDazed();
|
||||
eBolt = GetScaledEffect(eBolt, oTarget);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
|
||||
int nDC = 15 + (nHD);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
nCount = GetScaledDuration(nCount, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_DAZE));
|
||||
//Make a saving throw check
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_CHAOS) && TouchAttackRanged(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
}
|
||||
}
|
||||
35
_working/nw_s1_bltdeath.nss
Normal file
35
_working/nw_s1_bltdeath.nss
Normal file
@@ -0,0 +1,35 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Death
|
||||
//:: NW_S1_BltDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eBolt = EffectDeath();
|
||||
int nDC = 15 + (nHD);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_DEATH));
|
||||
//Make a saving throw check
|
||||
if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_DEATH) && TouchAttackRanged(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
//ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user