• 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!

[Znote AAC] Simple serverinfo

I made this simple serverinfo page to practise skills, to install you need to configure your server path in
*Note: this will just work with servers using exp stages, ( lazy )

PHP:
$path = 'C:\Users\Asus\Desktop\Daneria Land';
add your path.

- Photo -

View attachment 16026

- Install -

Add this to your serverinfo page ( erase all first )

PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>

<h1>Server Information</h1>
<?php

$path = 'C:\Users\Asus\Desktop\Daneria Land';
echo '<table cellpadding="0"><tr class="yellow"><td><center>From level</center></td><td><center>To level</center></td><td><center>Rate</center></td></tr>';
if (is_dir($path)) {

   
    $xml1 = simplexml_load_file($path."\data\xml\stages.xml");
    foreach ($xml1->world->children() as $stage1) {
        if ($stage1['maxlevel'] == '') {
        $stage1['maxlevel'] = 'Infinite';   
        }
        echo '<tr><td><center>'.$stage1['minlevel'].'</center></td><td><center>'.$stage1['maxlevel'].'</center></td><td><center>'.$stage1['multiplier'].'</center></td></tr>';   
        }
    $word = 'a';
    $loadconfig = file($path.'\config.lua');
    $key = 'rateMagic';
    $key2 = 'rateLoot';
    $key3 = 'rateSkill';
    $found = false;
    foreach ($loadconfig as $lineNumber => $e) {
    if (strpos($e,$key) !== false) {
       $found = true;
       break;
    }
}

    foreach ($loadconfig as $lineNumberr => $ee) {
    if (strpos($ee,$key2) !== false) {
       $found = true;
       break;
    }
}

    foreach ($loadconfig as $lineNumberrr => $eee) {
    if (strpos($eee,$key3) !== false) {
       $found = true;
       break;
    }
}

if ($found) {
   echo '<table cellpadding="0"><tr class="yellow"><td><center>Magic rate</center></td><td><center>Skills rate</center></td><td><center>Loot rate</center></td></tr>';
   echo '<tr><td><center>'.$loadconfig[$lineNumber].'</center></td><td><center>'.$loadconfig[$lineNumberrr].'</center></td><td><center>'.$loadconfig[$lineNumberr].'</center></td></tr>';
}
   
    $getallplayers = mysql_query("SELECT COUNT(*) as MAX FROM players");
    $parseallplayers = mysql_fetch_assoc($getallplayers);
    $getallaccounts = mysql_query("SELECT COUNT(*) as MEX FROM accounts");
    $parseallaccounts = mysql_fetch_assoc($getallaccounts);
    $getallguilds = mysql_query("SELECT COUNT(*) as MOX FROM guilds");
    $parseallguilds = mysql_fetch_assoc($getallguilds);
   
    echo '</table></tr>';
    echo '<table cellpadding="0"><tr class="yellow"><td><center>Total accounts</center></td><td><center>Total players</center></td><td><center>Total guilds</center></td></tr>';
    echo '<tr><td><center>'.$parseallplayers['MAX'].'</center></td><td><center>'.$parseallaccounts['MEX'].'</center></td><td><center>'.$parseallguilds['MOX'].'</center></td></tr>';
    echo '</table></tr>';
   
    $talkactions = simplexml_load_file($path.'/data/talkactions/talkactions.xml');
    echo '<table cellpadding="0"><tr class="yellow"><td><center>Player commands</center></td></center></tr>';
    foreach ($talkactions as $commands) {
        if (empty($commands['access'])) {
    echo '<center><tr><td><center>'.$commands['words'].'</center></td></tr></center>';
        }
    }
    echo '</table></tr>';
   
} else {
   
echo '<br><b>Invalid path!</b>';
   
}
?>
<?php include 'layout/overall/footer.php'; ?>

Tested and 0 errors showed up

thanks was looking for this a while now :p
 
@Znote
how i can fix this to make work with znote 1.5? its half working
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 51

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 53

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 55

$getallplayers = mysql_query("SELECT COUNT(*) as MAX FROM players");
$parseallplayers = mysql_fetch_assoc($getallplayers); <<<< line 51
$getallaccounts = mysql_query("SELECT COUNT(*) as MEX FROM accounts");
$parseallaccounts = mysql_fetch_assoc($getallaccounts); <<<<<<<<line 53
$getallguilds = mysql_query("SELECT COUNT(*) as MOX FROM guilds");
$parseallguilds = mysql_fetch_assoc($getallguilds); <<< line 55

echo '</table></tr>';

also there is a spells system working with the znote 1.5 version?

regards
 
@Znote
how i can fix this to make work with znote 1.5? its half working
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 51

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 53

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 55

