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

[Request] Player won't get exp until he buys promotion

spice

CABS ARE HERE
Joined
Apr 5, 2009
Messages
1,226
Reaction score
15
Location
Göteborg, Sweden
So I need some help with my level system, togheter with my new vocation system. The player starts at level 8 and level up to 120. At level 120 he won't get EXP (he can still hunt to get loot, but NO exp). After he bought the promotion he will get exp when hunting.
 
Register this as a creatureevent. In the login script, make the type advance.
LUA:
local level = 120 --Level you want expRate set to 0
function onAdvance(cid, skill, oldlevel, newlevel)
	if skill == SKILL_LEVEL then
		if newlevel == level then
			doPlayerSetExperienceRate(cid, 0)
			doPlayerSendTextMessage(cid, 19, "You can no longer gain EXP until you get your promotion.")
		end	
	end
    	return TRUE
end

Then however you get your promotion, just put this with the EXPRate you want them to have:
LUA:
doPlayerSetExperienceRate(cid, x)
 

Similar threads

Back
Top