Files
HeroesStone_PRC8/_module/nss/plcb_snpchk.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

23 lines
795 B
Plaintext

//******************************************************************************
// This is the script that is put on the onUsed slot of a placeable. This script
// causes the closest SnoopChecker to attack the PC that used it.
// Created By: Jeremiah Teague
//******************************************************************************
#include "nw_i0_generic"
void main()
{
string sNPCTag = "SnoopChecker";
object oPC = GetLastUsedBy();
object oAttacker = GetNearestObjectByTag(sNPCTag);
if(GetIsPC(oPC))
{
if(GetObjectSeen(oPC, oAttacker) == TRUE || GetObjectHeard(oPC, oAttacker) == TRUE)
{
AdjustReputation(oPC, oAttacker, -100);
AssignCommand(oAttacker, DetermineCombatRound(oPC));
AssignCommand(oAttacker, ActionAttack(oPC));
}
}
}