Aschbourne_PRC8/_module/nss/vamp_encounter.nss
GetOffMyYarn 69879d6957 Areas and Fixes
Added CCOH and missing areas
Changed some areas to be craftable,
Fixed some on death issues,
Fixed the Gaurd
2024-08-30 11:38:44 -04:00

29 lines
1.1 KiB
Plaintext

// Add this to encounter OnEnter event.
/*
This script, if placed into the OnEnter of an Encounter Trigger will set the
encounter to active if certain conditions are met. In this instance, it checks
the subrace of the creature entering and only if it's a PC. This script uses
the ability to preset variables in the toolset with HoTU by getting the subrace
to test for from a preset string variable with the name SubRaceCheck.
After a six second delay, it will reset the encounter back to inactive, so that
it will not trigger again for just anyone entering the trigger.
*/
void main()
{
object oPC = GetEnteringObject();
if (GetIsPC(oPC))
{
if (GetSubRace(oPC) == "Vampire")
{
PrintString("vamp_encounter: " +GetName(oPC)+ " is a vampire who would have triggered an encounter of undead.");
SetEncounterActive(FALSE, OBJECT_SELF);
}
else
{
PrintString("vamp_encounter: " +GetName(oPC)+ " is a PC who triggered an encounter of undead.");
SetEncounterActive(TRUE, OBJECT_SELF);
DelayCommand(6.0f, SetEncounterActive(FALSE, OBJECT_SELF));
}
}
}