Encounter work
Separated static spawns in "Forest of Hope: Central". Fixed faction issues with Corrak's Crew. Added "Faction Zoo" area for future faction work. Tweaked factions. Made sure creatures with CODI AI were granting XP. Tweaked Masterwork weapons. Fixed Warforged appearance not showing up properly in toolset.
This commit is contained in:
45
_module/nss/corrak_onpercep.nss
Normal file
45
_module/nss/corrak_onpercep.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: corrak_onpercep
|
||||
//:: Copyright (c) 2022 Project RATDOG
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
Makes the NPC speak to the PC upon seeing them
|
||||
the first time.
|
||||
*/
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 20221203
|
||||
//::///////////////////////////////////////////////
|
||||
|
||||
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;
|
||||
|
||||
//:: Execute the PRC NPC OnPerception script
|
||||
ExecuteScript("prc_npc_percep", OBJECT_SELF);
|
||||
|
||||
//:: Mark that NPC has seen the PC before
|
||||
SetLocalInt(oPC,"SeenBy"+sTag,GetLocalInt(oPC,"SeenBy"+sTag) + 1);
|
||||
//SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
//:: Execute the CODI AI NPC OnPerception script
|
||||
ExecuteScript("no_ai_per", OBJECT_SELF);
|
||||
|
||||
//:: Start conversation
|
||||
ActionStartConversation(oPC, "");
|
||||
}
|
Reference in New Issue
Block a user