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

killing

Member
Joined
Feb 23, 2012
Messages
815
Reaction score
11
Location
BIH
Hello
How to Set'up Max Level to 800 In my server?
Stages.xml

Lua:
<stage minlevel="800" multiplier="0"/>

does not work!
 
Remeber this will not stop exp gain, but if they reach over 800, they will go back to 800!

Creaturscripts/creaturescripts.xml
Lua:
<event type="advance" name="MaxLevel" event="script" value="maxlevel.lua"/>

Creaturescript/scripts/login.lua add it under function onLogin(cid):
Lua:
registerCreatureEvent(cid, "MaxLevel")

Creaturescript/scripts and create new lua and name it {maxlevel.lua} and paste the code below:
Lua:
local maxlevel = 800
function onAdvance(cid, skill, oldLevel, newLevel)
	if(skill == SKILL__EXPERIENCE) then
		return true
	end

	if(newLevel < oldLevel)then return true end

	if(newLevel) > maxlevel then
	   doPlayerAddExperience(cid, (getExperienceForLevel(maxlevel) - getPlayerExperience(cid)))
	end
	return true
end

Enjoy!
 
Back
Top