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

Lua Error onDeath screen

Fortera Global

Intermediate OT User
Joined
Nov 20, 2015
Messages
1,181
Solutions
2
Reaction score
117
Code:
-- kdcounter.lua
function onKill(creature, target)
   
    if creature:isPlayer() and target:isPlayer() and creature:getIp() == target:getIp() then
    return true
    end
   
    if target:isPlayer() and target:getLevel() >= 150 then
        creature:setStorageValue(167912, math.max(0, creature:getStorageValue(167912)) + 1)
    end
    return true
end
function onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
    if creature:isPlayer() and lasthitkiller:isPlayer() and creature:getIp() == lasthitkiller:getIp() then
    return true
    end
   
    if lasthitkiller and lasthitkiller:isPlayer() and creature:getLevel() >= 150 then
        creature:setStorageValue(167913, math.max(0, creature:getStorageValue(167913)) + 1)
    end
    return true
end



Rj9WNJm.png


help please
 
Back
Top