Il Knight
Veteran OT User
what i need? create a table players
{} insert in the table all the players who have storage value 10000 + 10001 (damage map saved on storages)
then the first player on the table (with more storage values win xxx item)
the second player of the table win xxx item, the third win xxx item.
players from 4 to 10, win xxx item.
players from 11 + win xxx item.
tfs 1.3 / 10.98
thanks in advance
{} insert in the table all the players who have storage value 10000 + 10001 (damage map saved on storages)
then the first player on the table (with more storage values win xxx item)
the second player of the table win xxx item, the third win xxx item.
players from 4 to 10, win xxx item.
players from 11 + win xxx item.
tfs 1.3 / 10.98
Code:
local Bosses = {
{name = "ferumbras"}
}
function onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
for i = 1, #Bosses do
if Bosses[i].name == creature:getName():lower() then
creature:setDropLoot(false)
for id in pairs(creature:getDamageMap()) do
local player = Player(id)
local chanceatk = player:getStorageValue(10000)
local chancedef = player:getStorageValue(10001)
do stuff here =
player:setStorageValue(10000, -1)
player:setStorageValue(10001, -1)
end
end
end
return true
end
thanks in advance