Jump to content

Script - Rank PvP/Pk


Recommended Posts

Ola! Senhores trazendo aqui para vocês e Script simples para os Senhores

O Código está no spoiler

 

Configuração [Configs.php]

 

<?php

## Dados de conexão com o servidor
$host = 'localhost'; // endereço onde o servidor estiver hospedado (se for na mesma máquina do site, use 'localhost', se for num vps, use o IP)
$user = 'root'; // usuário do mysql - padrão: root
$pass = ''; // senha do mysql
$db = 'SEU BANDO DE DADOS'; // database usada - padrão: l2jdb
$mysqlport = 3306; // porta mysql - padrão: 3306


/* NÃO MEXA NAS 3 PRÓXIMAS LINHAS */
$pdo = new PDO("mysql:host=$host;dbname=$db", "$user", "$pass"); 
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
if(!$pdo) { echo "Houve uma falha ao conectar com o servidor."; exit(); }


## TOPS PVP / PK
//limite de chars que aparecerão nos TOPS
$limit = 50; // padrão 50


## GMT
$gmt = 0; // Se o site estiver informando um horário adiantado ou atrasado, altere o GMT. Exemplo: -1 (-1 hora), +3 (+3 horas) e etc


?> 

 

 

 

Rank PvP

 

 

<?php
session_cache_expire(5);
session_start();
error_reporting(E_ALL);
date_default_timezone_set('America/Sao_Paulo');
require_once 'configs.php';
?>
<html>
<title>Ranking PvP</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="L2-Windows">
<meta name="description" content="Feito para L2JBRASIL Proibido e vendo desse script.">
<style>
.l2-windows-tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center;font-family:Segoe UI Light}
.l2-windows-xxlarge{font-size:20px;border-radius:8px!important}
.l2-windows-xxlarge2{font-size:25px;border-radius:8px!important}
.l2-windows-blue,.l2-windows-hover-blue:hover{color:#fff!important;background-color:#2196F3!important}
.l2-windows-amber,.l2-windows-hover-amber:hover{color:#000!important;background-color:#ffc107!important}
.l2-windows-padding{padding:8px 16px!important}
.l2-windows-ul{list-style-type:none;padding:0;margin:0}
.l2-windows-ul.l2-windows-hoverable li:hover{background-color:#ccc}
.l2-windows-ul{list-style-type:none;padding:0;margin:0}
.l2-windows-ul li{padding:8px 16px;border-bottom:1px solid #ddd}
.l2-windows-ul li:last-child{border-bottom:none}
.l2-windows-card-4,.l2-windows-hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.10)}
.l2-windows-padding-16{padding-top:16px!important;padding-bottom:15px!important}
.l2-windows-right-align{text-align:right!important}
.l2-windows-right{float:right!important}
.l2-windows-left-align{text-align:left!important}
.l2-windows-left{float:left!important}
.l2-windows-large{font-size:24px;font-family:Segoe UI Light;font-weight:bold;!important}
.l2-windows-small{font-size:15px;font-family:Segoe UI Light}
.l2-windows-container:after,.l2-windows-container:before,.l2-windows-panel:after,.l2-windows-panel:before,.l2-windows-row:after,.l2-windows-row:before,.l2-windows-row-padding:after,.l2-windows-row-padding:before,
.l2-windows-container,.l2-windows-panel{padding:0.01em 16px}.l2-windows-panel{margin-top:16px;margin-bottom:16px}
.l2-windows-teal,.l2-windows-hover-teal:hover{color:#fff!important;background-color:#009688!important}
.l2-windows-tiny{font-size:10px!important}
.center {
    margin: auto;
    width: 60%;
    padding: 10px;
}
</style>
</head>
<body>
		<?php
			$ij	 = 1;
			$tpvp = $pdo->query("SELECT C.char_name, C.pvpkills, CL.clan_name FROM characters C
				LEFT JOIN clan_data CL ON CL.clan_id = C.clanid
				WHERE C.accesslevel = 0 ORDER BY C.pvpkills DESC LIMIT $limit");
			while($l = $tpvp->fetch(PDO::FETCH_OBJ)){	
		?>
<table class="center" style="width:60%">
  <tr>
    <td>
    <ul class="l2-windows-ul l2-windows-card-4">
  <li class="l2-windows-padding-16">
    <span class="l2-windows-xlarge l2-windows-right"><span class="l2-windows-tag l2-windows-padding l2-windows-xxlarge l2-windows-blue"><span class="l2-windows-tiny">PVP</span><br /><?php if($l->pvpkills > 0) { echo $l->pvpkills; } else { echo "0"; } ?></span></span>
		<span class="l2-windows-xlarge l2-windows-left"><span class="l2-windows-tag l2-windows-padding l2-windows-xxlarge2 l2-windows-amber"><?php echo $ij . " ยบ "; ?></span>  </span></span>
    <span class="l2-windows-large"><?php echo $l->char_name; ?></span><br>
    <span class="l2-windows-small">Clan: <?php if($l->clan_name == '') { echo "-"; } else { echo $l->clan_name; } ?></span>
  </li>
</ul>
    
    </td>
  </tr>
</table>
		<?php
		$ij++;
		}
		?>
</body>
</html> 

 

 

 

Rank Pk

 

 

<?php
session_cache_expire(5);
session_start();
error_reporting(E_ALL);
date_default_timezone_set('America/Sao_Paulo');
require_once 'configs.php';
?>
<html>
<title>Ranking PvP</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="L2-Windows">
<meta name="description" content="Feito para L2JBRASIL Proibido e vendo desse script.">
<style>
.l2-windows-tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center;font-family:Segoe UI Light}
.l2-windows-xxlarge{font-size:20px;border-radius:8px!important}
.l2-windows-xxlarge2{font-size:25px;border-radius:8px!important}
.l2-windows-blue,.l2-windows-hover-blue:hover{color:#fff!important;background-color:#2196F3!important}
.l2-windows-amber,.l2-windows-hover-amber:hover{color:#000!important;background-color:#ffc107!important}
.l2-windows-red,.l2-windows-hover-amber:hover{color:#fff!important;background-color:#ff0000!important}
.l2-windows-padding{padding:8px 16px!important}
.l2-windows-ul{list-style-type:none;padding:0;margin:0}
.l2-windows-ul.l2-windows-hoverable li:hover{background-color:#ccc}
.l2-windows-ul{list-style-type:none;padding:0;margin:0}
.l2-windows-ul li{padding:8px 16px;border-bottom:1px solid #ddd}
.l2-windows-ul li:last-child{border-bottom:none}
.l2-windows-card-4,.l2-windows-hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.10)}
.l2-windows-padding-16{padding-top:16px!important;padding-bottom:15px!important}
.l2-windows-right-align{text-align:right!important}
.l2-windows-right{float:right!important}
.l2-windows-left-align{text-align:left!important}
.l2-windows-left{float:left!important}
.l2-windows-large{font-size:24px;font-family:Segoe UI Light;font-weight:bold;!important}
.l2-windows-small{font-size:15px;font-family:Segoe UI Light}
.l2-windows-container:after,.l2-windows-container:before,.l2-windows-panel:after,.l2-windows-panel:before,.l2-windows-row:after,.l2-windows-row:before,.l2-windows-row-padding:after,.l2-windows-row-padding:before,
.l2-windows-container,.l2-windows-panel{padding:0.01em 16px}.l2-windows-panel{margin-top:16px;margin-bottom:16px}
.l2-windows-teal,.l2-windows-hover-teal:hover{color:#fff!important;background-color:#009688!important}
.l2-windows-tiny{font-size:10px!important}
.center {
    margin: auto;
    width: 60%;
    padding: 10px;
}
</style>
</head>
<body>
		<?php
			$ij	 = 1;
			$tpvp = $pdo->query("SELECT C.char_name, C.pkkills, CL.clan_name FROM characters C
				LEFT JOIN clan_data CL ON CL.clan_id = C.clanid
				WHERE C.accesslevel = 0 ORDER BY C.pkkills DESC LIMIT $limit");
			while($l = $tpvp->fetch(PDO::FETCH_OBJ)){	
		?>
<table class="center" style="width:60%">
  <tr>
    <td>
    <ul class="l2-windows-ul l2-windows-card-4">
  <li class="l2-windows-padding-16">
    <span class="l2-windows-xlarge l2-windows-right"><span class="l2-windows-tag l2-windows-padding l2-windows-xxlarge l2-windows-red"><span class="l2-windows-tiny">PK</span><br /><?php if($l->pkkills > 0) { echo $l->pkkills; } else { echo "0"; } ?></span></span>
		<span class="l2-windows-xlarge l2-windows-left"><span class="l2-windows-tag l2-windows-padding l2-windows-xxlarge2 l2-windows-amber"><?php echo $ij . " ยบ "; ?></span>  </span></span>
    <span class="l2-windows-large"><?php echo $l->char_name; ?></span><br>
    <span class="l2-windows-small">Clan: <?php if($l->clan_name == '') { echo "-"; } else { echo $l->clan_name; } ?></span>
  </li>
</ul>
    
    </td>
  </tr>
</table>
		<?php
		$ij++;
		}
		?>
</body>
</html> 

 

 

Veja a Demostração: online

JE918rr.png

 

Crédito: @L2-Windows

Fonte de pesquisa: Scripts, Sistemas e Paineis & CSS

Edited by L2-Windows
  • Like 7
Link to comment
Share on other sites


  • 2 weeks later...

Maaano, muitoo dahora,

 

So estou tendo dificuldades para diminuir os quadradinhos, tem como explicar?

 

Fica uma especie de UU proximo ao numero da posição do cabra.

 

 

 

EDIT.

 

RESOLVI.

Edited by LegendFlavioBR

Tento te abandonar, mas Lineage 2 vc eh meu inicio, meu fim e meu meio.

Link to comment
Share on other sites

  • 3 weeks later...
  • 8 months later...



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.