• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Request] BaseSpeed

enriel

Big L
Joined
Dec 14, 2007
Messages
1,254
Reaction score
2
Location
Montenegro
Is there a way to reduce basespeed of players? Because now it's not as real tibia, abit too fast. How can I reduce the speed of players?:p
 
You can either change the speed of the Player in the vocations.xml file, or correct it through the function "doChangeSpeed(cid, delta)"

For the second you would have to write your own formula.


kind regards, Evil Hero.
 
You can either change the speed of the Player in the vocations.xml file, or correct it through the function "doChangeSpeed(cid, delta)"

For the second you would have to write your own formula.


kind regards, Evil Hero.

I can't find it in vocations.xml, I mean the baseSpeed, for example if it's 250 I want to change it to 200.
 
Didn't know that it isn't stored in vocations.xml anymore on 0.3.5

I can give you a Script to reduce it but be aware it's not the best solution, would be better if someone would look up where the basespeed is stored now.

LUA:
function onLogin(cid)
local storage = 65000 -- storage which is used to store if the player got his speed decreased already or not.
local ammount = 50 -- ammount which the speed is getting decreased with.
	if getPlayerStorageValue(cid, storage) ~= 1 then
		doChangeSpeed(cid, (getCreatureSpeed(cid) - ammount))
		setPlayerStorageValue(cid, storage, 1)
	end
	return TRUE
end

As I mentioned, probably the worst solution, better hope that someone know where it's stored at :p


kind regards, Evil Hero.
 
You can still set the basespeed in vocations.xml
Just add basespeed="XXX" like this.

PHP:
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" basespeed="10" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
 
You can also change formula of gaining speed each level, in sources :)
player.h

void updateBaseSpeed()
{
if(!hasFlag(PlayerFlag_SetMaxSpeed))
baseSpeed = vocation->getBaseSpeed() + (2 * (level - 1));
else
baseSpeed = SPEED_MAX;
}
 
Yess basespeed can be set in vocations.xml, also found 2 more variables which were not added into this file. Also gonna add new configurable - rateSpeed so u can control default speed multiplier fe. setting it to 0.1 players will be very slow ;DD
 
Back
Top