Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
21
_module/nss/xevent_dmspawn_b.nss
Normal file
21
_module/nss/xevent_dmspawn_b.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user