Jump to content
  • Announcements

    • Xmat

      Pravidlo pro postování v TTT

      Do sekce Tipy, triky, tutoriály nepatří žádné dotazy.   Postujte sem vaše návody, tipy a různé další věci jež uznáte za vhodné sdělit zdejšímu osazenstvu, ale veškeré dotazy směřujte do sekce Všeobecná diskuse.
    • Replik

      Seznam návodů a důležitých témat v této sekci

      Pro lepší přehlednost jsem vytvořil tento seznam, který vás, méně zkušené, lépe provede touto sekcí. Věřím, že zde najdete, co hledáte. Vypsané jsou návody, které jsou oficiálně uznané jako návody. Běžné diskuze, které neposkytují postupy a rady zvěřejněny nejsou.   Instalace vlastního MaNGOS Serveru Díky těmto návodům budete (měli by jste být) schopni vytvořit a následně spustit váš vlastní server. Nastavení je pro verze s i bez datadisku.   Instalace MaNGOS Serveru (bez datadisku TBC) - Autor Benny Instalace MaNGOS Serveru (s datadiskem TBC) - Autor Malfik Instalace MaNGOS Serveru v prostředí Linux - Autor charlie Instalace MaNGOS Serveru v prostředí Linux - Autor kupkoid   Chyby a jejich řešení při přihlašování k serveru - Autor Cybe   Zálohování uživatelských dat   Dávkový soubor (BAT soubor) pro vytvoření SQL záloh - Autor Replik   Kompilování - tvoření vlastních release (revizí)   Tvorba kompilací pro Win32 (MangoScript) - Autor bLuma   Ostatní - těžko zařaditelné, ale neznamená to, že nejsou dobré   VIP Systém - Autor charlie Tvorba Webových stránek pro MaNGOS - Autor zahuba Tvorba teleportačních NPC (MangoScript) - Autor Replik Registrační web (původně předělaná SPORA) Funkční pro Antrix i MaNGOS - Autor Replik Nastavení a spuštění Minimanager pro MaNGOS - Autor BlackMartin Nastavení MaNGOS Website - Autor Artorius   Samozřejmě jsou zde i jiné návody, ale tyto jsou nejvíce používané, proto věřím, že vám budou nápomocné. Tuto sekci budeme upravovat podle potřeby. Pokud by jste něco nenašli nebo si nevěděli rady, hledejte na fóru a teprve potom založte vlastní topik. Pokud nějaký autor vytvoří kvalitní návod a chtěl by ho zveřejnit i v tomto seznamu, doporučuji, aby mi napsal zprávu skrze PM.   Díky a přeji hezký den na WoWResource   Replik
    • Aristo

      Příspěvky tam, kde nemají co dělat

      Dodržujte zákaz přispívání do topiků s repaky pokud si to zakladatelé nepřejí!! Opakované psaní příspěvků bude trestáno warnem.
    • Aristo

      Používání spoilerů

      Poslední dobou má většina uživatelů fora zvláštní nutkání postovat extrémně dlouhé texty nebo kódy, které zabírají v nejedenom případu i 80% obsahu celé stránky a hodně tak zvedají nepřehlednost v topiku. Chtěl bych všechny uživatele požádat, aby při postování citací, jakýchkoliv kódů, errorů, atp... delších než 30 řádků používali funkci spoileru.   Funkci vyvoláte příkazem [spoiler] text [/spoiler]   Ukázka:  
Sign in to follow this  
Benny

[MaNGOS] RoSPORA status list (full + uprava)

Recommended Posts

RoSPORA ke stazeni ZDE - jiz obsahuje cryptovani hesla

 

Upravil jsem trochu kod v index.php pro ty co pouzivaji RoSPORA status

 

jedna se o nezobrazovani hracu ve statusu s GMlvlem vetsim nez 0

 

je to moje prvni vec co jsem v php dokazal tak se mi nesmejte :)

 

nahradte

