Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Total Statistics

Joined
Jun 23, 2010
Messages
785
Reaction score
228
i know the php code is sucks :p
but im trying to learn even if this useless
some admins maybe need this some not ..


Download :


mirror :


Special thanks to Beshoy aka TheDragon for help :)

---- update
like what General said .. maybe the old code is heavy load on the server "maybe not"
so i use his code


thanks to General
 
Last edited:
Joined
Sep 10, 2006
Messages
1,243
Reaction score
179
Why do you even release this kind of simple php?

And why don't you use mssql_num_rows or odbc_num_rows instead of executing the whole query? Heavy load on the server every time...

like
$TotalAccounts = odbc_num_rows(odbc_exec($conn2,"SELECT UID from [Login]"));

or

$r = odbc_fetch_array(odbc_exec($conn,"SELECT Currency FROM [Statistics]"));
$on3 = $r['Currency'];

You also forgot the ORDER BY from Statistics.

If you want to release this "just to release something", better to not release anything...
 
Banned
Banned
Joined
Jul 8, 2007
Messages
1,628
Reaction score
1,619
Its a nice simple release. Alot of people have been talking about the lack of php scripts and such. I tested this myself and its simple but effective :)
 
Joined
Jun 23, 2010
Messages
785
Reaction score
228
Why do you even release this kind of simple php?

And why don't you use mssql_num_rows or odbc_num_rows instead of executing the whole query? Heavy load on the server every time...

like

You also forgot the ORDER BY from Statistics.

If you want to release this "just to release something", better to not release anything...

easy .. this is my first time in php
i dont need to release this "just to release something"
some admins want to know how many real players playing "leveling,killing" and this will show them the fishers and shopers

for example: players online - (fishers+shopers) = real players
i know u r pro
and maybe you are bored right now so u said to ur self .. lets go fight with heth
let me tell you something..
just go back to your cave and better to not post on my threads cuz it wont make any different

also thanks for this :)
And why don't you use mssql_num_rows or odbc_num_rows instead of executing the whole query? Heavy load on the server every time..

bye
 
Last edited:
Developer
Joined
Jul 24, 2008
Messages
666
Reaction score
459
Why do you even release this kind of simple php?

And why don't you use mssql_num_rows or odbc_num_rows instead of executing the whole query? Heavy load on the server every time...

like

You also forgot the ORDER BY from Statistics.

If you want to release this "just to release something", better to not release anything...
i think you have to Encourage and support beginners instead attack them
i think you forgot the php things :p
no more mssql connection in PHP its only in the old versions
there is other sql connection called SQLSRV at this time :p
good job xhethx
 
Newbie Spellweaver
Joined
Jun 29, 2011
Messages
70
Reaction score
94
i know the php code is sucks :p
but im trying to learn even if this useless
some admins maybe need this some not ..
Thanks buddy keep going up (Y)

Why do you even release this kind of simple php?

And why don't you use mssql_num_rows or odbc_num_rows instead of executing the whole query? Heavy load on the server every time...

like

You also forgot the ORDER BY from Statistics.

If you want to release this "just to release something", better to not release anything...
Shut up and say thanks

i think you have to Encourage and support beginners instead attack them
i think you forgot the php things :p
no more mssql connection in PHP its only in the old versions
there is other sql connection called SQLSRV at this time :p
good job xhethx
Go teach them boss :p
 
Custom Title Activated
Loyal Member
Joined
Apr 5, 2008
Messages
1,325
Reaction score
133
gj heth;) i would also like to say tnx to dragon to support and help begginers with the php. hes one of few that actually do that.
 
Newbie Spellweaver
Joined
Sep 21, 2018
Messages
13
Reaction score
0
I am looking for someone who is familiar with website scripts pm me via discord PaRaDoX#2381
 
Junior Spellweaver
Joined
Dec 21, 2008
Messages
191
Reaction score
8
I know its a old theard but anyone can help me to add how much Mages/Knight/Archer/Thief on Server
or Castle War Owner ?

thank you
 
Joined
Jul 2, 2007
Messages
646
Reaction score
291
Code:
void CPlayer::LogPlayerStatistic(){
	int nSection[11][6];
	ZeroMemory(&nSection, sizeof(nSection));
	CPlayer *p;
	LINKPLAYER_BEGIN(p)
		if (p->m_nLevel <= 100)
		{
			int nNum = (p->m_nLevel - 1) / 10;
			++nSection[nNum][p->m_nClass];
			++nSection[nNum][STATLOG_TOTAL];
			if (p->IsGState(CGS_FISH))
				++nSection[nNum][STATLOG_FISH];
			if (p->IsGState(CGS_ONSTALL))
				++nSection[nNum][STATLOG_STALL];
		}
	LINKPLAYER_END;


	for (int i = 0; i < 10; i++)
	{
		LOG_NORMAL("(Level Range : ##%02d ~ %02d) : (Kninght : %d) (Mage : %d) (Archer : %d) (Total : %d)", 10 * i + 1, 10 * i + 10, nSection[i][STATLOG_KNIGHT], nSection[i][STATLOG_MAGE], nSection[i][STATLOG_ARCHER], nSection[i][STATLOG_TOTAL]);
		LOG_NORMAL("(Level Range : @@%02d ~ %02d) : (State : (Fish : %d) (Stall : %d))", 10 * i + 1, 10 * i + 10, nSection[i][STATLOG_FISH], nSection[i][STATLOG_STALL]);
		nSection[10][STATLOG_KNIGHT] += nSection[i][STATLOG_KNIGHT];
		nSection[10][STATLOG_MAGE] += nSection[i][STATLOG_MAGE];
		nSection[10][STATLOG_ARCHER] += nSection[i][STATLOG_ARCHER];
		nSection[10][STATLOG_TOTAL] += nSection[i][STATLOG_TOTAL];
		nSection[10][STATLOG_FISH] += nSection[i][STATLOG_FISH];
		nSection[10][STATLOG_STALL] += nSection[i][STATLOG_STALL];
	}
	LOG_NORMAL("##Total Player Statistic : (Kninght : %d) (Mage : %d) (Archer : %d) (Total : %d)", nSection[10][STATLOG_KNIGHT], nSection[10][STATLOG_MAGE], nSection[10][STATLOG_ARCHER], nSection[10][STATLOG_TOTAL]);
	LOG_NORMAL("@@Total Player Statistic State : (Fish : %d) (Stall : %d)", nSection[10][STATLOG_FISH], nSection[10][STATLOG_STALL]);
	LOG_NORMAL("$$Currency Total : %d", s_nCurrency);
	CDBSocket::Write(S2D_STATISTICS, "ddddddd", nSection[10][STATLOG_KNIGHT], nSection[10][STATLOG_MAGE], nSection[10][STATLOG_ARCHER], nSection[10][STATLOG_TOTAL], nSection[10][STATLOG_FISH], nSection[10][STATLOG_STALL], CPlayer::s_nCurrency);
}
 
Junior Spellweaver
Joined
Dec 21, 2008
Messages
191
Reaction score
8
i know the php code is sucks :p
but im trying to learn even if this useless
some admins maybe need this some not ..


Download :


mirror :


Special thanks to Beshoy aka TheDragon for help :)

---- update
like what General said .. maybe the old code is heavy load on the server "maybe not"
so i use his code


thanks to General

You know what I must change in Xea Source Main Srv to change 30 min to 1 min ?
 
Back
Top