Jump to content

[Modern] Top Guild Rating


diarmaint

Recommended Posts

Consegui em outro forum.  como não achei aqui, decidi postar,

Como colocar top guild points no modern (pelo que pude perceber a soma dos pontos são a soma da exp dos chars na guild.

wk4aww.jpg

Versão Testada Modern acc v03 Avuenja.

Sem mais delongas

abra \injections\home e crie uma nova pasta chamada guildpoints Dentro dela crie um arquivo e renomeie para 

 

Cole isso dentro de injections.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>              #

#################################################################################

########################

##      Connection    ##

########################

## Leave these values ##

########################

$ots = POT::getInstance();

$ots->connect(POT::DB_MYSQL, connection());

$SQL = $ots->getDBHandle();

 

echo'<div class="message"><div class="title">Top Guild Points</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`,

            SUM(`p`.`level`) AS `level`,

            COUNT(`p`.`name`) AS `count`,

            AVG(`p`.`level`) AS `average`,

            MIN(`p`.`level`) AS `min`,

            MAX(`p`.`level`) AS `max`

        FROM `players` p

            LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`

            LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`

        WHERE `g`.`id` = `g`.`id`

        GROUP BY `name`

        ORDER BY `level` DESC

        LIMIT 3

    ') as $guild)

    {

        $Points = $guild['level'] + $guild['count'] + round($guild['average']) + $guild['min'] + $guild['max'];

        echo '

             <td style="padding-right:20px;padding-top:3px" align="center">

                Top Rating :

        <p style="color:#336600;display:inline;padding: 0 0 3px 0;font-weight: bold;">'.$Points.'</p>

                <a href="'.WEBSITE.'/index.php/guilds/view/' . $guild['id'] . '"><img src="'.WEBSITE.'/public/images/gp/'. $i = $i + 1 .'.png" width="90" height="90" border="0"/>

                <br /><b>' . $guild['name'] . '</b></a><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/>";

?>
 

 

 

Por fim baixe  esse aquivo que contem as imagens,  extraia o arquivo gp dentro da pasta \public\images\

 

Download

Citar

 

Scan- 

 

Citar

 

Creditos, 

kavvson< otland

Eu < por trazer até fórum.

 

Edited by diarmaint
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...