WebScrips To Show TOP 10 People, Guilds, Online GM's

Results 1 to 21 of 21
  1. #1
    Valued Member Dovydass is offline
    MemberRank
    Mar 2006 Join Date
    LithuaniaLocation
    109Posts

    WebScrips To Show TOP 10 People, Guilds, Online GM's

    This is my starting with PHP and MSSQL. Script to show TOP 5 (or more) strongest Character, Guilds, And Script to show if GM's are on.


    ------------------------------


    ------------------------------

    P.S. This is really easy
    I have all 3 these tables, but you can add just 1 if you want.
    The green rows mean that the GM is on, the top player is on, or one or more of top guild members are on.
    If none is online you wouldnt see the "GM's On" like there wouldnt be Gms table. And top players and guilds list will be gray(#cccccc) color.
    You need to have Class.MSSQL.php file.If you dont have then download from attachments and config it (change just yourpass)!!!
    added attachments if you need
    Function needed to each table
    without it would work none of tables.
    Add it to your index.php

    PHP Code:
    function isnickonline($nick){
                
    $db2 = new DB_MSSQL;
                
    $db2->query("SELECT ConnectStat FROM dbo.MEMB_STAT WHERE memb___id =(SELECT Id FROM dbo.AccountCharacter WHERE GameIDC='$nick')");
                if (
    $db2->next_record())
                        if(
    $db2->f('ConnectStat') == 1) return true;
                        else return 
    false;
                    else return 
    false;
                } 
    Now The GM's ON table code. Add in index.php if you want this
    PHP Code:
    $db = new DB_MSSQL;
        
    $db->query('SELECT Name FROM dbo.Character WHERE CtlCode = 8 OR CtlCode = 32');
        while (
    $db->next_record()){
                
    $gmnick $db->f('Name');
                if (
    isnickonline($gmnick)){            
                        
    $gmoncontent =("$gmoncontent<tr><td>$gmnick</td></tr>");
                        
    $yra true;  }
                                    }
        if (
    $yra)     $gmsonline =("<table width='167' border='0' bordercolor='#000000' cellpadding='1' cellspacing='0' style='font:Verdana, Arial, Helvetica, sans-serif; font-size:14px; color:#00FF00;'>
    <tbody align='center'>
    <tr><th>GM's ON:</th></tr>
    $gmoncontent</tbody></table>");        
    $smarty->assign('gmsonline',$gmsonline); 
    Code to show this table: Add in index.html(the place where you want see this table)
    Code:
    {$gmsonline}<br />
    And you have you GM's ON :busted_co
    Now TOP players table: Add in index.php
    PHP Code:
    $howmuch 10/* How may top players to show */
        
    $query =("SELECT TOP $howmuch Name,Reset FROM dbo.Character ORDER BY Reset desc , cLevel desc;");
        
    $skaic 1;
        
    $top5 = array();
        
    $db = new DB_MSSQL($query);
            while (
    $db->next_record()){
                
    $nick $db->f('Name');
                
    $reset $db->f('Reset');
                        if(
    isnickonline($nick))  $spalva =("style='color:#00FF00;'");
                            else 
    $spalva =("style='color:#CCCCCC;'"); 
                
    $top5content=("$top5content<tr $spalva><td>$skaic</td><td>$nick</td><td>$reset</td></tr><div>");
                
    $skaic++;
                }
        
    $tablewithtops=("<table width='167' border='0' bordercolor='#000000' cellpadding='1' cellspacing='0' style='font:Verdana, Arial, Helvetica, sans-serif; font-size:12px;'>
    <tbody align='center'>
    <tr style='color:#CCCCCC'><th>Nr.</th><th>Nick</th><th>Reset</th></tr>
    $top5content</tbody></table>");
    $smarty->assign('tablewithtops',$tablewithtops); 
    Code to show this table: Add in index.html(the place where you want see this table). P.s. Change this: Stipriausi TOP 10 to what name you want.
    Code:
    <font color="#CCCCCC" ><center><strong>Stipriausi TOP 10</strong></center><br /></font>
    {$tablewithtops}
    <br />
    And you have you TOP Players :busted_co
    And TOP guilds table: Add in index.php
    PHP Code:
    $howmuch 10/* How may top players to show */
    $db = new DB_MSSQL;
        
    $db->query("SELECT TOP $howmuch G_Name,G_Score FROM dbo.Guild ORDER BY G_score desc");
        
    $i2 1;
        
    $db2 = new DB_MSSQL;
    while (
    $db->next_record())
            {
                
    $guild $db->f('G_Name');
                
    $gpoints$db->f('G_Score');
                
    $stabdistrue;
                
    $db2->query("SELECT Name FROM dbo.GuildMember WHERE G_Name='$guild'");
                while(
    $db2->next_record() AND $stabdis){
                            
    $nick $db2->f('Name');
                            if (
    isnickonline($nick)) {$guildon true$stabdis =false;} else $guildon false;
                                            }
                if (
    $guildon$spalva =("style='color:#00FF00;'"); else $spalva =("style='color:#CCCCCC;'");                                            
                
    $top5guildcontent =("$top5guildcontent<tr $spalva><td>$i2</td><td>$guild</td><td>$gpoints</td></tr>");
                
    $i2++;
                }
        
    $topguildtable =("<table width='167' border='0' bordercolor='#000000' cellpadding='1' cellspacing='0' style='font:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#CCCCCC;'>
    <tbody align='center'>
    <tr><th>Nr.</th><th>Guild</th><th>Points</th></tr>
    $top5guildcontent</tbody></table>");
    $smarty->assign('topguildtable',$topguildtable); 
    Code to show this table: Add in index.html(the place where you want see this table)
    Code:
    {$topguildtable}

    And you have you TOP GUILDS :busted_co
    And thats all ;-) hope it works :construct
    Credits: Me.
    Real demo in my signature
    Attached Files Attached Files


  2. #2
    Omega Alfons is offline
    MemberRank
    Apr 2005 Join Date
    5,130Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Approved

  3. #3
    Alpha Member Maxim.T is offline
    MemberRank
    Nov 2006 Join Date
    RussiaLocation
    1,834Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Usefull for people who wanna make new webs :)

  4. #4
    Account Upgraded | Title Enabled! KeBaBniK is offline
    MemberRank
    Jun 2008 Join Date
    КлайпедLocation
    230Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    [ENG] good work 9/10
    [LTU] malacius gera padarei ;) 9/10

  5. #5
    Account Upgraded | Title Enabled! K2NetworK is offline
    MemberRank
    Apr 2008 Join Date
    UkraineLocation
    396Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    nice 10/10

  6. #6
    Enthusiast Reinder'., . is offline
    MemberRank
    Jun 2008 Join Date
    The NetherlandsLocation
    29Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Quote Originally Posted by Alfons View Post
    Approved
    hey, this is the first post I see from Alfons, and I see you are from The Netherlands! =D Nice to meet you =)

    btw, Alfons, your website says a lot about yourself, maybe a little too much..
    anyway, now I know with what types of people I deal with at RZ.. all sick porn people!

    Have a nice day everyone, and Alfons, have a nice wank ;)

  7. #7
    Valued Member SABLE is offline
    MemberRank
    Sep 2005 Join Date
    VENEZUELALocation
    105Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Very good 10/10 Thx

  8. #8
    The Unforgiven III lown04 is offline
    MemberRank
    Nov 2005 Join Date
    Buenos AiresLocation
    283Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Thanks for info! =)

  9. #9
    Valued Member Dovydass is offline
    MemberRank
    Mar 2006 Join Date
    LithuaniaLocation
    109Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Quote Originally Posted by Alfons View Post
    Approved
    Big thanks ;-)

  10. #10
    Valued Member Ale[!] is offline
    MemberRank
    Feb 2008 Join Date
    ArgentinaLocation
    136Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    very good :P

    nice...

  11. #11
    ¯\_(ツ)_/¯ Savage is offline
    LegendRank
    Jun 2008 Join Date
    CampingLocation
    5,476Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Very nice.

  12. #12
    Proficient Member kashak is offline
    MemberRank
    Mar 2006 Join Date
    155Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    nice) tnx)

  13. #13
    Valued Member DenimKo is offline
    MemberRank
    Apr 2008 Join Date
    120Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Good, but need to call library adodb, and use engine snarty, easy to add to mutoolz.

  14. #14
    Valued Member Dovydass is offline
    MemberRank
    Mar 2006 Join Date
    LithuaniaLocation
    109Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    I have a website by lavinelu. I can't make it more easier with the libraries, because I'm just a starter in PHP and MSSQL

  15. #15
    Blacksmith Mu Online systemous is offline
    MemberRank
    Dec 2007 Join Date
    HellLocation
    317Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    how the reset list works? eg if we use autoreset [sql job] are these resets going to be appeared on list or not?

  16. #16
    Mu Master heartagram is offline
    MemberRank
    Jul 2005 Join Date
    LithuaniaLocation
    452Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    nothing special but nice ;)

  17. #17
    Valued Member Dovydass is offline
    MemberRank
    Mar 2006 Join Date
    LithuaniaLocation
    109Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Quote Originally Posted by systemous View Post
    how the reset list works? eg if we use autoreset [sql job] are these resets going to be appeared on list or not?
    If your sql job uses standart dbo.Character table and collumn Reset then it will work ;)

  18. #18
    Member VisualMU is offline
    MemberRank
    Feb 2008 Join Date
    RomaniaLocation
    77Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    plss post the Index i dont know how to make it :( :( :(

  19. #19
    Valued Member -DaSH- is offline
    MemberRank
    May 2008 Join Date
    RomaniaLocation
    124Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Quote Originally Posted by Denied View Post
    Usefull for people who wanna make new webs :)
    people who wanna make new webs should know how to do this because is very easy.

    by the way, nice work at all.

  20. #20
    Apprentice Gaara- is offline
    MemberRank
    Jul 2008 Join Date
    BrazilLocation
    24Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    Omg Nice Nice 10/10

  21. #21
    Account Upgraded | Title Enabled! Krims is offline
    MemberRank
    Apr 2007 Join Date
    225Posts

    Re: [Release] WebScrips To Show TOP 10 People, Guilds, Online GM's

    very good
    10/10 !



Advertisement