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

Compiling Speed at source

marcos16

Falkhonn
Joined
May 4, 2012
Messages
224
Reaction score
1
modifying the speed at source, could someone explain where do the changes?
[Without being in speed_max because I put speed 600 there the player reaches this speed and the items and stem magic does not give effect]

EDIT

If I put premium will someone help this doubt that I am the time and no one has managed to help?
 
Last edited:
No, there wont help you someone quicklier because your premium.
Next time provide your engine / tfs version please.
Have a look on this function: (TFS 0.4)
players.h
Code:
    void updateBaseSpeed()
     {
       if(!hasFlag(PlayerFlag_SetMaxSpeed))
         baseSpeed = vocation->getBaseSpeed() + (2 * (level - 1));
       else
         baseSpeed = SPEED_MAX;
     }

vocation.cpp
Code:
  if(readXMLInteger(p, "basespeed", intValue))
     voc->setBaseSpeed(intValue);

Maybe this could be helpful, no idea. Still a try worth..
 
Just get an updated server already.
You've spent nearly 2 months on this issue.
 
I do not want a more updated, I just want to pack up my speed, which until now could not and did not receive help. I think that the way will be to pay someone to do it.
 
@marcos16 are you running your server with your own client (otclient)? because original tibia has speed limit and probably if you pass through this limit tibia client will debug, so pay someone to make your own client.
 
Last edited:
I don't even understand what you are asking for. Are you asking how to increase maximum speed for all players? Premium players? With an item? Increase base-speed?
 
I want the game speed is reduced, for when the player is high level not seem like a fly on a turd.
I used a script but gave error when used boh and advances and regressed to the level speed bugava ... The following is the script:

Code:
local info = {
[{10, 49}] = {speed = 250},
[{50, 100}] = {speed = 290},
[{101, 149}] = {speed = 340},
[{150, 249}] = {speed = 360},
[{250, 300}] = {speed = 380},
[{301, 4000}] = {speed = 400}
}

function onAdvance(cid, skill, oldLevel, newLevel)
    for level, x in pairs(info) do
         if skill == 8 and newLevel >= level[1] and newLevel <= level[2] then
            doChangeSpeed(cid, -getCreatureBaseSpeed(cid))
        doChangeSpeed(cid, x.speed)
            doCreatureSetStorage(cid, 30029, x.speed)
        end
    end
return 1
end

I used o'Login and onAdvance both gave error
 
He is really hard to understand but basicly he wants players get slower as higher they get.
So a Level 20 knight is faster than a Level 100 knight. Thats what I could read out of his poor english :p
 
@EvilSkillz apparently he does want to set move speed lower for high level players don't run too fast, actually this variable can be changed into vocations.xml in tfs 1.2, i dont mentioned that because also idk what's the parameters of pugi

@marcos16 please try to explain with exemples what exactly you want, decrese player high level instead increse? stop the increse? otherwise we can't help you out.
 
Last edited:
@Shyzo
I just want to reduce the gain of the player's speed.
Example:
Level 400 normal speed = 1243 [normal each server]
Level 400 modified speed = speed 400 [as I want]
 
why doesnt onAdvance work? its by far the easiest way
there is no need to change stuff in the source when you can do it super simple in lua
 
@Zothion he does asked for it, i think lua also could be a ease to this, if you want a excuse why, in source you have a better performace xD
 
performance in this case doesnt relly matter, since onadvance would be called very rarely anyway...

you can just have a table for ranges with desired speed, such at {20,30, 100} to have 100 speed between 20 and 30, and onAdvance if 20>lvl>30
doChangeSpeed( - (currentSpeed-baseSpeed(from table)))
so if you lvl to 21 and gain 10 speed, youll call changeSpeed with -(110-100) so youll remove 10 speed, and youll end up with the correct speed
 
onAdvance could be called a lot of times, its on number of player/server exp rate, even assuming his server is huge, is not a notable performace decrease in this case.
 
Back
Top Bottom