Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,570
- Solutions
- 6
- Reaction score
- 437
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello guys !!!
Until now, I didn't saw a Live Cast Page for Znote AAC, only for Gesior AAC.
The page itself, it's kinda simple, because my skills in PHP are not so good, but it's working 100%.
P.S: This page is based on Summ's Cast System!
I did it for my server, but I'm here to share with you guys
This is how it looks like:
Hope you enjoy it !!!
Until now, I didn't saw a Live Cast Page for Znote AAC, only for Gesior AAC.
The page itself, it's kinda simple, because my skills in PHP are not so good, but it's working 100%.
P.S: This page is based on Summ's Cast System!
I did it for my server, but I'm here to share with you guys
This is how it looks like:
PHP:
<?php require_once 'engine/init.php';
include 'layout/overall/header.php'; ?>
<?php
$cache = new Cache('engine/cache/livecast');
if ($cache->hasExpired()) {
$cast = mysql_select_multi('SELECT * FROM players WHERE online = 1 AND cast = 1 ORDER BY name');
$cache->setContent($cast);
$cache->save();
} else {
$cast = $cache->load();
}
?>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="#505050">
<td class="white"><b><?php echo $config['site_title'] ?> Live Cast System!<b></td>
</tr>
<td>
<strong>How to view a cast?</strong>
<ul>
<li><strong>Unprotected Cast</strong></li>
<ul>
<li>Leave both the account name and password <strong>empty</strong> when you are logging in.</li>
</ul><br>
<li><strong>Protected Cast</strong></li>
<ul>
<li>If the cast has a password then simply get the password from the caster and enter the game with just the password for the cast.</li>
</ul>
</ul>
</td>
</table>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="#505050">
<td class="white"><b>Cast Commands<b></td>
</tr>
<td>
<strong><u>Commands for streamers:</u></strong><br><br>
<font color="brown"><strong>/cast on</font></strong> - enables the stream<br />
<font color="brown"><strong>/cast off</font></strong> - disables the stream<br />
<font color="brown"><strong>/cast password {password}</font></strong> - sets a password on the stream<br />
<font color="brown"><strong>/cast password off</font></strong> - disables the password protection<br />
<font color="brown"><strong>/cast kick {name}</font></strong> - kick a spectator from your stream<br />
<font color="brown"><strong>/cast ban {name}</font></strong> - locks spectator IP from joining your stream<br />
<font color="brown"><strong>/cast unban {name}</font></strong> - removes banishment lock<br />
<font color="brown"><strong>/cast bans</font></strong> - shows banished spectators list<br /><br />
<font color="brown"><strong>/cast mute {name}</font></strong> - mutes selected spectator from chat<br />
<font color="brown"><strong>/cast unmute {name}</font></strong> - removes mute<br />
<font color="brown"><strong>/cast mutes</font></strong> - shows muted spectators list<br />
<font color="brown"><strong>/cast viewers</font></strong> - displays the amount and nicknames of current spectators<br />
<font color="brown"><strong>/cast status</font></strong> - displays stream info
</td>
</table>
<?php
if (empty($cast) || $cast === false) {
?>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="#505050">
<td class="white">
<b>Live Casts</b>
</td>
</tr>
<tr bgcolor="#D4C0A1">
<td><center>Currently there are no active casts on <?php echo $config['site_title'] ?>!</center></td>
</tr>
</table>
<?php } else { ?>
<h1>Live Casts</h1>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="#505050">
<td class="white" width="10%"><center><b>Player Name</b></center></td>
<td class="white" width="10%"><center><b>Description</b></center></td>
<td class="white" width="10%"><center><b>Viewers</b></center></td>
</tr>
<?php
foreach ($cast as $getCast) {
?>
<tr bgcolor="#F1E0C6">
<td class="white"><center><a href="characterprofile.php?name=<?php urlencode($getCast['name']) ?>"><?php echo $getCast['name'] ?></a></center></td>
<td class="white"><center><b><?php echo $getCast['castDescription'] == "" ? '-' : $getCast['castDescription'] ?></b></center></td>
<td class="white"><center><b><?php echo $getCast['castViewers'] ?>/50</b></center></td>
</tr> <?php } } ?>
</table>
<p align="right"><small>Page converted by <a href="https://otland.net/members/nottinghster.3619/">Nottinghster</a>.</small></p>
<?php include 'layout/overall/footer.php'; ?>
Hope you enjoy it !!!