Bugfixing pass

Bugfixing pass.  Spawn swapovers.  Broom!
This commit is contained in:
Jaysyn904
2021-09-25 14:13:00 -04:00
parent a6cab9f387
commit 6195a6cf23
94 changed files with 23051 additions and 3712 deletions

View File

@@ -0,0 +1,37 @@
/* Generic area onExit script for use with the Sparky Spawner scripting
Created By: The Amethyst Dragon (www.amethyst-dragon.com/nwn)
Can be used for the onExit script for all areas of a module. If you already
have your own area enter script, you can add just the include and the
"Sparky Spawner" Sections of code (one function, one bit of code to execute).
This searches the area for remaining PCs, and if it doesn't find any, it
despawns all the things in the area created by the Sparky spawner.
*/
#include "sparky_inc"
//////////////////////////////////////////////// Sparky Spawner Section 1 of 2
int CheckForPCs()
{
object oPC = GetFirstPC();
while (oPC != OBJECT_INVALID)
{
if (GetArea(oPC) == OBJECT_SELF) { return TRUE; }
oPC = GetNextPC();
}
return FALSE;
}
//////////////////////////////////////////////// End Sparky Section 1 of 2
void main()
{
object oArea = OBJECT_SELF;
//////////////////////////////////////////////// Sparky Spawner Section 2 of 2
if (CheckForPCs() == FALSE) { Despawn(oArea); }
//////////////////////////////////////////////// End Sparky Section 2 of 2
}