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

TFS 1.X+ EXP BONUS FOR PREMIUM ACCOUNT

Igor Milagres

Member
Joined
May 12, 2018
Messages
76
Reaction score
21
Hello, I would like to put as one of the advantages of the premium account on my server 10% more than exp for premium account players, how do I, could someone lend a hand? very thanks The version of my server is 7.4. Distro Otx2 Tfs 1.0
 
Do you have a file called player.lua in events?
If you do then look at this method & modify it.
Lua:
Player:onGainExperience
 
Add this to ur config.lua
-- Premium Settings
premiumExperience = 10 -- 10% bonus experience

You seem to be a owner of certain OT but you also seem to have 0 experience with kind of mentality of 10 years old who wants to run a server for money by downloading it from OT forums.

Adding something that does not exist in sources will never work. 1st lesson, wannabe chelper.

Share the solution please. Thanks! :)

It is funny how you claim yourself such a pro scripter and few other words yet still begs for sharing solution. Why don't you do that in case he does not answer anymore?
I don't think anyone is obligated to share something they found themselves, but it is wise to do so in order to help others.

All I mean is, as you're good at this, why don't you write a proper solution when it's really easier to fix this issue instead of giving hints? (only after he sorted out, of course. I don't blame for giving hints, it was a right answer.)

*Don not copy paste whole code, just the part inside, because your script might have other functions
Lua:
function Player:onGainExperience(source, exp, rawExp)
    if not source or source:isPlayer() then
        return exp
    end
 
    -- Apply experience stage multiplier
    exp = exp * Game.getExperienceStage(self:getLevel())

    -- Apply extra experience to Premium account
    if self:isPremium() then
        exp = exp * 2
    end
 
    return exp
end
 
@sampleangel because i am not at my computer & i never claimed to be a pro scripter... That is a label a lot of you have given me. (Thanks!)

And yes if a person asks for help & finds a solution on their own they should share it, so that in the future it will not only help others but help themselves aswell... :)
 
Back
Top