I would like you to present a Injection for the latest Aac maker. Its not official don't its still a beta version but you might use it later. Its very easy to write plugins!
I made a injection based on showing the amount of each vocation and total players&accounts in Highscores
Tutorial where to place it?
enter the following direction \injections\highscores crate a new folder with a name Statistics paste in it the code.. Save it as injection.php
Sorry i pasted the wrong code (its for guilds injector)
I made a injection based on showing the amount of each vocation and total players&accounts in Highscores
Tutorial where to place it?
enter the following direction \injections\highscores crate a new folder with a name Statistics paste in it the code.. Save it as injection.php
Sorry i pasted the wrong code (its for guilds injector)
PHP:
<?php
//** Connection to the database **//
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = POT::getInstance()->getDBHandle();
//** SQL Query **//
//** List **//
//** Functions **//
//** - Show all sorcerers **//
//** - Show all druids **//
//** - Show all paladins **//
//** - Show all knights **//
//** - Show all accounts **//
//** - Show all created players **//
$ms = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `vocation`=1;')->fetch();
$ed = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `vocation`=2;')->fetch();
$rp = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `vocation`=3;')->fetch();
$ek = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `vocation`=4;')->fetch();
$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
//@ Description of the players and accounts amount @//
ECHO "
We have ".$players[0]." players created on ".$accounts[0]." accounts<br>
";
//@ Description of the vocations @//
IF ( $ms[0] == 1 ) ECHO "".$ms[0]." Sorcerer<br>"; ELSE ECHO "".$ms[0]." Sorcerers<br>";
IF ( $ed[0] == 1 ) ECHO "".$ed[0]." Druid<br>"; ELSE ECHO "".$ed[0]." Druids<br>";
IF ( $rp[0] == 1 ) ECHO "".$rp[0]." Paladin<br>"; ELSE ECHO "".$rp[0]." Paladins<br>";
IF ( $ek[0] == 1 ) ECHO "".$ek[0]." Knight<br>"; ELSE ECHO "".$ek[0]." Knights<br>";
//** Separator **//
ECHO "<br>";
//** End of Separator **//
?>
Last edited by a moderator: