Rune_PRC8/_module/nss/town_despwnenter.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

30 lines
1.5 KiB
Plaintext

void main()
{
object oObject = GetEnteringObject();
if (GetIsEncounterCreature(oObject))
{
object oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oObject);
}
DestroyObject(GetItemInSlot(INVENTORY_SLOT_ARMS, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_ARROWS, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_BELT, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_BOLTS, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_BOOTS, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_BULLETS, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_HEAD, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_CHEST, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_CLOAK, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_LEFTRING, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_NECK, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oObject));
DestroyObject(GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oObject));
AssignCommand(oObject, SetIsDestroyable(TRUE, FALSE, FALSE));
DelayCommand(0.3, DestroyObject(oObject));
}
}