PWE_PRC8/_module/nss/cleanup_heartbt.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

22 lines
805 B
Plaintext

// Heartbeat script for a Trash Fairy that collects and
// destroys any items left on the floor. Attach to the
// heartbeat of the creature you wish to collect items
// from the ground. I use a fairy set to commoner faction,
// DM speed, with the plot switch so as people can't kill
// her when they realize she's taken what they just dropped.
// Adjust perception as needed.
//
// This works quite well in Contest of Champion mods where
// people are always dropping items on the floor of the entry.
// Created 7.27.2002 by Undead Waiter
void main()
{
object oItemToDestroy = GetNearestObject(OBJECT_TYPE_ITEM);
if (oItemToDestroy != OBJECT_INVALID)
{
ActionMoveToObject(oItemToDestroy);
ActionPickUpItem(oItemToDestroy);
ActionDoCommand(DestroyObject(oItemToDestroy));
}
}