generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
66
_module/nss/vb_pavelsitconv.nss
Normal file
66
_module/nss/vb_pavelsitconv.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: SetListeningPatterns
|
||||
//:: NW_C2_DEFAULT4
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Determines the course of action to be taken
|
||||
by the generic script after dialogue or a
|
||||
shout is initiated.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 24, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//only use this modified version on a seated NPC that you wish to remain seated
|
||||
//while conversing with Players
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
int nMatch = GetListenPatternNumber();
|
||||
object oShouter = GetLastSpeaker();
|
||||
object oIntruder;
|
||||
if (nMatch == -1 && GetCommandable(OBJECT_SELF))
|
||||
{
|
||||
ClearAllActions();
|
||||
//This is the Added Text to Keep Your NPC Seated
|
||||
string sSeat = GetTag(OBJECT_SELF);//get tag of NPC
|
||||
object oSeat = GetObjectByTag ("vb_pavelseat");//tag of seat
|
||||
AssignCommand (OBJECT_SELF, ActionSit (oSeat));
|
||||
//
|
||||
BeginConversation();
|
||||
//NPC STAY SEATED WHILE I'M TALKING TO YOU
|
||||
ClearAllActions();
|
||||
//
|
||||
}
|
||||
else
|
||||
if(nMatch != -1 && GetIsObjectValid(oShouter) && !GetIsPC(oShouter) && GetIsFriend(oShouter))
|
||||
{
|
||||
if(nMatch == 4)
|
||||
{
|
||||
oIntruder = GetLocalObject(oShouter, "NW_BLOCKER_INTRUDER");
|
||||
}
|
||||
else if (nMatch == 5)
|
||||
{
|
||||
oIntruder = GetLastHostileActor(oShouter);
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = GetAttemptedAttackTarget();
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = GetAttemptedSpellTarget();
|
||||
if(!GetIsObjectValid(oIntruder))
|
||||
{
|
||||
oIntruder = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RespondToShout(oShouter, nMatch, oIntruder);
|
||||
}
|
||||
|
||||
if(GetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT))
|
||||
{
|
||||
SignalEvent(OBJECT_SELF, EventUserDefined(1004));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user