function make_players_array(){
    global $host, $user, $password, $db, $database_encoding, $pl_array;
$i=0;
    $mangos_db = new DBLayer($host, $user, $password, $db);
    $mangos_db->query("SET NAMES $database_encoding");
    $query = $mangos_db->query("SELECT * FROM `character` WHERE `online`='1' ORDER BY `name`");
    while($result = $mangos_db->fetch_assoc($query))
    {
        $char_data = explode(' ',$result['data']);
        $char_gender = dechex($char_data[36]);
        $char_gender = str_pad($char_gender,8, 0, STR_PAD_LEFT);
        $char_gender = $char_gender{3};
        $res_pos=get_zone_name($result['map'], $result['position_x'], $result['position_y']);

$pl_array[$i] = Array($result['name'], $result['race'], $result['class'], $char_data[34], $res_pos, $char_gender);
$i++;
    }
    $mangos_db->close();
    unset($mangos_db);
return $i;
}

 

za

 

function make_players_array(){
    global $host, $user, $password, $db, $dbr, $database_encoding, $pl_array;
$i=0;
    $mangos_db = new DBLayer($host, $user, $password, $db);
    $mangos_db->query("SET NAMES $database_encoding");
    $query = $mangos_db->query("SELECT * FROM `character` WHERE `online`='1' ORDER BY `name`");
  
  $query = $mangos_db->query("SELECT * FROM `character` WHERE `online`='1' and `account` not in (select `id` from `" . $dbr. "`.`account` where `gmlevel`>0) ORDER BY `name`");
    
  while($result = $mangos_db->fetch_assoc($query))
    {
        $char_data = explode(' ',$result['data']);
        $char_gender = dechex($char_data[36]);
        $char_gender = str_pad($char_gender,8, 0, STR_PAD_LEFT);
        $char_gender = $char_gender{3};
        $res_pos=get_zone_name($result['map'], $result['position_x'], $result['position_y']);

   $pl_array[$i] = Array($result['name'], $result['race'], $result['class'], $char_data[34], $res_pos, $char_gender); 
   $i++; 
}

    $mangos_db->close();
    unset($mangos_db);
return $i;
}

Edited by Benny

Share this post


Link to post
Share on other sites

A jeste jedna vec. Pridami uptimu do statusu. Pridejte nekam mezi funkce

 

function mangos_uptime()
{
    global $host, $port, $user, $db, $password;
    if(test_realm($host, $port) > 0)
    {
        $connect = mysql_connect($host, $user, $password);
        $database = mysql_select_db($db, $connect);
        $query = mysql_query("SELECT `starttime` FROM `uptime` ORDER BY `starttime` DESC LIMIT 1");
        if (!$query) {
            echo 'Could not run query: ' . mysql_error();
            exit;
        }
    
        $getuptime = mysql_fetch_row($query);
        mysql_close($connect);
        $time = time() - $getuptime[0];

        $uptime = array(
        'd' => $time / 86400 % 7,
        'h' => $time / 3600 % 24,
        'm' => $time / 60 % 60,
        's' => $time % 60
        );
        echo $uptime[d] . "day(s) " . $uptime[h] . "hour(s) " . $uptime[m] . "minute(s) " . $uptime[s] . "second(s)";
    } else {
        echo "Offline";
    }
}

 

a mezi

 

<br><strong class=title><center><?php print "$status";echo " "; print "$title";   ?></center></strong><br>

 

a

<center><?php print $timetext?> : <span id="timecontainer"></span>

 

vlozte

<center>Server uptime: <?php print mangos_uptime()?></center><br>

 

takze to bude vypadat takhle

 

<br><strong class=title><center><?php print "$status";echo " "; print "$title";   ?></center></strong><br>
<center><?php print $timetext?> : <span id="timecontainer"></span>
<center>Server uptime: <?php print mangos_uptime()?></center><br>

Share this post


Link to post
Share on other sites

To nezobrazovani GM nemusis delat ze testujes radek po radku, ale staci upravit SQL dotaz :

 

