Changed folder name.
Changed folder name.
This commit is contained in:
84
_module/nss/queenpercieve.nss
Normal file
84
_module/nss/queenpercieve.nss
Normal file
@@ -0,0 +1,84 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: 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()
|
||||
{
|
||||
object self = OBJECT_SELF;
|
||||
if(GetLocalInt(OBJECT_SELF, "taunt") <=2 ){
|
||||
int stop = GetLocalInt(OBJECT_SELF, "taunt")+1 ;
|
||||
SetLocalInt(OBJECT_SELF, "taunt", stop);
|
||||
SpeakString("I HAVE BEEN EXPECTING YOU, PATHETIC MORTALS!!! I WILL TORTURE YOUR SOUL FOR ETERNITY!!!");
|
||||
AssignCommand(self, ActionCastSpellAtObject(SPELL_GREATER_STONESKIN, self, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
|
||||
DelayCommand(0.1, AssignCommand(self, ActionCastSpellAtObject(SPELL_GREATER_STONESKIN, self, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)));
|
||||
DelayCommand(0.2, AssignCommand(self, ActionCastSpellAtObject(SPELL_ENERGY_BUFFER, self, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)));
|
||||
DelayCommand(0.3, AssignCommand(self, ActionCastSpellAtObject(SPELL_GREATER_SPELL_MANTLE, self, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)));
|
||||
DelayCommand(0.4, AssignCommand(self, ActionCastSpellAtObject(SPELL_MAGIC_CIRCLE_AGAINST_GOOD, self, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)));
|
||||
DelayCommand(0.5, AssignCommand(self, ActionCastSpellAtObject(SPELL_PROTECTION_FROM_SPELLS, self, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)));
|
||||
DelayCommand(0.6, AssignCommand(self, ActionCastSpellAtObject(SPELL_REGENERATE, self, METAMAGIC_MAXIMIZE, TRUE, 40, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)));
|
||||
object target = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC);
|
||||
DetermineCombatRound(target);
|
||||
} //This is the equivalent of a force conversation bubble, should only be used if you want an NPC
|
||||
//to say something while he is already engaged in combat.
|
||||
if(GetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION) && GetIsPC(GetLastPerceived()) && GetLastPerceptionSeen())
|
||||
{
|
||||
SpeakOneLinerConversation();
|
||||
}
|
||||
//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(!GetIsObjectValid(GetAttemptedAttackTarget()) && !GetIsObjectValid(GetAttemptedSpellTarget()))
|
||||
{
|
||||
//Check if the last percieved creature was actually seen
|
||||
if(GetLastPerceptionSeen())
|
||||
{
|
||||
if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL))
|
||||
{
|
||||
DetermineSpecialBehavior();
|
||||
}
|
||||
else if(GetIsEnemy(GetLastPerceived()))
|
||||
{
|
||||
if(!GetHasEffect(EFFECT_TYPE_SLEEP))
|
||||
{
|
||||
SetFacingPoint(GetPosition(GetLastPerceived()));
|
||||
SpeakString("NW_I_WAS_ATTACKED", TALKVOLUME_SILENT_TALK);
|
||||
DetermineCombatRound();
|
||||
}
|
||||
}
|
||||
//Linked up to the special conversation check to initiate a special one-off conversation
|
||||
//to get the PCs attention
|
||||
else if(GetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION) && GetIsPC(GetLastPerceived()))
|
||||
{
|
||||
ActionStartConversation(OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(GetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT) && GetLastPerceptionSeen())
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1002));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user