Xaseco2 Plugins

Moderator: NADEO

Post Reply
User avatar
killer606
Posts: 440
Joined: 19 Jul 2011, 09:15
Contact:

Xaseco2 Plugins

Post by killer606 »

I think its useful to post some Xaseco plugins who work in Xaseco2 and in Xaseco.

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]);
      
   }
}

?>
I found this code somewhere in the forums some months ago. Its working with Xaseco2 too.
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: Xaseco2 Plugins

Post by Xymph »

killer606 wrote:I think its useful to post some Xaseco plugins who work in Xaseco2 and in Xaseco.
Yes, but it would be even more useful if you do that in the XAseco1/2 forum to keep everything in one place. ;)
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
User avatar
Jojo_44
Posts: 485
Joined: 12 Jul 2010, 15:58
Location: Germany->Bavaria
Contact:

Re: Xaseco2 Plugins

Post by Jojo_44 »

Good time to post a question:

Why do you stay in the old tm forum ? I think it would be more useful if you create a own section for xaseco2 here, like mlepp.

I just thought about atm ;)

regards, Jojo
Image
my english sounds very unfriendly but it isn´t ;)
User avatar
Slig
Posts: 637
Joined: 15 Jun 2010, 11:52
Location: TraXicoLand

Re: Xaseco2 Plugins

Post by Slig »

Because we are moderator on our specific script subforum, so it's far easier to manage there. And also also it avoids to check often on both for users issues. And last, there are already far too many subforums here to check.read about tech issues.
User avatar
Xymph
Posts: 1399
Joined: 15 Jun 2010, 20:35
Contact:

Re: Xaseco2 Plugins

Post by Xymph »

Jojo_44 wrote:Why do you stay in the old tm forum ?
Valid question, but I already mentioned one reason in my previous post. ;) Slig mentioned several others.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
om23
Posts: 568
Joined: 29 Aug 2010, 21:29

Re: Xaseco2 Plugins

Post by om23 »

Jojo_44 wrote:Good time to post a question:

Why do you stay in the old tm forum ? I think it would be more useful if you create a own section for xaseco2 here, like mlepp.
*agree*
═╦═╔╦╗LAN-Party »»» :pil :pop: :pil
Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 1 guest