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

Number max of char per acc

zednem

New Member
Joined
Nov 15, 2008
Messages
108
Reaction score
0
In cryingdamson6pl there is no option in config.luato choose the number max of char per acc.
There is any script that do that?
OBS: i want to use acc manager in game
 
player.cpp
Code:
			else if(checkText(text, "character") && talkState[1])
			{
[B]				if(account.charList.size() <= [COLOR="Red"]15[/COLOR])[/B]
				{
					talkState[1] = false;
					talkState[6] = true;
					msg << "What would you like as your character name?";
				}
				else
				{
					talkState[1] = true;
					for(int8_t i = 2; i <= 12; i++)
						talkState[i] = false;

					msg << "Your account reach the limit of 15 players, you can 'delete' a character if you want to create a new one.";
				}
			}
 
Try this (NOT TESTED)

configmanager.cpp
After:
Lua:
m_confNumber[START_LEVEL] = getGlobalNumber("newPlayerLevel", 1);

paste:
Lua:
m_confNumber[PLAYERS_PER_ACCOUNT] = getGlobalNumber("playersPerAccount", 15);

configmanager.h
After:
Lua:
START_LEVEL,

Paste:
Lua:
PLAYERS_PER_ACCOUNT,

player.cpp
Search:
Lua:
if(account.charList.size() <= 15)

And replace with:
Lua:
if(account.charList.size() <= g_config.getNumber(ConfigManager::PLAYERS_PER_ACCOUNT))

Search:
Lua:
msg << "Your account reach the limit of 15 players, you can 'delete' a character if you want to create a new one.";

And replace with:
Lua:
msg << "Your account reach the limit of " << g_config.getNumber(ConfigManager::PLAYERS_PER_ACCOUNT) << " players, you can 'delete' a character if you want to create a new one.";

Now, compile the server and paste this in config.lua
Lua:
playersPerAccount = 15
 
Back
Top