22 lines
501 B
Plaintext
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);
|
|
}
|
|
}
|