Hello, i'm learning to compile so i've scripted a feature that change the player attack speed
Let's start !
player.cpp
Find:
Replace with this:
configmanager.cpp
Find:
After it, paste this:
configmanager.h
Find this:
After it, paste this:
Now save and compile, then go to config.lua and paste this
Default = 0, Biggest value, biggest speed
Bugs:
If you set a very high speed, then the player will not attack.
Let's start !
player.cpp
Find:
Code:
return vocation->getAttackSpeed()
Code:
return vocation->getAttackSpeed() - g_config.getNumber(ConfigManager::EXTRA_ATTACK_SPEED);
configmanager.cpp
Find:
Code:
m_confDouble[RATE_PVP_EXPERIENCE] = getGlobalDouble("rateExperienceFromPlayers", 0);
Code:
m_confNumber[EXTRA_ATTACK_SPEED] = getGlobalNumber("attackSpeed", 0);
configmanager.h
Find this:
Code:
NAME_REPORT_TYPE,
Code:
EXTRA_ATTACK_SPEED,
Now save and compile, then go to config.lua and paste this
Code:
attackSpeed = 0
Default = 0, Biggest value, biggest speed
Bugs:
If you set a very high speed, then the player will not attack.