About topPK.php Counts

Results 1 to 5 of 5
  1. #1
    Fuck Society eu`CutterEye is offline
    MemberRank
    Mar 2010 Join Date
    d3ath CitYLocation
    252Posts

    shout About topPK.php Counts

    //request


    may anyone share the .php script for TOP PK in your server .
    which is depends in number of kills. during CW time or using force pk (pressing z)..


    thanks co rz mates.. thanks in advance..


  2. #2
    Account Upgraded | Title Enabled! metal666 is offline
    MemberRank
    Sep 2010 Join Date
    532Posts

    Re: About topPK.php Counts


  3. #3
    Fuck Society eu`CutterEye is offline
    MemberRank
    Mar 2010 Join Date
    d3ath CitYLocation
    252Posts
    may you share the .php script ?

    anyone ? please

    may anyone know about my problem for pk counts .. please help , thanks ...
    Last edited by SeiferXIII; 19-02-11 at 03:01 AM.

  4. #4
    FFVIII SeiferXIII is offline
    ModeratorRank
    Sep 2007 Join Date
    SomewhereLocation
    1,961Posts

    Re: About topPK.php Counts

    @eu`CutterEye
    this is it put it on \modules\ save it as toppk.php
    Code:
    <head><script type="text/javascript" src="disableSelect.js"></script></head><?
    require("config.php");
    function getC ($int) {
        if ($int == 1) { $char = "Fighter(M)"; }
        if ($int == 2) { $char = "Kendo(M)"; }
        if ($int == 4) { $char = "Archer(F)"; }
        if ($int == 8) { $char = "QiGong(F)"; }
        if ($int == 16) { $char = "Extreme(M)"; }
        if ($int == 32) { $char = "Extreme(F)"; }
        if ($int == 64) { $char = "Fighter(F)"; }
        if ($int == 128) { $char = "Kendo(F)"; }
        if ($int == 256) { $char = "Archer(M)"; }
        if ($int == 512) { $char = "Shaman(M)"; }
    return $char;
    }
    function getO ($int) {
        if ($int == 0) { $char = "<img src='/images/offline.png'>"; }
        if ($int == 1) { $char = "<img src='/images/online.png'>"; }
    return $char;
    }
    function getG ($int) {
        if ($int == "0") { $char = "NONE"; }
    return $char;
    }
    
    
    $i=0;
    $resTop = mssql_query("SELECT TOP 50 P.ChaName, P.ChaLevel, P.ChaOnline, P.ChaPK2, P.ChaSchool, P.ChaReborn, P.GuNum, P.ChaNum FROM RanGame1.dbo.ChaInfo P, RanUser.dbo.UserInfo U WHERE P.UserNum = U.UserNum AND U.UserType != 30 AND P.ChaDeleted != 1 AND P.ChaPK2 != 0 ORDER BY P.ChaPK2 DESC, P.ChaLevel DESC");
    while($result = mssql_fetch_array( $resTop )) {
    	$i++;		
    
    			$Name = $result["ChaName"];
    			$lev = $result["ChaLevel"];
    			$Reborn = $result["ChaReborn"];
    			$chapk2 = $result["ChaPK2"];
    			$Num = $result["ChaNum"];
    			$ol = $result["ChaOnline"];
    			if($ol == 0) {
    				$ol = getO($ol);
    			}
        			if($ol == 1) {
    				$ol = getO($ol);
    			}
    			$id = $result["GuNum"];
        			if($class == 1) {
    				$class = getC($class);
    			}
        			if($class == 2) {
    				$class = getC($class);
    			}
        			if($class == 4) {
    				$class = getC($class);
    			}
        			if($class == 8) {
    				$class = getC($class);
    			}
        			if($class == 16) {
    				$class = getC($class);
    			}
        			if($class == 32) {
    				$class = getC($class);
    			}
    			if($class == 64) {
    				$class = getC($class);
    			}
        			if($class == 128) {
    				$class = getC($class);
    			}
        			if($class == 256) {
    				$class = getC($class);
    			}
        			if($class == 512) {
    				$class = getC($class);
    			}
        			if($id == 0) {
    				$GuildName = getG($id);
    			}
    
    
    $resTop1 = mssql_query("SELECT GuName from RanGame1.dbo.GuildInfo Where GuNum = '$id' ");
    
    while($result1 = mssql_fetch_array( $resTop1 )) {
    			
    
    			$GuildName = $result1["GuName"];
    
    
    }
    
      			
    
    
    
    
    echo"  						<tr class='li01' height='25'>
    							<td width='112' align='center' style='border-bottom:#CCCCCC 1px dashed'>$i</td>
    							<td width='158' style='border-bottom:#CCCCCC 1px dashed' align='center'>$Name</td>
    							<td width='140' align='center' style='border-bottom:#CCCCCC 1px dashed'>$lev</td>
    							<td width='98' align='center' style='border-bottom:#CCCCCC 1px dashed'>$GuildName</td>
    							<td width='100' align='center' style='border-bottom:#CCCCCC 1px dashed'>$chapk2</td>
    
    							<td width='140' align='center' style='border-bottom:#CCCCCC 1px dashed'>$ol</td>
    </tr>
    
    
    
    
    ";
    
    
    }
    
    ?>
    PS: to create it as http://yoursite/chapk.php

    create a copy of your rank.php, and name it chapk.php then find this code:

    Code:
    <? include_once("modules/rankings.php"); ?>
    change that rankings.php to toppk.php :)
    Last edited by SeiferXIII; 19-02-11 at 03:07 AM.

  5. #5
    Fuck Society eu`CutterEye is offline
    MemberRank
    Mar 2010 Join Date
    d3ath CitYLocation
    252Posts

    Re: About topPK.php Counts

    thanks seifer i will try this one ..

    but do i need to add column in my dbase? or not ?


    i got error


    Code:
    Warning: mssql_query(): Unable to connect to server: (null) in C:\Program Files\Abyss Web Server\htdocs\rancp1\toppk.php on line 28
    
    Warning: mssql_query(): A link to the server could not be established in C:\Program Files\Abyss Web Server\htdocs\rancp1\toppk.php on line 28
    
    Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in C:\Program Files\Abyss Web Server\htdocs\rancp1\toppk.php on line 29
    Last edited by eu`CutterEye; 21-02-11 at 08:51 AM.



Advertisement