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

AttackSpeed by leve in source help

Ashtar

ShadowRealm.online
Joined
May 1, 2009
Messages
307
Reaction score
99
Hello guys, i been trying to find a way to edit the player's attack speed depending on their level (i know its a source code change)

Let me explain it a little bit more

I wanna find the way to increase in small amounts the attack speed of a player depending on their level, for example.

LvL 8 =attack speed 2000
Lvl 600= Attack speed 1400

is that possible?
i really dont wanna edit the vocations.xml neither the items.xml

please help me to reach this goal :C

rep++ of course for any help.
 
make sure you are familiar with compiling and then let us know which distro you are using and id be more than willing to help.


after that it wont be hard at all. in your case, you need to make a formula.

simple example

attack speed = (2000 - player level)

but it would need some checks to make sure the attack speed doesnt go below 100 etc.
 
Last edited:
I have this code ready, but my server crashes with higher levels and skill levels so I won't publish it yet
I have idea why it crashes. Probably not related to my code. Gonna check that later and create some 'universal' version of code

- - - Updated - - -

st like
Code:
uint32_t Player::getAttackSpeed() const
{     
    int32_t level = this->getLevel();
    int32_t time = 2000 - level;
    if (time > 1000) return time; else return 1000;
}
change 1000 to minimal time between hits
 
Last edited:
im using the forgotten server crying dawson v5, i believe i changed my player.h to that code u gave me and nothing happened :C...
 
im getting this error al compiling

1>..\player.cpp(4770): error C2447: '{' : missing function header (old-style formal list?)
 
Back
Top