generated from Jaysyn/ModuleTemplate
Initial upload
Initial upload.
This commit is contained in:
24
_module/nss/vat_pchestclear.nss
Normal file
24
_module/nss/vat_pchestclear.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
//pchest clear - delete everything
|
||||
|
||||
void main()
|
||||
{
|
||||
int iMyType = GetObjectType(OBJECT_SELF);
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
object oChest = GetObjectByTag("CS_PCHEST");
|
||||
string sDB = GetTag(GetModule())+"_PCHEST";
|
||||
|
||||
DestroyCampaignDatabase(sDB);
|
||||
|
||||
object oItem = GetFirstItemInInventory(oChest);
|
||||
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
oItem = GetNextItemInInventory(oChest);
|
||||
}
|
||||
|
||||
effect eEffect = EffectVisualEffect(VFX_IMP_DESTRUCTION);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oChest, 1.0);
|
||||
FloatingTextStringOnCreature("The contents of the Storage Chest have been cleared.", oPC);
|
||||
}
|
Reference in New Issue
Block a user