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

Solved ~maximum level for Players~ (Fast help)

killing

Member
Joined
Feb 23, 2012
Messages
815
Reaction score
11
Location
BIH
Hello I would like to put on my server that has the maximum level 800.
but I do not know how?
I saw This:

Find function like this in player.h:
[cpp]static uint64_t getExpForLevel(uint32_t lv)
{[/cpp]

and after that add:
[cpp]if(lv > 2000)
return 0;[/cpp]

But i do not know where it is?Im using 3.6 TFS (8.60)
I need a HELP and Fast...
Rep++
 
Hello I would like to put on my server that has the maximum level 800.
but I do not know how?
I saw This:



But i do not know where it is?Im using 3.6 TFS (8.60)
I need a HELP and Fast...
Rep++

Wow you really slow? Read what Summ said!
 
goto data/creaturescripts/scripts/advancesave.lua

replace it with:
Lua:
local config = {
	savePlayer = true,
	healPlayerOnLevel = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(skill == SKILL__EXPERIENCE) then
		if(getPlayerLevel(cid)>=800) then
			doPlayerAddExperience(cid, getExperienceForLevel(800)-getPlayerExperience(cid))
			return true
		end
	end

	if(skill == SKILL__LEVEL and config.healPlayerOnLevel) then
		doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
		doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
	end

	if(config.savePlayer) then
		doPlayerSave(cid, true)
	end

	return true
end
 
Last edited:
goto data/creaturescripts/scripts/advancesave.lua

replace it with:
Lua:
local config = {
	savePlayer = true,
	healPlayerOnLevel = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(skill == SKILL__EXPERIENCE) then
		if(getPlayerLevel(cid)>=800) then
			doPlayerAddExperience(cid, getExperienceForLevel(800)-getPlayerExperience(cid))
			return true
		end
		return true
	end

	if(skill == SKILL__LEVEL and config.healPlayerOnLevel) then
		doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
		doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
	end

	if(config.savePlayer) then
		doPlayerSave(cid, true)
	end

	return true
end

Thanks,Thanks,Thanks!!!!Rep++
 
Add this on Login.lua or not?

- - - Updated - - -

And tag?
PHP:
<event type="advance" name="Advancelvl" event="script" value="max.lua"/>

correct?
 
Back
Top