OTHispano
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

Ir abajo
Texzherox
Texzherox
Diseñador Web
Mensajes Mensajes : 23
http://pokextreme.sytes.net

[Modern AAC] Advanced Server Info Empty [Modern AAC] Advanced Server Info

Vie Sep 30, 2011 11:57 am
Reputación del mensaje :100% (1 voto)
[Modern AAC] Advanced Server Info 2vw8wuh

Este asombroso script muestra la información esencial de tu OT. Solo debes poner la direccion del directorio de tu OT para hacer que funcione! El script carga las informaciones a partir de tres de los archivos del server.

Crear nuevo script en /system/pages/info.php
Código:
<?php
  ###############################################
#*  Advanced Server Info Page for Modern AAC  *#
#*  Scripted by Cybermaster(CyberM, Cybershot)  *#
#*  © OTLand.NET Home of TheForgottenServer  *#
  ###############################################

if(!defined('BASEPATH')) exit('No direct script access allowed');

//LOAD SERVER DIRECTORY, SET YOURS HERE
$DIR = 'C:/otserv/';
   
//LOAD FILES TO READ
if(is_dir($DIR)) {
    $config = parse_ini_file($DIR.'/config.lua');
    $client = simplexml_load_file($DIR.'/data/XML/servers.xml');
    $stages = simplexml_load_file($DIR.'/data/XML/stages.xml');
   
//BAN FOR KILLING
    $kill_length = explode('*', $config['killsBanLength']);
    $kill_length = $kill_length[0].(count($kill_length) == 4 ? ' days' : ' hours');
    $kill_daily = is_numeric($config['dailyFragsToBanishment']) ? $config['dailyFragsToBanishment'] : $config['dailyFragsToRedSkull'];
    $kill_weekly = is_numeric($config['weeklyFragsToBanishment']) ? $config['weeklyFragsToBanishment'] : $config['weeklyFragsToRedSkull'];
    $kill_monthly = is_numeric($config['monthlyFragsToBanishment']) ? $config['monthlyFragsToBanishment'] : $config['monthlyFragsToRedSkull'];
   
//SKULLS && FRAGS
#White Skull Time
    $white_time = explode('*', $config['whiteSkullTime']);
    $white_time = $white_time[0].(count($white_time) == 3 ? ' minutes' : ' seconds');
#Red Skull Length
    $red_length = explode('*', $config['redSkullLength']);
    $red_length = $red_length[0].(count($red_length) == 4 ? ' days' : ' hours');
#Black Skull Length
    $black_length = explode('*', $config['blackSkullLength']);
    $black_length = $black_length[0].(count($black_length) == 4 ? ' days' : ' hours');
#Black Skull Frags
    $black_daily = is_numeric($config['dailyFragsToBlackSkull']) ? $config['dailyFragsToBlackSkull'] : $config['dailyFragsToRedSkull'];
    $black_weekly = is_numeric($config['weeklyFragsToBlackSkull']) ? $config['weeklyFragsToBlackSkull'] : $config['weeklyFragsToRedSkull'];
    $black_monthly = is_numeric($config['monthlyFragsToBlackSkull']) ? $config['monthlyFragsToBlackSkull'] : $config['monthlyFragsToRedSkull'];

//OTHER
    $idle = explode('*', $config['idleKickTime']);   
    $pz_lock = explode('*', $config['pzLocked']);
    $v1 = intval($client->server['versionMin']);
    $v2 = intval($client->server['versionMax']);
    if($v1 == $v2)
        {
            $version = str_split($v1);
            $version = $version[0].'.'.$version[1].$version[2];
        }
    else
        {
            $v1 = str_split($v1);
            $v2 = str_split($v2);
            $version = $v1[0].'.'.$v1[1].$v1[2].'~'.$v2[0].'.'.$v2[1].$v2[2];
        }

    echo '<span class="servername"><center>'.$config['serverName'].'</center></span>
        <span class="title">General Information</span><br/>
        <ul class="list">
            <li><span class="subTitle">IP: </span>'.$_SERVER['HTTP_HOST'].'</li>
            <li><span class="subTitle">Port: </span>'.$config['loginPort'].'</li>
            <li><span class="subTitle">Client: </span>'.$version.'</li>
            <li><span class="subTitle">World Type: </span><span class="cap">'.$config['worldType'].'</span></li>
            <li><span class="subTitle">Message of the Day: </span>'.$config['motd'].'</li>
            <li><span class="subTitle">Idle Kick time: </span>'.$idle[0].' minutes</li>
            <li><span class="subTitle">PZ Lock time: </span>'.$pz_lock[0].' seconds</li>
            <li><span class="subTitle">Protection Level: </span>'.$config['protectionLevel'].'</li>
            <li><span class="subTitle">Required Level to Buy House: </span>'.$config['levelToBuyHouse'].'</li>
        </ul>

        <br/><span class="title">Rates</span>
        <ul class="list">
            <li><span class="subTitle">Experience: </span>'.floor($config['rateExperience']).'x |
            <span class="subTitle">Skill: </span>'.floor($config['rateSkill']).'x |
            <span class="subTitle">Magic: </span>'.floor($config['rateMagic']).'x |
            <span class="subTitle">Loot: </span>'.floor($config['rateLoot']).'x</li>
        </ul>
       
        <br/><span class="title">Frags</span>
        <ul class="list">
            <li><span class="subTitle">White Skull Time: </span>'.$white_time.'</li>
            <li><span class="subTitle2">Red Skull</span>
                <p style="text-indent:15px;">
                    <span class="subTitle">Length:</span> '.$red_length.'
                    <span class="subTitle">Frags(Daily: </span>'.$config['dailyFragsToRedSkull'].' | <span class="bold">Weekly: </span>'.$config['weeklyFragsToRedSkull'].' | <span class="bold">Monthly: </span>'.$config['monthlyFragsToRedSkull'].'<span class="bold">)</span></p></li>';
       
    if ($config['useBlackSkull'])
        echo'<li><span class="subTitle2">Black Skull</span>
                <p style="text-indent:15px;">
                    <span class="subTitle">Length: </span>'.$black_length.'
                    <span class="subTitle">Frags(Daily: </span>'.$black_daily.' | <span class="bold">Weekly: </span>'.$black_weekly.' | <span class="bold">Monthly: </span>'.$black_monthly.'<span class="bold">)</span></li>';   
        echo'<li><span class="subTitle2">Banishment for Killing</span>
                <p style="text-indent:15px;">
                    <span class="subTitle">Length: </span>'.$kill_length.'
                    <span class="subTitle">Frags(Daily: </span>'.$kill_daily.' | <span class="bold">Weekly: </span>'.$kill_weekly.' | <span class="bold">Monthly: </span>'.$kill_monthly.'<span class="bold">)</span></li>           
        </ul>';

    if ($config['experienceStages']) {
        echo'<br/><span class="title">Experience Stages</span><ul class="list">';
        foreach($stages->world->stage as $stage => $value)
            echo '<li><span class="subTitle">Level</span> '.$value['minlevel'].($value['maxlevel'] != '' ? '~'.$value['maxlevel'] : ' onwards').': <span class="bold">'.$value['multiplier'].'x</span><br/>';
    }   
}
else{alert('Error loading data. Directory address must be valid.');}?>

