Fixed corrupted module
Fixed corrupted module. Added doors. Checked dungeon / teleporter continuity. Replaced Message #02 with a magical sending from Werdna. Removed trash / test areas.
This commit is contained in:
46
Module/nss/tlk2pc_onpercept.nss
Normal file
46
Module/nss/tlk2pc_onpercept.nss
Normal file
@@ -0,0 +1,46 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: tlk2pc_onpercpt.nss
|
||||
//:: Copyright (c) 2023 Wizardry:EE
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
Makes the NPC speak to the PC upon seeing them
|
||||
the first time.
|
||||
*/
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20220618
|
||||
//::///////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetLastPerceived();
|
||||
object oNPC = OBJECT_SELF;
|
||||
string sUUID = GetObjectUUID(oPC);
|
||||
string sTag = GetTag(oNPC);
|
||||
|
||||
//:: Only looks out for players
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
/*
|
||||
//:: Must be seen & not just heard
|
||||
if (!GetLastPerceptionSeen()) return;
|
||||
|
||||
//:: If NPC has seen PC before stop
|
||||
int DoOnce = GetLocalInt(oPC,"SeenBy"+sTag);
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
//:: Mark that NPC has seen the PC before
|
||||
SetLocalInt(oPC,"SeenBy"+sTag,GetLocalInt(oPC,"SeenBy"+sTag) + 1);
|
||||
//SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
*/
|
||||
|
||||
//:: Start conversation
|
||||
ActionStartConversation(oPC, "");
|
||||
|
||||
//:: Run default onPerception AI
|
||||
ExecuteScript("nw_c2_default2", OBJECT_SELF);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user