function make_players_array(){
    global $host, $user, $password, $db, $database_encoding, $pl_array;
$i=0;
    $mangos_db = new DBLayer($host, $user, $password, $db);
    $mangos_db->query("SET NAMES $database_encoding");
    $query = $mangos_db->query("SELECT * FROM `character` WHERE `online`='1' ORDER BY `name`");
    while($result = $mangos_db->fetch_assoc($query))
    {
        $char_data = explode(' ',$result['data']);
        $char_gender = dechex($char_data[36]);
        $char_gender = str_pad($char_gender,8, 0, STR_PAD_LEFT);
        $char_gender = $char_gender{3};
        $res_pos=get_zone_name($result['map'], $result['position_x'], $result['position_y']);

$pl_array[$i] = Array($result['name'], $result['race'], $result['class'], $char_data[34], $res_pos, $char_gender);
$i++;
    }
    $mangos_db->close();
    unset($mangos_db);
return $i;
}

 

za

 

function make_players_array(){
    global $host, $user, $password, $db, $database_encoding, $pl_array;
$i=0;
    $mangos_db = new DBLayer($host, $user, $password, $db);
    $mangos_db->query("SET NAMES $database_encoding");
    $query = $mangos_db->query("SELECT * FROM `character` WHERE `online`='1' and `account` not in (select `id` from `realmd`.`account` where `gmlevel`>0) ORDER BY `name`");
    while($result = $mangos_db->fetch_assoc($query))
    {
        $char_data = explode(' ',$result['data']);
        $char_gender = dechex($char_data[36]);
        $char_gender = str_pad($char_gender,8, 0, STR_PAD_LEFT);
        $char_gender = $char_gender{3};
        $res_pos=get_zone_name($result['map'], $result['position_x'], $result['position_y']);

$pl_array[$i] = Array($result['name'], $result['race'], $result['class'], $char_data[34], $res_pos, $char_gender);
$i++;
    }
    $mangos_db->close();
    unset($mangos_db);
return $i;
}

 

to bude fungovat pokud tabulka account je v DB realmd, pak by se jeste melo `realmd` upravit za `$promena` ktera obsahuje jmeno accountove DB.. z configu.

Share this post


Link to post
Share on other sites

Upravil jsem podle tebe prvni post a doplnil promenou na misto toho realmd jak si psal, ale mam takovy dojem ze tohle pujde jen za predpokladu ze user a heslo do realmd bude stejne jako do mangos, coz ale vetsinou byva, takze se usetri nejakej ten vypocetni vykon a prenos :)

Share this post


Link to post
Share on other sites
Upravil jsem podle tebe prvni post a doplnil promenou na misto toho realmd jak si psal, ale mam takovy dojem ze tohle pujde jen za predpokladu ze user a heslo do realmd bude stejne jako do mangos, coz ale vetsinou byva, takze se usetri nejakej ten vypocetni vykon a prenos :)

Jj, mas naprostou pravdu, ale kdo by daval realmd a mangos na dva ruzny mysql ? :D

Share this post


Link to post
Share on other sites

Update by hisgrak

 

RoSPORA update CZ

 

Do souboru "index.php" mezi jazyky vložit

case "cz":
    $button="create_cz.gif";
    $text = Array(
    'acc' => 'Vytvoření accountu',
    'create' => 'je dokončeno !',
    'failed' => 'nebylo úspěšné !',
    'not_all' => 'Nevyplněna všechna políčka',
    'playerson' => 'hráčů online',
    'off' => 'je offline',
    'name' => 'Jméno accountu',
        'tbc' => 'Rozšíření',
    'password' => 'Heslo',
    'ip_limit' => Array('Z vaší IP ',' byl account již vytvořen'),
    'char' => Array('Jméno','Rasa','Classa','LvL','Lokace'),
        'backtext' => 'Zpět',
    );
    break;

 

v configu nastavit

$lang="cz";

a

$charset="windows-1250"; 
$timetext="Čas serveru";

 

pak do složky mezi obrázky vložit obrázek z tohoto archivu

http://filebeam.com/cf031e2b41ae0fdd12964977d890abe4

 

----

Share this post


Link to post
Share on other sites

Tady sem dal svuj config ale myslim ze jako tam neni nic spatne:-/ A hlavne mi to neukazuje ani online hrace:-/

 

<?php

 

#Database Settings

 

$lang="en"; // Language ("en" - english, "ru" - russian, "tr" - turkish, "hu" - hungarian)

$host="localhost"; // HOST for Mangos database

$user="mangos"; // USER for Mangos database

