WoR_PRC8/_module/nss/area_enter_perd.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

34 lines
641 B
Plaintext

//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
object oTarget = GetObjectByTag("Perdition_Chest");
object oItem = GetFirstItemInInventory(oPC);
if(GetIsDM(oPC))
{
return;
}
else if (!GetIsPC(oPC)) return;
while (GetIsObjectValid(oItem))
{
AssignCommand(oTarget, ActionTakeItem(oItem, oPC));
oItem = GetNextItemInInventory(oPC);
}
int nInt;
for (nInt=0; nInt<NUM_INVENTORY_SLOTS; nInt++)
{
oItem = GetItemInSlot(nInt, oPC);
if (GetIsObjectValid(oItem))
AssignCommand(oTarget, ActionTakeItem(oItem, oPC));
}
AssignCommand(oTarget, TakeGoldFromCreature(GetGold(oPC), oPC));
}