Lua:
local test = CreatureEvent("test")
function test.onKill(player, target)
local monster = config[target:getName():lower()]
if target:isPlayer() or not monster or target:getMaster() then
return true
end
local stor = player:getStorageValue(monster.storage)+1
if stor < monster.amount and player:getStorageValue(monster.startstorage) >= monster.startvalue then
player:setStorageValue(monster.storage, stor)
end
if (stor +1) == monster.amount then
player:setStorageValue(monster.storage, stor +1)
end
return true
end
test:register()
I have a problem with two players, the mobi is only counting for 1 player