• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua getDamageMap()

Maldero

/root/
Joined
Oct 2, 2010
Messages
62
Reaction score
1
Location
Szczecin, Poland
Hello Otlanders!
I have one question.
How I can take summary of damage done per player on monster?

for id, damage in pairs(creature:getDamageMap()) do
local player = Player(id)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, damage.total)
end
This only return last hit.

Thanks for help :)
 
Test if this work for you

Code:
    for pid, _ in pairs(targetMonster:getDamageMap()) do
        local attackerPlayer = Player(pid)
        if attackerPlayer then
            if attackerPlayer:getStorageValue(Storage.BigfootBurden.WarzoneStatus) < bossConfig.status then
                attackerPlayer:setStorageValue(Storage.BigfootBurden.WarzoneStatus, bossConfig.status)
            end
 
Back
Top