LUA:
onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
if not creature:isMonster() or creature:getMaster() then
return true
end
if not corpse or type(corpse) ~= 'userdata' or not corpse:isContainer() or creature:getType():isRewardBoss() then
return true
end
local owner = mostDamage
if not mostDamage and killer and killer:isPlayer() then
owner = killer
end
if owner and owner:getMaster() and owner:getMaster():isPlayer() then
owner = owner:getMaster()
end
if not owner or not owner:isPlayer() then
return
end
return true
end
'm trying to create a check for this auto loot for when a team is in pt it only works for the pt leader currently it's only working for whoever gave the biggest attack