$getallplayers = mysql_query("SELECT COUNT(*) as MAX FROM players");
$parseallplayers = mysql_fetch_assoc($getallplayers); <<<< line 51
$getallaccounts = mysql_query("SELECT COUNT(*) as MEX FROM accounts");
$parseallaccounts = mysql_fetch_assoc($getallaccounts); <<<<<<<<line 53
$getallguilds = mysql_query("SELECT COUNT(*) as MOX FROM guilds");
$parseallguilds = mysql_fetch_assoc($getallguilds); <<< line 55

echo '</table></tr>';

also there is a spells system working with the znote 1.5 version?

regards

Grab the latest version of Znote AAC from github, contains spells page and serverinfo similar to this one. (Updated 11 days ago).
 
error loadind spells
Logged in as admin, loading engine/XML/spells.xml file and updating cache.


Warning: simplexml_load_file(): I/O warning : failed to load external entity "C:/Users/Raquel/Desktop/OTX7.72RPG+CAST/XML/spells.xml" in C:\xampp\htdocs\spells.php on line 9
Failed to load engine/XML/spells.xml file.


Notice: Undefined variable: spells in C:\xampp\htdocs\spells.php on line 97
Spells
Spells have currently not been loaded into the website by the server admin.


serveri info errors







Logged in as admin, loading engine/XML/stages.xml file and updating cache.


Warning: simplexml_load_file(): I/O warning : failed to load external entity "engine/XML/stages.xml" in C:\xampp\htdocs\serverinfo.php on line 34
Server Information
Here you will find all basic information about Relicaria


Notice: Undefined variable: stagesData in C:\xampp\htdocs\serverinfo.php on line 214
Server rates

Notice: Undefined variable: stagesData in C:\xampp\htdocs\serverinfo.php on line 223
PvP information
World type open
Hotkey aimbot
Notice: Undefined index: hotkeyAimbotEnabled in C:\xampp\htdocs\serverinfo.php on line 288
No
Protection level 40
Kills to red skull
Notice: Undefined index: killsToRedSkull in C:\xampp\htdocs\serverinfo.php on line 296
Kills to black skull
Notice: Undefined index: killsToBlackSkull in C:\xampp\htdocs\serverinfo.php on line 300
Remove rune charges Yes
Experience by killing players Yes
Experience gain kill treshhold:
Notice: Undefined index: expFromPlayersLevelRange in C:\xampp\htdocs\serverinfo.php on line 320
% of your level
White skull duration 15 minutes
 
error loadind spells
Logged in as admin, loading engine/XML/spells.xml file and updating cache.


Warning: simplexml_load_file(): I/O warning : failed to load external entity "C:/Users/Raquel/Desktop/OTX7.72RPG+CAST/XML/spells.xml" in C:\xampp\htdocs\spells.php on line 9
Failed to load engine/XML/spells.xml file.



Notice: Undefined variable: spells in C:\xampp\htdocs\spells.php on line 97
Spells
Spells have currently not been loaded into the website by the server admin.


serveri info errors







Logged in as admin, loading engine/XML/stages.xml file and updating cache.


Warning: simplexml_load_file(): I/O warning : failed to load external entity "engine/XML/stages.xml" in C:\xampp\htdocs\serverinfo.php on line 34
Server Information
Here you will find all basic information about Relicaria


Notice: Undefined variable: stagesData in C:\xampp\htdocs\serverinfo.php on line 214
Server rates

Notice: Undefined variable: stagesData in C:\xampp\htdocs\serverinfo.php on line 223
PvP information
World type open
Hotkey aimbot
Notice: Undefined index: hotkeyAimbotEnabled in C:\xampp\htdocs\serverinfo.php on line 288
No
Protection level 40
Kills to red skull
Notice: Undefined index: killsToRedSkull in C:\xampp\htdocs\serverinfo.php on line 296
Kills to black skull
Notice: Undefined index: killsToBlackSkull in C:\xampp\htdocs\serverinfo.php on line 300
Remove rune charges Yes
Experience by killing players Yes
Experience gain kill treshhold:
Notice: Undefined index: expFromPlayersLevelRange in C:\xampp\htdocs\serverinfo.php on line 320
% of your level
White skull duration 15 minutes

Are you using this file?
ZnoteAAC/spells.php at master · Znote/ZnoteAAC · GitHub

Did you place
C:/Users/Raquel/Desktop/OTX7.72RPG+CAST/XML/spells.xml
into
C:\xampp\htdocs\engine\XML\ folder?
 
i wasn't ding it but i added (your files)
and get this error
Logged in as admin, loading engine/XML/spells.xml file and updating cache.


Warning: simplexml_load_file(): I/O warning : failed to load external entity "C:/Users/Raquel/Desktop/OTX7.72RPG+CAST/XML/spells.xml" in C:\xampp\htdocs\spells.php on line 9
Failed to load engine/XML/spells.xml file.


