[Xaseco 1+2] ReplayCharge Plugin

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

perycjusz
road tourist
road tourist
Posts: 85
Joined: 06 Feb 2009 03:00
Owned TM-games: TMU

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by perycjusz » 03 Oct 2011 20:13

Leigham great job. Thx :)
Image

User avatar
Leigham
happy cruiser
happy cruiser
Posts: 139
Joined: 26 Mar 2011 01:04
Owned TM-games: TMUF, TMNF, TM²
Manialink(s): None

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Leigham » 03 Oct 2011 21:14

perycjusz wrote:Leigham great job. Thx :)
You're welcome :) It wasn't very difficult to transfer, I just took out the version checks for tmf :)
TheBigG wrote:hello there is a bug if a player connects @ scoretable the plugin is shown again.
can somebody fix that?
thx in advance
Good point. I never thought of that when I wrote the thing. I'll try and dream up a fix when I get the time, but it won't be for a week or so (unless someone else wants to fix it ;)).
"Never surrender, sometimes retreat"

Image

Scottish Flat Trax servers

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Ant » 03 Oct 2011 23:34

Would something like this work? Untested because I can't access my server through ftp at the moment.

Code: Select all

function replaychargeOn($aseco, $scoreboard) {
	global $position, $coppers;
	if ($scoreboard) {
    $xml = '<manialink id="1234512301"></manialink>';
    $aseco->client->query("SendDisplayManialinkPage", $xml, 1, false);
    } else {
	$xml = '<manialink id="1234512301">
    <frame posn="'.$position.'">
        <quad posn="0 0 0" sizen="23 5" style="BgsPlayerCard" substyle="BgCardSystem" action="234561"></quad>
        <label posn="11.3 -2.4 1" sizen="23 5" halign="center" valign="center" textsize="2.5" textcolor="FFFF" text="Replay track for '.$coppers.' coppers!"></label>
    </frame>
	</manialink>';
	$aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
}

User avatar
Leigham
happy cruiser
happy cruiser
Posts: 139
Joined: 26 Mar 2011 01:04
Owned TM-games: TMUF, TMNF, TM²
Manialink(s): None

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Leigham » 04 Oct 2011 00:11

Ant wrote:Reply with quote
Would something like this work? Untested because I can't access my server through ftp at the moment.
Actually I think you could get away with:

Code: Select all

function replaychargeOn($aseco, $scoreboard) {
   global $position, $coppers;
   if (!$scoreboard) {
     $xml = '<manialink id="1234512301">
    <frame posn="'.$position.'">
        <quad posn="0 0 0" sizen="23 5" style="BgsPlayerCard" substyle="BgCardSystem" action="234561"></quad>
        <label posn="11.3 -2.4 1" sizen="23 5" halign="center" valign="center" textsize="2.5" textcolor="FFFF" text="Replay track for '.$coppers.' coppers!"></label>
    </frame>
   </manialink>';
   $aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
   }
}
Tabs will be massively out on that since I just typed it straight into the message box, but you see the point. Thanks Ant :)

Btw you missed the array() tag from your SendDisplayManialinkPage, but other than that I'd imagine your way would work too :)
"Never surrender, sometimes retreat"

Image

Scottish Flat Trax servers

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Ant » 04 Oct 2011 17:08

No problem man, I thought i'd probably have missed something :)

Edit: It seems I missed a closing bracket as well but after fixing that and trying the code with and without array tags, I found out my code makes this not display at all so your fix will be the best (and only solution) from the two of them.

User avatar
Leigham
happy cruiser
happy cruiser
Posts: 139
Joined: 26 Mar 2011 01:04
Owned TM-games: TMUF, TMNF, TM²
Manialink(s): None

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Leigham » 05 Oct 2011 10:30

OK, thanks Ant. I'll test my one this evening and update the files if it works :)
"Never surrender, sometimes retreat"

Image

Scottish Flat Trax servers

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Ant » 05 Oct 2011 13:49

Just tested your code, that also doesn't work - the plugin won't display at all, as is the same with my code.

User avatar
Leigham
happy cruiser
happy cruiser
Posts: 139
Joined: 26 Mar 2011 01:04
Owned TM-games: TMUF, TMNF, TM²
Manialink(s): None

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Leigham » 05 Oct 2011 14:37

May we both be pelleted with stale croissants. I'm going on now, so I'll knock some sense into it :)
"Never surrender, sometimes retreat"

Image

Scottish Flat Trax servers

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Ant » 05 Oct 2011 16:40

haha nice :thumbsup:

yamyam
happy cruiser
happy cruiser
Posts: 147
Joined: 15 Sep 2011 00:38
Owned TM-games: TM1 Vanilla,TMS,TM2C

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by yamyam » 11 Oct 2011 14:18

Hi!

Great widget ... but i got some questions:

1. Will this work on Xaseco2 with TM2?
2. Why isnt there any config file to adjust the position, the colors, the text and so on?

Could you please add a config.xml - then i could use it too. great! :thumbsup:
Last edited by yamyam on 13 Oct 2011 17:51, edited 1 time in total.
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit one of our TM2-Clanservers or download the INSOMNIA TM2-Trackpack !
You may also visit us at our Mania-Exchange Clan-Profile.

User avatar
Leigham
happy cruiser
happy cruiser
Posts: 139
Joined: 26 Mar 2011 01:04
Owned TM-games: TMUF, TMNF, TM²
Manialink(s): None

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Leigham » 11 Oct 2011 17:18

Config is at the beginning of the php itself, it's too small to really merit a separate xml. And yes it will work with xaseco2.
"Never surrender, sometimes retreat"

Image

Scottish Flat Trax servers

yamyam
happy cruiser
happy cruiser
Posts: 147
Joined: 15 Sep 2011 00:38
Owned TM-games: TM1 Vanilla,TMS,TM2C

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by yamyam » 12 Oct 2011 11:25

Think that over, most ppl run a hosted serber and are not allowed to edit any php files - but the config xml files, thats what they are for. Config schould never been in the php itself.

So it would be great, however small it would be, to add a config.xml - elese i cant use it :(
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit one of our TM2-Clanservers or download the INSOMNIA TM2-Trackpack !
You may also visit us at our Mania-Exchange Clan-Profile.

User avatar
Leigham
happy cruiser
happy cruiser
Posts: 139
Joined: 26 Mar 2011 01:04
Owned TM-games: TMUF, TMNF, TM²
Manialink(s): None

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by Leigham » 12 Oct 2011 16:08

Then you're welcome to edit the php so it supports an xml. There are a lot of examples you can use :)
"Never surrender, sometimes retreat"

Image

Scottish Flat Trax servers

yamyam
happy cruiser
happy cruiser
Posts: 147
Joined: 15 Sep 2011 00:38
Owned TM-games: TM1 Vanilla,TMS,TM2C

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by yamyam » 12 Oct 2011 17:36

If you do a widget, do it right.
I think there is nothing more to say :roll:
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit one of our TM2-Clanservers or download the INSOMNIA TM2-Trackpack !
You may also visit us at our Mania-Exchange Clan-Profile.

TheBigG
smooth traffic navigator
smooth traffic navigator
Posts: 233
Joined: 16 Oct 2010 19:45
Owned TM-games: TMN! TMF
Location: Germany

Re: [Xaseco 1+2] ReplayCharge Plugin

Post by TheBigG » 12 Oct 2011 19:21

yamyam wrote:If you do a widget, do it right.
I think there is nothing more to say :roll:
:lol: :roflol: :0010
i hope this is a joke man :roll:

Post Reply