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

Windows Character walking speed

AnarchGov

Member
Joined
Oct 3, 2011
Messages
263
Reaction score
6
Where can i change and edit the walking speed of players by level? I am looking to either raise the base base walking speed(When you start at level 8) or make characters gain a little more walking speed with each level. I just have no idea where to do this in my server. Thanks for the help <3

REP++
 
if i may guess i believe it's in data>xml>vocations

open it and change for every ^^i'm not sure though
 
Isn't that file in source? Is there any other way? I am currently learning how to compile and re-compile and blah blah. But i do not know how to do it yet.
 
You can do it on Lua, just add it to file login.lua in creaturescripts:

doChangeSpeed(cid, (getCreatureBaseSpeed(cid)) + 250)

You can change the value 250, it's just example.

You can also add some variables as "If level add 100, If level x add 200 etc.".
 
Thanks guys. Anyone care to help me by answering a few questions about compiling?

Add me on skype: rparks90

btw i am going to try to add that to login.lua. Just to be clear, if i added:

doChangeSpeed(cid, (getCreatureBaseSpeed(cid)) + 250)

to login.lua, it would just add 250 to all players walking speed? Or would it set all players walking speed to 250?

P.s. I am not really sure how to even add that to login.lua. There are no other lines that start with "do"
 
Ok thanks. Now i feel that may cause problems. Players that are already passed level 8 will not get the speed boost. Is that correct? Also, After they level up from level 8, wont their walking speed go right back to normal once they log out or the server restarts?

Also:
[04/03/2013 18:15:10] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/login.lua:48: 'then' expected near '='
[04/03/2013 18:15:10] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login.lua)
[04/03/2013 18:15:10] data/creaturescripts/scripts/login.lua:48: 'then' expected near '='

LUA:
	if getCreatureBaseSpeed(cid) = 220 then
		doChangeSpeed(cid, (getCreatureBaseSpeed(cid)) + 250)
	end
 
I wanted to add speed to all levels, by making them gain more speed each level. OR simply make the starting speed higher, therefor making everyone walk faster than usual. Id rather do the first one. Either way that did not work, it gave me an error.
 
Back
Top