• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

help with this script

agomez

Member
Joined
Jan 28, 2009
Messages
211
Reaction score
5
i have this script:
PHP:
exp = function(cid)
    local s = {--from lvl, to lvl, exp
        {49,59,1000000},
        {60,79,1300000},
        {80,89,2000000},
        {90,99,2000000},
        {100,109,3500000},
        {110,119,7000000},        
    }
    for _, t in ipairs(s) do
        if getPlayerLevel(cid) > t[1] and getPlayerLevel(cid) <= t[2] then
            return t
        end
    end
end
 
function onKill(cid, target, lastHit)
    if isPlayer(cid) and isPlayer(target) and lasthit then
        if tonumber(exp(cid)[3]) then
            doPlayerAddExperience(cid, exp(cid)[3])
        end
    return true
end
 
function onLogin(cid)
    registerCreatureEvent(cid, 'experiencia')
    return true
end
end
but when you kill the player, it will give the exp to the last person to damage the player :P.
i want if 3 or 4 person kill someone divide the exp between the number of person who kill him.
 
Back
Top