Level One rework
Revamped Level One: North & Level One: Central to be as close to PnP as possible. Added Level One: Latrene 3 area. Added efreeti appearance from CEP3. Revamped efreeti bottle to be like PnP (no wishes, yet)
This commit is contained in:
36
_module/nss/ondam_commode.nss
Normal file
36
_module/nss/ondam_commode.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
void main()
|
||||
{
|
||||
// Declare major variables
|
||||
object oPlaceable = OBJECT_SELF;
|
||||
|
||||
// Check if the Dung Monster has already been spawned in the module
|
||||
int DungMonsterSpawned = GetLocalInt(GetModule(), "DungMonsterSpawned");
|
||||
|
||||
// If it's not already spawned, spawn the Dung Monster
|
||||
if (DungMonsterSpawned == 0)
|
||||
{
|
||||
// Spawn the Dung Monster
|
||||
object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "ra_dungmonster01", GetLocation(oPlaceable));
|
||||
|
||||
// Get the nearest player to the placeable
|
||||
object oNearestPlayer = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oPlaceable);
|
||||
|
||||
// If we found a player, make the creature attack them
|
||||
if (GetIsObjectValid(oCreature) && GetIsObjectValid(oNearestPlayer))
|
||||
{
|
||||
AssignCommand(oCreature, ActionAttack(oNearestPlayer));
|
||||
}
|
||||
|
||||
// Set the Dung Monster as spawned in the module
|
||||
SetLocalInt(GetModule(), "DungMonsterSpawned", 1);
|
||||
}
|
||||
|
||||
// Clear the plot flag on the commode
|
||||
SetPlotFlag(oPlaceable, FALSE);
|
||||
|
||||
// Destroy the commode
|
||||
DestroyObject(oPlaceable, 0.0f);
|
||||
|
||||
// Spawn the latrine hole
|
||||
object oHole = CreateObject(OBJECT_TYPE_PLACEABLE, "ra_plc_dm_hole", GetLocation(oPlaceable));
|
||||
}
|
Reference in New Issue
Block a user