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

Helps with movement speed and level capacity

M1l0rd

New Member
Joined
Aug 13, 2018
Messages
3
Reaction score
0
Good afternoon, I have two questions.

1) I would like to know how to prevent players from increasing their movement speed every time they level up and maintain a base speed.
2) I would also like to know how to prevent players from going over level 100 and how to prevent skills from going over level 100.

What I want to do is give them a base movement speed level so that movement speed and boh spells have much more importance, and regarding level, I don't want them to go over level 100 since I also don't want them to spend their whole lives leveling up like robots.

Those are my two questions and thanks to whoever answers.
 
In terms of experience if you don't want to change C++ sources then you can set experience stage with multiplier 0 after 100 lvl but it's not that great solution.
Have you tried any solutions provided on forum?
You can make similar events for any other skill.

I found in C++ code responsible for updating base speed:
C++:
Player.h

    void updateBaseSpeed() {
        if (!hasFlag(PlayerFlag_SetMaxSpeed)) {
            baseSpeed = vocation->getBaseSpeed() + (2 * (level - 1));
        } else {
            baseSpeed = PLAYER_MAX_SPEED;
        }
    }
You can convert it to const value if you want to.

Based on TFS1.x.
 
Yo..

for level just add a line here to check players level and dont add more exp:
exemple:
LUA:
if self:getLevel() >= 100 then
return exp = 0
end

Same solution for skills, here just after this line:
LUA:
local player = Player(self)
if player and skill >= 100 then
return false
end

for speed, you can set a creatureevent to always set the speed of the player onlogin and level up
LUA:
creature:changeSpeed(delta)

I don't know if works!

server TFS 1.5 with EVENTS
 
Back
Top