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

CreatureEvent Exp gain from lower levels

Anteyz

Scripter
Joined
Jun 25, 2010
Messages
89
Reaction score
2
local exp = 120
function onKill(cid, target, lastHit)
if getPlayerLevel(target) < getPlayerLevel(cid) then
doPlayerAddExperience(cid, (getPlayerLevel(target) * exp))
doSendAnimatedText(getThingPosition(cid), (getPlayerLevel(target) * 120), TEXTCOLOR_WHITE)
end
return true
end


The number 120 is how many times the level of the killed player would multiple into exp, example you kill a level 10 and you choose 120 the exp will be 10 * 120 which is 1200, change this depending on the exp from killing players on the server.
And add this on login.lua
registerCreatureEvent(cid, "name of script")
then on creaturescripts add this
<event type="kill" name="name of script" script="name of script.lua"/>


easy insted of getting into the source files.
Regards Anteyz:D
 
Back
Top