REO-EE/_module/nss/ss_treas_loot1.nss
Jaysyn904 f82740bbbd Initial commit
Initial commit
2024-02-22 13:22:03 -05:00

33 lines
1.3 KiB
Plaintext

//************************************************
//** ss_treas_loot1 **
//** **
//** This function stores all the creatures **
//** inventory as local objects so that they can**
//** be recalled ondeath to be scattered **
//************************************************
//**Created By: Jason Hunter (SiliconScout) **
//** **
//**Version: 1.6c **
//** **
//**Last Changed Date: July 7, 2004 **
//************************************************
void main()
{
object oItem = GetFirstItemInInventory(OBJECT_SELF);
int icount=0;
while (oItem != OBJECT_INVALID)
{
if (GetDroppableFlag(oItem) == TRUE)
{
icount ++;
SetLocalObject(OBJECT_SELF,"ss_inv_"+IntToString(icount),oItem);
if (GetItemStackSize(oItem) > 1) SetLocalInt(OBJECT_SELF,"ss_inv_"+IntToString(icount),GetItemStackSize(oItem));
SetLocalInt(OBJECT_SELF,"ss_inv_count",icount);
}
oItem = GetNextItemInInventory(OBJECT_SELF);
}
int iGold = GetGold(OBJECT_SELF);
if (iGold > 0) SetLocalInt(OBJECT_SELF,"ss_inv_gold",iGold);
}