$password="***"; // PASS for Mangos database

$db="mangos"; // NAME of Mangos database

$hostr="localhost"; // HOST for Realm database

$userr="mangos" ; // USER for Realm database

$passwordr="***"; // PASS for Realm database

$dbr="realmd"; // NAME of Realm database

$database_encoding = 'UTF8'; // Set encoding

$server = "localhost"; // Server adress (for realm status)

$port = "3724"; // Server port (for realm status) 8085 or 3724

 

#Page Account Feature Options

 

$accountoption="1"; //Set your RoSPORA's account creating is open or closed. 1 - Open , 2 - Closed

$onlineoption="1"; //Set your RoSPORA's online player display is open or closed. 1 - Open , 2 - Closed

$accountmessage="Account Creation Closed!"; //Set your account creation closed text

$onlinemessage="Online Player Display Disabled!"; //Set your online player display text

$lock_acc=0; // Lock created account to IP adress (1 - on, 0 - off)

$lock_reg=0; // Registration only one (or more) account from one IP adress

// 0 - not limit, 1 - one acc, 2 - two acc, etc...

 

#Page Template Options

 

$img_base = "img/"; // Image dir

$ongif = "img/on.gif";

$offgif = "img/off.gif";

$charset="windows-1251"; //Browser charset of your language.Tarayýcýnýzýn dilinize göre charset ayarý - Türkçe : "iso-8859-9"

$timetext="Current Server Time"; //Shows Server Time , if you want you can change it to your language Example: ="yourlang";

?>

Share this post


Link to post
Share on other sites

<?php

 

#Database Settings

 

$lang="en"; // Language ("en" - english, "ru" - russian, "tr" - turkish, "hu" - hungarian)

$host="localhost"; // HOST for Mangos database

$user="mangos"; // USER for Mangos database

$password="root"; // PASS for Mangos database

$db="mangos"; // NAME of Mangos database

$hostr="localhost"; // HOST for Realm database

$userr="mangos" ; // USER for Realm database

$passwordr="root"; // PASS for Realm database

$dbr="realmd"; // NAME of Realm database

$database_encoding = 'UTF8'; // Set encoding

$server = "localhost"; // Server adress (for realm status)

$port = "3724"; // Server port (for realm status) 8085 or 3724

 

#Page Account Feature Options

 

$accountoption="1"; //Set your RoSPORA's account creating is open or closed. 1 - Open , 2 - Closed

$onlineoption="1"; //Set your RoSPORA's online player display is open or closed. 1 - Open , 2 - Closed

$accountmessage="Account Creation Closed!"; //Set your account creation closed text

$onlinemessage="Online Player Display Disabled!"; //Set your online player display text

$lock_acc=0; // Lock created account to IP adress (1 - on, 0 - off)

$lock_reg=0; // Registration only one (or more) account from one IP adress

// 0 - not limit, 1 - one acc, 2 - two acc, etc...

 

#Page Template Options

 

$img_base = "img/"; // Image dir

$ongif = "img/on.gif";

$offgif = "img/off.gif";

$charset="windows-1251"; //Browser charset of your language.Tarayýcýnýzýn dilinize göre charset ayarý - Türkçe : "iso-8859-9"

$timetext="Current Server Time"; //Shows Server Time , if you want you can change it to your language Example: ="yourlang";

?>

něco ti tam chybělo skusto ted :whistling:

Share this post


Link to post
Share on other sites
<?php

 

#Database Settings

 

$lang="en"; // Language ("en" - english, "ru" - russian, "tr" - turkish, "hu" - hungarian)

$host="localhost"; // HOST for Mangos database

$user="mangos"; // USER for Mangos database

$password="root"; // PASS for Mangos database

$db="mangos"; // NAME of Mangos database

$hostr="localhost"; // HOST for Realm database

$userr="mangos" ; // USER for Realm database

$passwordr="root"; // PASS for Realm database

$dbr="realmd"; // NAME of Realm database

$database_encoding = 'UTF8'; // Set encoding

$server = "localhost"; // Server adress (for realm status)

$port = "3724"; // Server port (for realm status) 8085 or 3724

 

#Page Account Feature Options

 

