I am wanting to make a script to search corpses after I kill them and then loot the items that have a chance to be on them after searching.
What I'd like to do is to count the number of corpses in the room, then search that many.
a typical room would have several types, like this:
The corpse of a mage is lying here.
(2) The corpse of an apprentice is lying here.
(3) The corpse of the janitor is lying here.
so i'd need to count the corpses, which would be 6, then have it search the 6 corpses, i.e. search corpse, search 2.corpse etc.
the items that can be found by searching are:
conditionals:
You find a blue orb hidden in the corpse
You find an ancient relic of unknown origin hidden in the corpse
You find a gem of true seeing hidden in the corpse
You find a Mana Stone hidden in the corpse
then i'd need to get the items, like get all.relic all.corpse if it was found.
any help would be appreciated, i've looked through the lua scripting docs, i suppose i could use a trigger when i look at the room, not sure how to count up the corpses thou. |