I would like to suggest a new smart and OSI-like NPC_AI_LOOTING engine:
-the new engine is based on TIMER (min 1 / max 3 minutes), not @Step on corpse
-only loot 1 corpse for each "@Timer"
-loot corpses from 2 tiles away (FORITEMS 2)
-chance to loot: always 50%
-message (overhead on NPC): *rummages through a corpse and takes an item* (color 03b2 / cliloc 1008086)
-only allow looting for NPCs with MT_USEHANDS
PS: all values/timers/message default from OSI
it's something like this:
Code:
ON=@LootCorpse
FORITEMS 2
IF (<TYPE>==t_corpse)
IF (50 > <R100>) //50% chance
//loot item
SRC.SAY @03b2,,1 *rummages through a corpse and takes an item*
ENDIF
ENDIF
//next @LootCorpse call: NOW+{1 3} minutes
ENDFOR
it would be nice some .ini settings to customize it too
NPCLootingTimer={1 3} //in minutes
NPCLootingDistance=2 //in tiles
NPCLootingChance=50 //50% chance