Boss Battle Outcome

API -

function yourEvent(users, boss_name, difficulty, result)
    if result == 'cancelled' or users == nil or boss_name == nil or difficulty == 'none' then
        return;
    end

    if result == 'players' then
        local str = 'players won... ';
        for i,user in pairs(users) do
            str = str .. ' ' .. user.displayName;
        end
        log(str);
    end

    if result == 'boss' then
        log('boss: ' .. boss_name .. ' won.');
    end

    log('boss difficulty was: ' .. difficulty); --difficulty can be: easy, normal, hard, none
end

return function()
    addEvent('bossBattleOutcome', 'yourEvent');
    keepAlive();
end

Events are asynchronous coroutines.

Last updated