Welcome to the RaGEZONE - MMORPG development forums.

Unique Ranking [PHP]

This is a discussion on Unique Ranking [PHP] within the SilkRoad Releases forums, part of the SilkRoad Online category; Hey Guys, This My First Release :) Now Starting :) I <3 Ragezone :) Table Codes :) Code: CREATE TABLE ...

Results 1 to 13 of 13
  1. #1
    Newbie
    Rank
    Member
    Join Date
    Sep 2011
    Posts
    4
    Liked
    8

    Unique Ranking [PHP]

    Click
    Hey Guys,
    This My First Release :)

    Now Starting :)

    I <3 Ragezone :)
    Table Codes :)
    Code:
    CREATE TABLE [dbo].[killl](
    	[name] [varchar](50) NULL,
    	[uniq] [varchar](50) NULL,
    	[tarih] [varchar](50) NULL
    ) ON [PRIMARY]
    PHP Code:
    <?php

    // Here Mssql Connects 



        
    $sqltb "dbo.Killl"// Table Name
        
    $query $mssql->dbQuery("TRUNCATE TABLE $sqltb");


    $todaydate=@date("Y-m-d");

    $dosya fopen("c:\\Users\\Administrator\\Desktop\\BlackRogue+Package\\server\\Server\\".$todaydate."_FatalLog.txt""r");
    // Here Server Path :) or Gameserver Path




    while( ! feof($dosya) ) {

    $yaz fgets($dosya);
    $server=substr($yaz,20,15);

        if(
    $server=="[SR_GameServer]"){
        
    $uniquekilled=substr($yaz,36,22);
            if(
    $uniquekilled=="Unique Monster Killed!"){
            
    $uniquekilleds=substr($yaz,36,22);
               if(
    $uniquekilleds=="Unique Monster Killed!"){
                
    $data=substr($yaz,0,10);
                
    $hora=substr($yaz,11,8);
                
                
    $minutos=substr($hora,3,2);
                
    $hora=substr($hora,0,2);
                
    $minutos=(int)$minutos+(60*(int)$hora);
                
    $passou=$agoram-$minutos;
                
    $fimpos=strrpos($yaz,"]",66);
                
    $fimpos=$fimpos-66;
                
    $uniquestr=substr($line,66,$fimpos);
                
    $fimpos=strrpos($uniquestr,"]");
                
    $unique=substr($uniquestr,0,$fimpos);
                
    $fimpos+=6;
                
    $char=substr($uniquestr,$fimpos,20);
              list(
    $tarih$saat $game$uniq$monster$killed$uniqadi$by$kill) = explode(" "$yaz);
              
    $uniqueadi explode(" ",$yaz);
              list (
    $perf$log) = explode("["$killed);
    list (
    $perfs$logs) = explode("]"$log);
    list (
    $tarihh$game$zaman$time) = explode("[SR_GameServer]"$tarih);
    list (
    $tarihp$saat) = explode("$todaydate"$tarihh);


    if (
    $uniq == "UNIQUE[MOB_RM_TAHOMET]"){

    $uniq "Demon Shaitan";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif (
    $uniq == "UNIQUE[MOB_TK_BONELORD]"){

    $uniq "Lord Yarkan";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif (
    $uniq == "UNIQUE[MOB_AM_IVY]"){

    $uniq "Captain IVY";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");

    }elseif (
    $uniq == "UNIQUE[MOB_OA_URUCHI]"){

    $uniq "Uruchi";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif (
    $uniq == "UNIQUE[MOB_EU_KERBEROS]"){

    $uniq "Cerberus";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }
    elseif (
    $uniq == "UNIQUE[MOB_KK_ISYUTARU]"){

    $uniq "Isyutaru";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif (
    $uniq == "UNIQUE[MOB_CH_TIGERWOMAN]"){

    $uniq "Tiger Girl";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }elseif(
    $uniq == "UNIQUE[MOB_FW_TAESE_100]"){

    $uniq "Tai Sui(100 LvL)";

    $query $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
    }


    }}





    }}





    fclose($dosya);?>
    <div class="page-body newsblock">
        <div class="news-title">
            Unique Ranking
        </div>
        <table style="border:1px solid #3f3f3f; border-radius: 8px 8px 8px 8px;padding: 4px;background-color:rgba(50,50,50,0.55);text-align:center;color: #fff;font-weight: bold; font-family: Arial, Helvetica, sans-serif;font-size:12px;" width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);"></td>
                <td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Killer</td>
                <td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Uniq Name</td>
                <td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Date</td>
            </tr>
            <?php
                $rank 
    $mssql->dbQuery("SELECT top 50 * FROM $sqltb ORDER BY tarih desc");
                
    $place 1;
                while(
    $row sqlsrv_fetch_array($rankSQLSRV_FETCH_ASSOC)) {
                    echo 
    '<tr>';
                    echo 
    '<td style="border:1px solid #3f3f3f;">'.$place.'</td>';
                    echo 
    '<td style="border:1px solid #3f3f3f;">'.$row['name'].'</td>';
                    echo 
    '<td style="border:1px solid #3f3f3f;">'.$row['uniq'].'</td>';    
                    echo 
    '<td style="border:1px solid #3f3f3f;">'.$row['tarih'].'</td>';
                    echo 
    '</tr>';
                    
    $place ++;
                }
                
    sqlsrv_free_stmt($rank);
            
    ?>
        </table>

  2. #2
    Hardcore Member
    Rank
    Member
    Join Date
    Sep 2011
    Posts
    129
    Liked
    4

    Re: Unique Ranking [PHP]

    nice one keep it up

  3. #3
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Aug 2010
    Posts
    210
    Liked
    112

    Re: Unique Ranking [PHP]

    actually this means when each one go on that page it will get executed and the player will get new points lol you're making it too complex here is snippet of code

    if($server=="[SR_GameServer]"){
    $uniquekilled=substr($line,36,22);
    if($uniquekilled=="Unique Monster Killed!"){
    $pos=strrpos($line,"]",66);
    $pos=$pos-66;
    $uniquestr=substr($line,66,$pos);
    $pos=strrpos($uniquestr,"]");
    $unique=substr($uniquestr,0,$pos);
    $pos+=6;
    $char=substr($uniquestr,$pos,20);
    getUniqueKills($unique,$char);

    }

    }

  4. #4
    Banned
    Rank
    Banned
    Join Date
    Oct 2011
    Location
    Alexandria, Egy
    Posts
    290
    Liked
    158

    Re: Unique Ranking [PHP]

    Fatal error: Call to a member function dbQuery() on a non-object in C:\AppServ\www\uniqueranking.php on line 8

    Line 8= $query = $mssql->dbQuery("TRUNCATE TABLE $sqltb");

  5. #5
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Jan 2012
    Posts
    254
    Liked
    28

    Re: Unique Ranking [PHP]

    this is working good (the rank itself)
    but i get those :

    Notice: Undefined variable: agoram in C:\xampp\htdocs\mod\uniquekill.php on line 32

    Notice: Undefined variable: line in C:\xampp\htdocs\mod\uniquekill.php on line 35

    Notice: Undefined offset: 8 in C:\xampp\htdocs\mod\uniquekill.php on line 40

    Notice: Undefined offset: 7 in C:\xampp\htdocs\mod\uniquekill.php on line 40

    Notice: Undefined offset: 6 in C:\xampp\htdocs\mod\uniquekill.php on line 40

    hundreds of those.. and in the bottom the ranking (does work!)

    anyway to remove those errors ?

  6. #6
    Registered
    Rank
    Member
    Join Date
    Feb 2012
    Posts
    8
    Liked
    1

    Re: Unique Ranking [PHP]

    to remove php errors fix them or dirty-fix them by putting this into your script:

    error_reporting(0);

    have fun =)

  7. #7
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Jan 2012
    Posts
    254
    Liked
    28

    Re: Unique Ranking [PHP]

    well , that's what i did - but still those errors not coming from no where.. , they must be there because something is **** up..

    i would love to know how to fix them :D

    i already got rid for few of them by removing not decleared data.

  8. #8
    asi
    Member
    Rank
    Member
    Join Date
    Dec 2011
    Posts
    59
    Liked
    0

    Re: Unique Ranking [PHP]

    help error

    Fatal error: Call to a member function dbQuery() on a non-object in C:\AppServ\www\index.php on line 8

  9. #9
    Member
    Rank
    Member
    Join Date
    Feb 2012
    Posts
    38
    Liked
    1

    Re: Unique Ranking [PHP]

    Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 7

    Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 7

    Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 59

    Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 59

    Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 75

    Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 75

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\AppServ\www\rank\rank.php on line 75



    Guys help to fix this lines.
    Whats the wrongs with php codes?

  10. #10
    Member
    Rank
    Member
    Join Date
    Aug 2007
    Posts
    35
    Liked
    0

    Re: Unique Ranking [PHP]

    Fatal error: Call to a member function dbQuery() on a non-object in C:\AppServ\www\index.php on line 8

    how can i fix this?

  11. #11
    Member
    Rank
    Member
    Join Date
    Feb 2012
    Posts
    88
    Liked
    4

    Re: Unique Ranking [PHP]

    its not working for me :(

  12. #12
    Newbie
    Rank
    Member
    Join Date
    Apr 2012
    Posts
    1
    Liked
    0

    Re: Unique Ranking [PHP]

    I need Asp Versiyon pls help me

  13. #13
    Member
    Rank
    Member
    Join Date
    Aug 2007
    Posts
    35
    Liked
    0

    Re: Unique Ranking [PHP]

    so almost work now... change the "$mssql->dbQuery" to "mssql_query" and the db errors gone. One thing i can't understand. What is this: Notice: Undefined variable: line? "$line" is not defined? o.O

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •