• 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!

Warzone error function on console

wafuboe

Member
Joined
Dec 24, 2010
Messages
881
Solutions
2
Reaction score
22
2gyc1t4.png

Got this error on my console tfs 1.2
I was trying to install all the scripts of warzone quest on my server

here is the script

Code:
local bosses = {
    ['deathstrike'] = {status = 2, storage = Storage.BigfootBurden.Warzone1Reward},
    ['gnomevil'] = {status = 3, storage = Storage.BigfootBurden.Warzone2Reward},
    ['abyssador'] = {status = 4, storage = Storage.BigfootBurden.Warzone3Reward},
}

function onKill(creature, target)
    local targetMonster = target:getMonster()
    if not targetMonster then
        return true
    end

    local bossConfig = bosses[targetMonster:getName():lower()]
    if not bossConfig then
        return true
    end

    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

            attackerPlayer:setStorageValue(bossConfig.storage, 1)
        end
    end
end
 
Back
Top