Changed folder name.
Changed folder name.
This commit is contained in:
27
_module/nss/clearmerchant.nss
Normal file
27
_module/nss/clearmerchant.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
// This script goes into OnOpenStore.
|
||||
// Made by Darvin Kezar.
|
||||
void main()
|
||||
{
|
||||
|
||||
object oItem = GetFirstItemInInventory();
|
||||
int nCount = GetLocalInt(OBJECT_SELF, "Count")+1;
|
||||
SetLocalInt(OBJECT_SELF, "Count", nCount);
|
||||
if (nCount == 1)
|
||||
{
|
||||
while(oItem != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oItem, "Default", 1);
|
||||
oItem = GetNextItemInInventory();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while(oItem != OBJECT_INVALID)
|
||||
{
|
||||
if(GetLocalInt(oItem, "Default") == 0)
|
||||
DestroyObject(oItem);
|
||||
oItem = GetNextItemInInventory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user