This is a simple loot script that I run after each fight. It checks to see if your target (which should be a corpse) has loot, then either ignores it or loots it for you.
Code:
function main()
{
if (!${Me.Target(exists)})
{
return
}
if (!${Me.Target.ContainsLoot})
{
return
}
Me.Target:Loot
do
{
wait 1
}
while !${Me.IsLooting}
if (${Loot.NumItems} > 0)
{
wait 1
Loot:LootAll
return
}
Loot:EndLooting
return
}