Notice: Undefined variable: spells in C:\xampp\htdocs\spells.php on line 97
Spells
Spells have currently not been loaded into the website by the server admin.
 
Kills to red skull
Notice: Undefined index: killsToRedSkull in C:\xampp\htdocs\serverinfo.php on line 296
Kills to black skull
Notice: Undefined index: killsToBlackSkull in C:\xampp\htdocs\serverinfo.php on line 300



serverinfo 296 and 300:

<tr>
<td>Kills to red skull</td>
<td><?php echo $luaConfig['killsToRedSkull']; ?></td>
</tr>
<tr>
<td>Kills to black skull</td>
<td><?php echo $luaConfig['killsToBlackSkull']; ?></td>
</tr>


config:

fragsToRedSkull = 6
fragsSecondToRedSkull = 90
fragsThirdToRedSkull = 300
redSkullLength = 2 * 24 * 60 * 60

fragsToBlackSkull = 30
fragsSecondToBlackSkull = 180
fragsThirdToBlackSkull = 600
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
blackSkullLength = 1 * 24 * 60 * 60
useBlackSkull = true
 
Kills to red skull
Notice: Undefined index: killsToRedSkull in C:\xampp\htdocs\serverinfo.php on line 296
Kills to black skull
Notice: Undefined index: killsToBlackSkull in C:\xampp\htdocs\serverinfo.php on line 300



serverinfo 296 and 300:

<tr>
<td>Kills to red skull</td>
<td><?php echo $luaConfig['killsToRedSkull']; ?></td>
</tr>
<tr>
<td>Kills to black skull</td>
<td><?php echo $luaConfig['killsToBlackSkull']; ?></td>
</tr>


config:

fragsToRedSkull = 6
fragsSecondToRedSkull = 90
fragsThirdToRedSkull = 300
redSkullLength = 2 * 24 * 60 * 60

fragsToBlackSkull = 30
fragsSecondToBlackSkull = 180
fragsThirdToBlackSkull = 600
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
blackSkullLength = 1 * 24 * 60 * 60
useBlackSkull = true

Edit
Code:
$luaConfig['killsToRedSkull'];
Change killsToRedSkull to fragsToRedSkull.

Same with
Code:
$luaConfig['killsToBlackSkull'];
Change killsToBlackSkull to fragsToBlackSkull
 
Edit
Code:
$luaConfig['killsToRedSkull'];
Change killsToRedSkull to fragsToRedSkull.

Same with
Code:
$luaConfig['killsToBlackSkull'];
Change killsToBlackSkull to fragsToBlackSkull

Kills to red skull
Notice: Undefined index: fragsToRedSkull in C:\xampp\htdocs\serverinfo.php on line 296
Kills to black skull
Notice: Undefined index: fragsToBlackSkull in C:\xampp\htdocs\serverinfo.php on line 300
 
@Znote
how i can fix this to make work with znote 1.5? its half working
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 51

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 53

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 55

$getallplayers = mysql_query("SELECT COUNT(*) as MAX FROM players");
$parseallplayers = mysql_fetch_assoc($getallplayers); <<<< line 51
$getallaccounts = mysql_query("SELECT COUNT(*) as MEX FROM accounts");
$parseallaccounts = mysql_fetch_assoc($getallaccounts); <<<<<<<<line 53
$getallguilds = mysql_query("SELECT COUNT(*) as MOX FROM guilds");
$parseallguilds = mysql_fetch_assoc($getallguilds); <<< line 55

echo '</table></tr>';

also there is a spells system working with the znote 1.5 version?

regards
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 51

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 53

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 55 this Error how to Fix it ?.. @Znote
 
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 51

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 53

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\serverinfo.php on line 55 this Error how to Fix it ?.. @Znote

Replace this:
PHP:
$getallplayers = mysql_query("SELECT COUNT(*) as MAX FROM players");
$parseallplayers = mysql_fetch_assoc($getallplayers);
$getallaccounts = mysql_query("SELECT COUNT(*) as MEX FROM accounts");
$parseallaccounts = mysql_fetch_assoc($getallaccounts);
$getallguilds = mysql_query("SELECT COUNT(*) as MOX FROM guilds");
$parseallguilds = mysql_fetch_assoc($getallguilds);

With this:
PHP:
$parseallplayers = mysql_select_single("SELECT COUNT(*) as MAX FROM players");
$parseallaccounts = mysql_select_single("SELECT COUNT(*) as MEX FROM accounts");
$parseallguilds = mysql_select_single("SELECT COUNT(*) as MOX FROM guilds");
 
I get this error
Code:
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/otsmanager/www/public_html/serverinfo.php:50 Stack trace: #0 {main} thrown in /home/otsmanager/www/public_html/serverinfo.php on line 50

Any ideas?

Nevermind. Fixed
 
Last edited by a moderator:
Back
Top