29 lines
730 B
Plaintext
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;
|
|
}
|