• 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 Where i put this script?

SonekaBR

New Member
Joined
Nov 8, 2008
Messages
127
Reaction score
0
This is the script:

-- Quickly written by Znote.
function onKill(cid, target, lastHit)
local percent = 5 -- you get 5% experience from enemys total exp

if isPlayer(target) then -- If you killed a player and not a monster:
local xp = getPlayerExperience(target) -- fetch enemy experience
local calc = ((xp/100) * percent) -- calculate 1% of enemy experience, and multiply it with configured "percent"
local gain = math.floor(calc) -- Make sure the value is integer (etc 230 instead of 230,123123123)

doPlayerAddExperience(cid, gain) -- gives you the calculated experience
end
return true
end

I want to make this script works on Avesta 7.6, i've tryied many ways to make any player get experience killing others but all attemts failed.

Example:

If a lvl 200 kills a lvl 210 200 190 or 180 he gets experience but if he kills a lvl 179 170 160 or less than it he DOESN'T get experience.

HELP ME!
 
Back
Top