ASECO2.x Plugin | Player join/leave message on chat

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, f*ckfish, Assembler Maniac, TM-Patrol

User avatar
daemon
sunday driver
sunday driver
Posts: 68
Joined: 09 Mar 2006 17:28
Location: México
Contact:

ASECO2.x Plugin | Player join/leave message on chat

Post by daemon » 05 May 2008 19:19

For: ASECO2.x
Description: Reports on chat when a player joins or leaves the server; it also displays the player's nation(zone), ladder rank, and local rank.
New Features: It now displays if the player is an admin, and also incorporated J-S's ranks fix.

Thanks to Assembler Maniac, Mistral and Xymph, I took bits and pieces of RASP, Mistral ASECO and XASECO to create this monster. :lol: I hope they don't mind.

Some examples of what it should display on chat:

Code: Select all

daemon[Admin] from Mexico connected [WR: 30 123 | Local Rank: 13/37]

daemon from Mexico connected [WR: 30 123 | Local Rank: 13/37]

daemon from Germany|Bavaria|Munich connected [WR: 30 123 | Local Rank: 13/37]

daemon from Mexico connected [WR: NA | Local Rank: NA]

daemon disconnected
Download (rar contains 2 versions, display country/display full zone):
http://www.fileden.com/files/2008/4/22/ ... lugins.rar

:thumbsup:
Last edited by daemon on 10 May 2008 17:47, edited 3 times in total.
Image
It's the decisions you make, when you have no time to make them, that define who you are.

xOr
pedestrian
pedestrian
Posts: 10
Joined: 17 Aug 2006 20:22
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by xOr » 05 May 2008 19:30

I'll give it a try right away....

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by oliverde8 » 05 May 2008 20:41

Works Great :thumbsup:

Thanks a lot
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

User avatar
k4nm4n
smooth traffic navigator
smooth traffic navigator
Posts: 262
Joined: 11 Feb 2008 10:30
Owned TM-games: TMUF
Location: Slovenia
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by k4nm4n » 05 May 2008 21:55

I get thsi error:

Fatal error: Class 'Plugin' not found in C:\Documents and Settings\P
p\usbTMN_v1.91\Tmn\aseco1\plugins\plugin.joinleavemod.php on line 3

cdrw700
happy cruiser
happy cruiser
Posts: 129
Joined: 03 Dec 2006 09:15
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by cdrw700 » 05 May 2008 22:41

Thanks a lot, it works great !!

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by f*ckfish » 05 May 2008 22:51

k4nm4n wrote:I get thsi error:

Fatal error: Class 'Plugin' not found in C:\Documents and Settings\P
p\usbTMN_v1.91\Tmn\aseco1\plugins\plugin.joinleavemod.php on line 3
Do you maybe use XASECO or Mistral or something else? This plugin is ASECO 2.x only I guess.
inactive, sorry

User avatar
k4nm4n
smooth traffic navigator
smooth traffic navigator
Posts: 262
Joined: 11 Feb 2008 10:30
Owned TM-games: TMUF
Location: Slovenia
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by k4nm4n » 05 May 2008 23:13

I tested on Mistral Aseco, but I changed my mind and I'm runing XASECO without fansy buttons and popup windows and you'r widgets. :( But it have more functions like add operator and so on. :thumbsup:
You will adjust widgets for Xaseco?

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by f*ckfish » 06 May 2008 08:27

nah, no offtopic here ;-) look there: viewtopic.php?f=28&t=14464&st=0&sk=t&sd ... 60#p112338
Btw. you don't need this plugin for XASECO since it has something similar already integrated (I think it's in JFreu lite plugin)
inactive, sorry

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by Xymph » 06 May 2008 08:50

f*ckfish wrote:Btw. you don't need this plugin for XASECO since it has something similar already integrated (I think it's in JFreu lite plugin)
Correct, both lite and full Jfreu plugins in XASECO already provide player join/leave messages.
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

cow
smooth traffic navigator
smooth traffic navigator
Posts: 216
Joined: 20 Mar 2007 02:53
Owned TM-games: TMU, TMS, TMO
Contact:

Re: ASECO Plugin | Player join/leave message on chat

Post by cow » 06 May 2008 16:10

can we somehow get people to start putting the version of aseco their plugins are for in the title.
aseco2
xaseco
mistral
join me at the music tower
Tet19's MusicTower

