• 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 script request

ninolouco

Member
Joined
Mar 11, 2019
Messages
28
Reaction score
8
For 1.2 The forgotten server

Any script to check

Function OnDeath
If players have vocation diferent of 0 id and Level 6 less, add storage 135,1

Thanks advance.
 
Solution
Lua:
function onDeath(player, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
    if not player then
        return false
    end

    if (player:getVocation() ~= 0) and (player:getLevel() < 6) then
        player:setStorageValue(135, 1)
    end
return true
end
Lua:
function onDeath(player, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
    if not player then
        return false
    end

    if (player:getVocation() ~= 0) and (player:getLevel() < 6) then
        player:setStorageValue(135, 1)
    end
return true
end
 
Solution
Back
Top