Total Statistics

Results 1 to 15 of 15
  1. #1
    Helper ! xhethx is offline
    True MemberRank
    Jun 2010 Join Date
    BahrainLocation
    778Posts

    Total Statistics

    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 :
    https://www.mediafire.com/?1j92wi697o284u2

    mirror : https://www.dropbox.com/s/cq83l65sgr...otals.rar?dl=0


    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
    https://www.dropbox.com/s/jnm1k187r7...otals.rar?dl=0

    thanks to @General
    Last edited by xhethx; 16-12-14 at 09:26 AM.

    United we stand .. Scattered we fall


  2. #2
    boo General is offline
    Alpha MaleRank
    Sep 2006 Join Date
    at homeLocation
    2,321Posts

    Re: Total Statistics

    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...
    Known from SolleKal, SwordOnline, New World Kal and Trinity Kal.

  3. #3
    Banned Kallyanna is offline
    BannedRank
    Jul 2007 Join Date
    Spamzilla CrewLocation
    1,825Posts

    Re: Total Statistics

    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 :)

  4. #4
    Ultimate Member midobahr is offline
    MemberRank
    May 2012 Join Date
    KalonlineLocation
    161Posts

    Re: Total Statistics

    Great work @xhethx keep going and try to get better and better
    aha and don't care if some one don't like it ;)
    *removed by Kreeate for violating forum rules*

  5. #5
    Helper ! xhethx is offline
    True MemberRank
    Jun 2010 Join Date
    BahrainLocation
    778Posts

    Re: Total Statistics

    Quote Originally Posted by General View Post
    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 by xhethx; 15-12-14 at 03:39 PM.

    United we stand .. Scattered we fall

  6. #6
    Developer BeshoyFD is offline
    True MemberRank
    Jul 2008 Join Date
    In World :)Location
    700Posts

    Re: Total Statistics

    Quote Originally Posted by General View Post
    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

  7. #7
    Member DarkBerzerk is offline
    MemberRank
    Jun 2011 Join Date
    70Posts

    Re: Total Statistics

    Quote Originally Posted by xhethx View Post
    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)

    Quote Originally Posted by General View Post
    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

    Quote Originally Posted by BeshoyFD View Post
    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
    How to spell HTML?
    ----------
    J3lackSwOrD is my nickname,
    But i'm also known as J3lackSwOrD!

  8. #8
    Developer Eronisch is offline
    True MemberRank
    Jul 2009 Join Date
    The NetherlandsLocation
    1,330Posts

    Re: Total Statistics

    Learning is never useless. Also writing that already exists isn't useless as well, example: search engines.

  9. #9
    Alpha Member DjKrava is offline
    Alpha MaleRank
    Apr 2008 Join Date
    SlovenijaLocation
    2,095Posts

    Re: Total Statistics

    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.

  10. #10
    Registered tolga1337 is offline
    MemberRank
    Sep 2018 Join Date
    11Posts

    Re: Total Statistics

    I am looking for someone who is familiar with website scripts pm me via discord PaRaDoX#2381

  11. #11
    Hardcore Member GioVa000 is offline
    MemberRank
    Dec 2008 Join Date
    StuttgartLocation
    149Posts

    Re: Total Statistics

    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

  12. #12
    null zig is offline
    True MemberRank
    Jul 2007 Join Date
    692Posts

    Re: Total Statistics

    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);
    }

  13. #13
    Hardcore Member GioVa000 is offline
    MemberRank
    Dec 2008 Join Date
    StuttgartLocation
    149Posts

    Re: Total Statistics

    This isnt for a website or? But thanks for your answer

  14. #14
    Hardcore Member luizatena95 is offline
    MemberRank
    May 2018 Join Date
    123Posts

    Re: Total Statistics

    Quote Originally Posted by GioVa000 View Post
    This isnt for a website or? But thanks for your answer
    That will save on database, it's not directly to web server.
    Like = Thanks! Cheers.

  15. #15
    Hardcore Member GioVa000 is offline
    MemberRank
    Dec 2008 Join Date
    StuttgartLocation
    149Posts

    Re: Total Statistics

    mabey you got a php script ?^^



Advertisement