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

[HOW?] Multi-World Systems

justin234

New Member
Joined
Jan 22, 2008
Messages
999
Reaction score
4
as topic says, how can u make a multi-world system, like have Two worlds exactly the same map, but one for premmy and one for free accounts...or something.

Example: RealOT's
 
@Vagabond.
Code:
Account IOLoginData::loadAccount(uint32_t accno)
{
	Account acc;

	Database* db = Database::getInstance();
	DBQuery query;
	DBResult result;

	query << "SELECT `id`, `password`, `type`, `premdays`, `lastday`, `key`, `warnings` FROM accounts WHERE id = " << accno;
	if(db->connect() && db->storeQuery(query, result))
	{
		acc.accnumber = result.getDataInt("id");
		acc.password = result.getDataString("password");
		acc.accountType = (AccountType_t)result.getDataInt("type");
		acc.premiumDays = result.getDataInt("premdays");
		acc.lastDay = result.getDataInt("lastday");
		acc.recoveryKey = result.getDataString("key");
		acc.warnings = result.getDataInt("warnings");
		
		query << "SELECT `name` FROM players WHERE account_id = " << accno;
		if(db->storeQuery(query, result))
		{
			for(uint32_t i = 0; i < result.getNumRows(); ++i)
			{
				std::string ss = result.getDataString("name", i);
				acc.charList.push_back(ss.c_str());
			}
			acc.charList.sort();
		}
	}
	return acc;
}
So should I replace all this with rogiers code?
 

Similar threads

Replies
14
Views
610
Back
Top