$accountoption="1"; //Set your RoSPORA's account creating is open or closed. 1 - Open , 2 - Closed

$onlineoption="1"; //Set your RoSPORA's online player display is open or closed. 1 - Open , 2 - Closed

$accountmessage="Account Creation Closed!"; //Set your account creation closed text

$onlinemessage="Online Player Display Disabled!"; //Set your online player display text

$lock_acc=0; // Lock created account to IP adress (1 - on, 0 - off)

$lock_reg=0; // Registration only one (or more) account from one IP adress

// 0 - not limit, 1 - one acc, 2 - two acc, etc...

 

#Page Template Options

 

$img_base = "img/"; // Image dir

$ongif = "img/on.gif";

$offgif = "img/off.gif";

$charset="windows-1251"; //Browser charset of your language.Tarayýcýnýzýn dilinize göre charset ayarý - Türkçe : "iso-8859-9"

$timetext="Current Server Time"; //Shows Server Time , if you want you can change it to your language Example: ="yourlang";

?>

něco ti tam chybělo skusto ted :whistling:

 

 

Netusim cos tam menil spis se nenasel neco zmeneni od toho co tam mam ja za config...ale stejne to nefunguje...

 

 

 

4Radek: Zmenil sem to a taky nic;) A je tam napsano ze se to ma ptat na databazi mangos a ne characters:-/

Share this post


Link to post
Share on other sites
<?php

#Database Settings

$lang="en";                // Language ("en" - english, "ru" - russian, "tr" - turkish, "hu" - hungarian)
$host="127.0.0.1";            // HOST for Mangos database
$user="root";            // USER for Mangos database
$password="tvujpass";            // PASS for Mangos database
$db="characters";                // NAME of Mangos database
$hostr="127.0.0.1";            // HOST for Realm database
$userr="root";            // USER for Realm database
$passwordr="tvujpass";                // PASS for Realm database
$dbr="realmd";                // NAME of Realm database
$database_encoding = 'CP1251';          // Set encoding
$server = "127.0.0.1";                // Server adress (for realm status)
$port = "8085";                // Server port (for realm status) 8085 or 3724

#Page Account Feature Options

$accountoption="1";                     //Set your RoSPORA's account creating is open or closed. 1 - Open , 2 - Closed
$onlineoption="1";                      //Set your RoSPORA's online player display is open or closed. 1 - Open , 2 - Closed
$accountmessage="Account Creation Closed!";          //Set your account creation closed text
$onlinemessage="Online Player Display Disabled!";   //Set your online player display text
$lock_acc=0;                // Lock created account to IP adress (1 - on, 0 - off)
$lock_reg=0;                // Registration only one (or more) account from one IP adress
                                        // 0 - not limit, 1 - one acc,  2 - two acc, etc...

#Page Template Options

$img_base = "img/";            // Image dir
$ongif = "img/on.gif";
$offgif = "img/off.gif";
$charset="windows-1251";           //Browser charset of your language.Tarayýcýnýzýn dilinize göre charset ayarý - Türkçe : "iso-8859-9"  
$timetext="Current Server Time";   //Shows Server Time , if you want you can change it to your language Example:      ="yourlang";                                   
?>

Edited by Radek402

Share this post


Link to post
Share on other sites

Sry že doto kecám pokad to budeš mít takto bud ti to nepude nebo ti to bude psát chyby online hráče ukaže ale regi napujdou to sem měl take :D

Share this post


Link to post
Share on other sites
Noo diky za snazivost hosi ale me de spi o ty registrace nez o online hrace:P a ta nejde ani kdyz tam mam tu databazi mangos a nebo characters:-/

 

a mas vubec povoleny porty?

Share this post


Link to post
Share on other sites

pro ty co by chtěli mís stejné zobrazení jako u nás http://mmorpg-online.cz/wow/ tak zde kod a link

 

http://mmorpg-online.cz/wow/rospora.zip

 

Edit by MOD: Priste sem dej kdyztak jeste neco delsiho

 

Edit by Rick: co  pridat rolovaci plugin ? pak by nebylo třeba u kodu na 3 strany ho pastovat v plne velikosti

 

Edited by rick97

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×