tarantonio
Old School Player
- Joined
- Jun 21, 2009
- Messages
- 865
- Solutions
- 1
- Reaction score
- 274
@Nottinghster this line:Do like I did in my old sources, I've created 3 options of Exp Formula, to change the exp formula type, you just need to edit the config.lua, below are those 3 options
* Tibianic HR Exp Formula (Thanks to Iryont who gave to me)
* MasterCores Exp Formula (MasterCores files released)
* Original Tibia Exp Formula
At player.h, change this:
Code:static uint64_t getExpForLevel(uint32_t level) { level--; return ((50ULL * level * level * level) - (150ULL * level * level) + (400ULL * level))/3ULL; }
For this:
Code:static uint64_t getExpForLevel(int32_t level) { std::string ExpFormulaType = g_config.getString(ConfigManager::TYPE_FORMULA); level--; if(ExpFormulaType == "original"){ return ((50ULL * level * level * level) - (150ULL * level * level) + (400ULL * level))/3ULL; } else if(ExpFormulaType == "tibianic"){ return (level * 35ULL) * (level * level * level) / 500ULL + 10ULL * level; } else if(ExpFormulaType == "mastercores"){ return ((level * 50ULL) * (level * level * level) / 500ULL)+10ULL; } }
At configmanager.cpp, below that line:
Code:m_confInteger[CONTAINER_ITEMS_AUTO_STACK] = getGlobalBoolean(L, "container_items_auto_stack", false);
Add this:
Code:m_confString[TYPE_FORMULA] = getGlobalString(L, "ExpFormulaType", "original");
In configmanager.h, below that line:
Code:CONTAINER_ITEMS_AUTO_STACK,
Add this:
Code:TYPE_FORMULA,
Hope you enjoy it !!!
Code:
std::string ExpFormulaType = g_config.getString(ConfigManager::TYPE_FORMULA);
g_config and ConfigManager are global not declared anywhere. Check this: https://travis-ci.org/TwistedScorpio/OTHire/builds/46640096