<style type="text/css">     
    .servername {
        color: white;
        font-family: Garamond;
        font-size: 60px;
        line-height: 60px;
        text-shadow: black 0.1em 0.1em 0.2em
    }
   
    .bold {
        font-weight: bold;
    }
   
    .cap {
        text-transform: capitalize;
    }
   
    .list {
        list-style-type:square;
    }
   
    .title {
        font-family: Garamond;
        font-size: large;
        font-weight: bold;
    }   
    .subTitle {
        font-weight: bold;
        list-style-type:square;
    }
  .subTitle2 {
        font-weight: bold;
        text-decoration:underline;
        list-style-type:square;
    }
</style>

En el script, poner la direccion de la carpeta del server en:

Código:
//LOAD SERVER DIRECTORY, SET YOURS HERE
$DIR = 'C:/otserv/';

La direccion sera: http://localhost//index.php/p/v/info
Si no usan Black Skull ó Exp Stages no saldrán en la página.

SI TE GUSTO O TE SIRVIO DAME ++REP!
Falcon
Falcon
Administrador
Mensajes Mensajes : 350
http://www.othispano.net

[Modern AAC] Advanced Server Info Empty Re: [Modern AAC] Advanced Server Info

Vie Sep 30, 2011 12:08 pm
Muy Buena(; Te dejo rep :B
Volver arriba
Permisos de este foro:
No puedes responder a temas en este foro.