Amon_PRC8/_module/nss/confirmgone.nss
Jaysyn904 c5cffc37af Initial Commit
Initial Commit [v1.01]
2025-04-03 19:00:46 -04:00

29 lines
730 B
Plaintext

int ConfirmGone(
string sItem, // the item's tag
object oDoor)
{
int ObjectCount = 0;
object oArea= GetArea(OBJECT_SELF);
object oItem = GetFirstObjectInArea(oArea);
while( GetIsObjectValid(oItem) == TRUE )
{
if( GetTag(oItem) == sItem )
{
ObjectCount = ObjectCount + GetNumStackedItems(oItem);
DestroyObject(oItem);
}
oItem = GetNextObjectInArea(oArea);
}
if( ObjectCount = 0 )
{
object oD2open = GetObjectByTag("oDoor");
ActionOpenDoor(oD2open);
SetLocked(oD2open,FALSE);
ActionDoCommand(PlaySound("as_hr_xwdrnoise5"));
}
return ObjectCount;
}