Initial module commit
Initial module commit.
This commit is contained in:
16
_module/nss/drownitem.nss
Normal file
16
_module/nss/drownitem.nss
Normal 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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user