• 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 premium/vip/normal exp stages in lua

Azi

Banned User
Joined
Aug 12, 2007
Messages
1,167
Reaction score
53
Location
Włocławek
It's exp stages script for premium players, vip players or normal players. For working you must set empty exp stages in stages.xml
and setup in lua script.

creaturescripts.xml:
PHP:
<event type="advance" name="stages" script="stages.lua"/>

and creaturescripts/scripts/stages.lua:
PHP:
config = { 
	vipSystem = "YES", -- Vip System Working?
	vipStorage = 64621, -- STORAGE VALUE of Vip's
}
stages = {
	normal = {
		[1] = 100,
		[20] = 80,
		[60] = 60,
		[100] = 40,
		[200] = 20,
	},	
	premium = {
		[1] = 200,
		[20] = 160,
		[60] = 120,
		[100] = 80,
		[200] = 40,
	},
	vip = {
		[1] = 250,
		[20] = 190,
		[60] = 180,
		[100] = 120,
		[200] = 60,
	},
}
function onAdvance(cid, skill, oldlevel, newlevel)
	if isPremium(cid) then
		stage = stages.premium
	elseif getPlayerStorageValue(cid, config.vipStorage) > 0 and string.upper(config.vipSystem) == "YES" then
		stage = stages.vip
	else
		stage = stages.normal
	end
	
	if stage[newlevel] then
		setPlayerExtraExpRate(cid, stage[newlevel])
	end

end

When player advance lvl - stage auto changed.
 
Last edited:
need desactive stages.xml? in config.lua...

experienceStages = "NO" ????????

OR

experienceStages = "yes" ???????


Please Help
 
hmm I use TFS ver. 0.3.1 (Crying Damson) dont work ;(

login.lua add:
registerCreatureEvent(cid, "stages")

stages.xml:
<?xml version="1.0" encoding="UTF-8"?>
<stages>
<world id="0">

</world>
</stages>
creaturescripts.xml
<event type="advance" name="stages" script="stages.lua"/>



config.lua

experienceStages = "yes"

and add You code (stages.lua) ;( no work.
 
If player got both vip and premium they take premium stages. Also when player die ex. on 63 level they will got normal stages out of the script.

Easy fix for that. Just give the player a command, for example

!activate exp

Then check the players level, prem, VIP and give appropriate exp bonus. ^^
 
it doesn't work on tfs 0.3(beta3)

Can someone help me? when I set this, player won't get exp for monster
 
im running on 0.34 and it's not working here either, like you said i cleanished the stages, I have no errors in console but i wont get any exp now :<, i think this script is not so good ?
 
Back
Top