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

Max. Lvl

probably easy way to do that without much scripting, go to your xml folder and in stages set your level you want to be max and set exp to 0

example: <stage maxlevel="300" multiplier="0"/>
 
k, here :p

Just put it in creaturescripts
Code:
<event type="think" name="Maxlvl" event="script" value="maxlevel.lua"/>
Code:
local maxlevel = 100

function onThink(cid, interval)
    if getPlayerLevel(cid) == maxlevel+1 then
        doPlayerAddExperience(cid, getExperienceForLevel(maxlevel))
    end
return true
end

EDIT; Maybe you need to add this in login.lua:
Code:
registerCreatureEvent(cid, "Maxlvl")
 
LUA:
function onAdvance(cid, skill, oldlevel, newlevel)

local maxLevel = 400

	if(not skill == SKILL__LEVEL)
		return true
	end

	if(getPlayerLevel(cid) >= maxLevel) then
		doPlayerSetRate(cid, type, 0) --where type = exp
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have reached the max level, you will not gain more exp.")
	end
	return true
end
 
Back
Top