Files
Anphillia_PRC8/_module/nss/xevent_dmspawn_b.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

22 lines
501 B
Plaintext

#include "nwnx_events"
#include "nwnx_object"
#include "pat_inc"
void main()
{
object oDM = OBJECT_SELF;
if (!GetIsPC(oDM) ||
!GetIsDM(oDM))
return;
int nSetting = pat_GetDMSetting(oDM);
if (nSetting == 0) // Default
return;
if (NWNX_Events_GetEventData("OBJECT_TYPE") == "5") // creature spawn
{
object oArea = NWNX_Object_StringToObject( NWNX_Events_GetEventData("AREA") );
SetLocalInt(oArea, PAT_VAR_DM_SETTING, nSetting);
}
}