User avatar
daemon
sunday driver
sunday driver
Posts: 68
Joined: 09 Mar 2006 17:28
Location: México
Contact:

Re: ASECO2 Plugin | Player join/leave message on chat

Post by daemon » 06 May 2008 16:55

ASECO was the only one missing this feat, also the title said ASECO, not XASECO or anything, but its changed now. :thumbsup:
Image
It's the decisions you make, when you have no time to make them, that define who you are.

xis101
happy cruiser
happy cruiser
Posts: 154
Joined: 14 Aug 2006 01:22
Owned TM-games: TMUF
Manialink(s): gn
Contact:

Re: ASECO2 Plugin | Player join/leave message on chat

Post by xis101 » 06 May 2008 20:50

thanks for this plugin. is it possible to get a more detailed info about the zone?

I mean, can you display for example "from country/region/city"? :)

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: ASECO2 Plugin | Player join/leave message on chat

Post by w1lla » 06 May 2008 21:05

Code: Select all

<?php
/*
orginal code by daemon
edited by w1lla for xaseco.
*/
Aseco::registerEvent('onPlayerConnect', 'pconnect');
Aseco::registerEvent('onPlayerDisconnect', 'pdisconnect');


	function pconnect($aseco, $player)
	{
	global $rasp, $feature_ranks;
	
		$aseco->client->query('GetDetailedPlayerInfo', $target->login);
		$info = $aseco->client->getResponse();
		$rank = $info['LadderStats']['PlayerRankings'][0]['Ranking'];
		$score = $info['LadderStats']['PlayerRankings'][0]['Score'];
		$path = $GetPlayerInfo['Path'];
		$country=$player->nation;
		$pos = strpos($zone, '|');
		if ($pos == false) {
			$zone = $zone; 
		}
		else {
			$zone = substr($zone, 0, $pos);	
		}
		$srank = $GetPlayerInfo['LadderStats']['PlayerRankings']['0']['Ranking'];
		$rank = str_replace(' ', '$n $m', number_format($player->ladderrank, 0, ' ', ' '));
		$message = stripColors($player->nickname).$player.' $39ffrom $fff'.$country.' $39fconnected [World Rank: $fff'.$rank.' $39f| '.$rasp.''.$rasp.'';
		if ($feature_ranks) {
		$message .= $white.'Local Rank: $fff'.$rasp->getRank($player->login);
	}
		$aseco->client->query('ChatSendServerMessage', $message);
		
	}  

	function pdisconnect($aseco, $player)
	{
	global $rasp, $feature_ranks;
		$message = stripColors($player->nickname).' $39fdisconnected';
		$aseco->client->query('ChatSendServerMessage', $message);
	}  

	function showRank($login) {
		global $minrank;

		$pid = $aseco->getPlayerId($login);
		$query = 'SELECT avg FROM rs_rank
		          WHERE playerID=' . $pid;
		$res = mysql_query($query);
		if (mysql_num_rows($res) > 0) {
			$row = mysql_fetch_array($res);
			$query2 = 'SELECT playerid FROM rs_rank ORDER BY avg ASC';
			$res2 = mysql_query($query2);
			$rank = 1;
			while ($row2 = mysql_fetch_array($res2)) {
				if ($row2['playerid'] == $pid) break;
				$rank++;
			}
			$message = formatText($aseco->messages['RANK'][0],
			                      $rank, mysql_num_rows($res2),
			                      sprintf("%4.1F", $row['avg'] / 10000));
			$message = $aseco->formatColors($message);
			$aseco->client->query('ChatSendServerMessageToLogin', $message, $login);
			mysql_free_result($res2);
		} else {
			$message = formatText($aseco->messages['RANK_NONE'][0], $minrank);
			$message = $aseco->formatColors($message);
			$aseco->client->query('ChatSendServerMessageToLogin', $message, $login);
		}
		mysql_free_result($res);
		}
?>
this piece of code is only for xaseco.

edited by yours truly,

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: ASECO2 Plugin | Player join/leave message on chat

Post by Xymph » 06 May 2008 21:36

w1lla wrote:this piece of code is only for xaseco.
Uhm, why? :roll: XAseco already has this included in the lite and full Jfreu plugins. It's the other Aseco variants that didn't have this feature yet.
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
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: ASECO2 Plugin | Player join/leave message on chat

Post by w1lla » 06 May 2008 21:38

well i just wanted to help but i do miss 1 thing in your plugin a zone feature

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

Post Reply