nefinoo
Carnage.flv
Lua:
local CusMons = CreatureEvent("CusMons")
function CusMons.onKill(player, target)
local config = { -- Use missionStorage to link the monsters to each mission. It is set up this way so multiple missions can have the same monsters.
[1] = {name = "Rat",, missionStorage = 43000, storage = 41000},
[2] = {name = "Cave Rat",, missionStorage = 43000, storage = 41001},
[3] = {name = "Troll", missionStorage = 43001, storage = 41002}
}
if target:isPlayer() or target:getMaster() then
return true
end
for i = 1, #config do
if target:getName() == config[i].name then
local storage = player:getStorageValue(config[i].missionStorage)
if storage >= 0 and storage < 200 then
player:setStorageValue(config[i].missionStorage, player:getStorageValue(config[i].missionStorage) + 1)
end
end
end
return true
end
CusMons:register()
hello, I'm trying to make a revscript of a points system for kill of each monster that is in the table, could you help me? I try to get storage 43000 to add a point but it doesn't do anything by killing the rat.
I apologize in advance for my English.