I'll start with an small plugin.
<plugin>plugin.randominfo.php</plugin>
Code: Select all
<?php
Aseco::registerEvent('onEverySecond', 'infos_everysecond');
global $lastinfotime;
global $infointerval;
global $infos;
$infointerval = 180; //message interval in seconds
$infos = array();
//define your messages
$infos[] = '$z$s$ff0>> [$f00INFO$ff0]Text';
$infos[] = '$z$s$ff0>> [$f00INFO$ff0]Text';
$infos[] = '$z$s$ff0>> [$f00INFO$ff0]Text';
// ...
$lastinfotime = 0;
function infos_everysecond($aseco){
global $lastinfotime, $infointerval, $infos;
$time = time();
if ($lastinfotime + $infointerval <= $time){
$lastinfotime = $time;
//get a random index
$index = rand(0, count($infos) - 1);
//output info
$aseco->client->query('ChatSendServerMessage', $infos[$index]);
}
}
?>