It simply displays your VIP friends in any of your character's pages.
If the character you are looking at isn't at your account, it won't appear.
This has been tested with this default value of config.lua:
Lua:
separateVipListPerCharacter = false
- Create folder and .php file @ \injections\character_view\vip\injection.php:
PHP:
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # #
#VIP Friends Injection v0.2a for ModernAAC;by Cybermaster#
# # # # # # # # # # # # # # # # # # # # # # # # # # # #-->
<?PHP
if (!defined('BASEPATH')) exit('No direct script access allowed');
$ide = new IDE;
$player = $GLOBALS['player'];
$SQL = POT::getInstance()->getDBHandle();
if(!$ide->isLogged()) return true;
$account_logged = new OTS_Account();
$account_logged->load($_SESSION['account_id']);
if($player->getAccount() != $account_logged) return true;
$vip = $SQL->query('SELECT p.name AS name, p.id AS id, p.online AS online,
player_id FROM account_viplist
LEFT JOIN players p ON account_viplist.player_id = p.id
WHERE account_viplist.account_id = '.$player->getAccount().'
ORDER BY name, online ASC LIMIT 0,100')->fetchAll();
if(empty($vip)) return true;
echo '<div class="message"><div class="title">VIP</div><div class="content">';
echo '<table width="100%" cellpadding="10" cellspacing="0" border="0" style="margin: 10px 0px 10px 0px;" class="cellspadding">';
echo '<tr class="tableheader"><td width="90%"><b>Name</b></td><td align"center"><b>Status</center></b></td></tr>';
foreach($vip as $friend)
{
$status = $friend['online'] == 1 ? '<span style="color:green;">Online</span>' : '<span style="color:red;">Offline</span>';
echo '<tr class="tablerow"><td width="90%">
<a span style="text-decoration: none;" href="'.WEBSITE.'/index.php/character/view/'.$friend["name"].'">'.$friend["name"].'</a></td><td>'.$status.'</td></tr>';
}
echo '</table></div></div>';
?>
Last edited: