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:
52
_module/nss/jw_assoc_perc.nss
Normal file
52
_module/nss/jw_assoc_perc.nss
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Associate: On Percieve
|
||||
//:: NW_CH_AC2
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 19, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void main()
|
||||
{
|
||||
//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))
|
||||
{
|
||||
ActionStartConversation(OBJECT_SELF);
|
||||
}
|
||||
if(!GetAssociateState(NW_ASC_MODE_STAND_GROUND))
|
||||
{
|
||||
//Do not bother checking the last target seen if already fighting
|
||||
// PAUS: No, actually please do check
|
||||
//if(!GetIsObjectValid(GetAttemptedAttackTarget()) &&
|
||||
// !GetIsObjectValid(GetAttackTarget()) &&
|
||||
// !GetIsObjectValid(GetAttemptedSpellTarget()))
|
||||
//{
|
||||
//Check if the last percieved creature was actually seen
|
||||
if(GetLastPerceptionSeen())
|
||||
{
|
||||
if(GetIsEnemy(GetLastPerceived()))
|
||||
{
|
||||
SetFacingPoint(GetPosition(GetLastPerceived()));
|
||||
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))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1002));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user