Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2024-11-25 19:36:07 -05:00
parent 256ffe12f7
commit 04165202c0
10228 changed files with 10443677 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
////////////////////////////////////////////////////////////////////////////////
// rh_pl_bagclose - Close the bag and transfer it's contents
// By Deva B. Winblood. November 12th, 2008
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////
// FUNCTIONS
////////////////////////////////////
void fnTransferGoods(object oSource,object oDestination,int bDestroy=FALSE)
{ // PURPOSE: Transfer goods
object oItem;
object oCopy;
oItem=GetFirstItemInInventory(oSource);
while(GetIsObjectValid(oItem))
{ // transfer
oCopy=CopyItem(oItem,oDestination,TRUE);
DelayCommand(0.5,DestroyObject(oItem));
oItem=GetNextItemInInventory(oSource);
} // transfer
if (bDestroy) DelayCommand(1.0,DestroyObject(oSource));
} // fnTransferGoods()
//////////////////////////////////////////////////////////////////////[ MAIN ]//
void main()
{
object oMe=OBJECT_SELF;
object oOwner=GetLocalObject(oMe,"oOwner");
object oStorage=GetLocalObject(oMe,"oStorage");
if (!GetIsObjectValid(oStorage)) SendMessageToPC(oOwner,"ERROR rh_pl_bagclose - The Storage object is missing.");
SendMessageToPC(oOwner,"Closing Other World Bag of Holding...");
DeleteLocalInt(oOwner,"bBagOpening");
fnTransferGoods(oMe,oStorage,TRUE);
}