wafuboe
Member
- Joined
- Dec 24, 2010
- Messages
- 881
- Solutions
- 2
- Reaction score
- 22
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