Initial module commit

Initial module commit.
This commit is contained in:
Jaysyn904
2021-08-29 23:34:48 -04:00
parent a7b44c3e1c
commit 0f13e6c538
4092 changed files with 8658543 additions and 0 deletions

16
_module/nss/drownitem.nss Normal file
View File

@@ -0,0 +1,16 @@
void main()
{
object oCurrentObject = GetFirstObjectInArea();
// This iterates through every object in the area once per heartbeat
while(oCurrentObject != OBJECT_INVALID)
{
// Run suffocation function if the current object is a PC and is not wearing an Amulet of Water Breathing
if((GetIsPC(oCurrentObject)) && (GetTag(GetItemInSlot(INVENTORY_SLOT_NECK, oCurrentObject)) != "AmuletofWaterBreathing" || GetItemInSlot(INVENTORY_SLOT_NECK, oCurrentObject) == OBJECT_INVALID))
{
SetLocalInt(oCurrentObject, "nTimer", GetLocalInt(oCurrentObject, "nTimer") + 1);
Suffocation(oCurrentObject, GetAbilityScore(oCurrentObject, ABILITY_CONSTITUTION), GetAbilityModifier(ABILITY_CONSTITUTION, oCurrentObject));
}
oCurrentObject = GetNextObjectInArea();
}
}