• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Modern AAC] Top guild kills

Shikate

Pixel Artist since 2011
Joined
Mar 30, 2011
Messages
404
Reaction score
838
Location
Poland
Hi, I edited script by Kavvson. Now it's showing guilds with highest ammount of kills. Use this as injection.

PHP:
<?php 
################################################################################# 
##                            CONFIGURATION PAGE                               ## 
################################################################################# 
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                  # 
## ---------------------------------------------------------------------------- # 
## Script created by  Kavvson (http://otland.net/members/kavvson/) and MiPo91   # 
## Author & developer:  MiPo91 and Kavvson                                      # 
##                                                                              # 
## Helpers:                    MiPo91      <http://www.otland.net>              #
## Edited by: Kuzirashi                                                         #
################################################################################# 
######################## 
##      Connection    ## 
######################## 
## Leave these values ## 
######################## 
$ots = POT::getInstance(); 
$ots->connect(POT::DB_MYSQL, connection()); 
$SQL = $ots->getDBHandle(); 

echo'<div class="message"><div class="title">Most Powerful Guilds</div>    <div class="content"> 
                     
<table border="0" cellspacing="3" cellpadding="4" width="100%"> 
    <tr>'; 
$i = 0;
foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,
    `g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`
    FROM `killers` k
    LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
    LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
    LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
    LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
   WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
    GROUP BY `name`
    ORDER BY `frags` DESC, `name` ASC
    LIMIT 0, 3;') as $guild)
{
    $i++;
        echo ' 
             <td style="padding-right:20px;padding-top:3px" align="center"> 
                
                <a href="'.WEBSITE.'/index.php/guilds/view/' . $guild['id'] . '"><img src="'.WEBSITE.'/public/images/'. $i  .'.png" width="90" height="90" border="0"/> 
                <br /><b>' . $guild['name'] . '</b></a><br />' . $guild['frags'] . ' kills<br /> 
            </td>'; 
    } 
echo'    </tr> 
</table>'; 
    if(empty($i)) { 
        echo "<center><font color='red'>There is no guilds yet.</font></center>"; 
    } 
echo "</div>"; 
echo "</div><br/>"; 
?>

Screen:
guilds.png
 
nice job but i had error and fixed it by this code

ALTER TABLE `guilds` ADD `description` TEXT NOT NULL DEFAULT "";
ALTER TABLE `guilds` ADD `logo_gfx_name` VARCHAR( 255 ) NOT NULL DEFAULT "";
 
Back
Top