You can add the sub below and it should work to do what you are wanting. If you name the file default.pl, and put it in the specific zone folder you want this effect to work in, or in templates folder for all zones, it will work on any NPC that doesn't already have a script associated with it.
default.pl
Code:
sub EVENT_COMBAT {
# Activated when first engaged into combat
if ($combat_state)
{
# Check if they have buff with spell id 11 - Courage - example
if ($client && $client->FindBuff(11))
{
# Check if they have already doubled their loot table once
if(!$npc->EntityVariableExists(1))
{
# Double the loot table
$npc->AddLootTable();
# Set an entity var so they don't double it again
$npc->SetEntityVariable(1, 1);
}
}
}
}
Note, I haven't actually tested this, but it should work or be really close to functional.