Initial Commit

Initial Commit [v1.01]
This commit is contained in:
Jaysyn904
2025-04-03 19:00:46 -04:00
parent 9c53be196a
commit c5cffc37af
15285 changed files with 13371551 additions and 2 deletions

24
_module/nss/pcinclude.nss Normal file
View File

@@ -0,0 +1,24 @@
// destroys iNumToDestroy items with the specified tag from the specified object's inventory
int DestroyItemsInInventory(object oPC, string sItemTag, int iNumToDestroy);
int DestroyItemsInInventory(object oPC, string sItemTag, int iNumToDestroy)
{
object oFirstItem = GetFirstItemInInventory(oPC);
object oItem = oFirstItem;
int iItemCount = 0;
while(oItem != OBJECT_INVALID && iItemCount <= iNumToDestroy)
{
//SpeakString(GetTag(oItem), TALKVOLUME_SHOUT);
if(GetTag(oItem) == sItemTag)
{
iItemCount++;
DestroyObject(oItem);
}
oItem = GetNextItemInInventory(oPC);
if(oItem == oFirstItem)
{
oItem = OBJECT_INVALID;
}
}
return iItemCount;
}