Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.
Moderators: Xymph, TM-Patrol
-
weerwolf1
- smooth traffic navigator

- Posts: 236
- Joined: 08 May 2008 09:25
- Owned TM-games: All but original
- Location: The Netherlands
Post
by weerwolf1 » 31 Jan 2010 00:23
Hi all,
I found that the times displayed horizontally with the checkpoints below where so much apart, it took me to long time to compare cp's with my opponents. I have added a new funtion which displays the round times below each other ans the cp's from left to right. (see screenshot)
Added in plugins.bestruns.php :
Code: Select all
elseif ($orientation == 4){
display_best_runs_v4($aseco);
}
and:
Code: Select all
function display_best_runs_v4($aseco){ // affiche les best runs | Modified by weerwolf 30.01.2010
global $tab_meilleurs_temps;
$config = simplexml_load_file('bestruns.xml');
//==================
//print_r($config);
//print_r($tab_meilleurs_temps);
$posx_frame = $config->position->x; //main x position of the widget
$posy_frame = $config->position->y; //main y position of the widget
$nb_temps_cp = $config->checkpoints->nb_bestruns_with_cp;
$nb_cp_temps = $config->checkpoints->nb_max_checkpoints;
$texte;
$min=0;
$sec=0;
$cen=0;
$i = 0;
$place = 1;
$posx;
$xml='<?xml version="1.0" encoding="UTF-8"?>';
$xml.='<manialink id="342312">';
$xml.='<frame posn="' .$posx_frame. ' ' .$posy_frame. '">';
$xml.='<format textsize="1"/>';
foreach($tab_meilleurs_temps as $info){ //pour chaque enregistrement
$min = (int) (($info->temps) / 60000);
$sec = (int) ((($info->temps) - $min * 60000) / 1000);
$cen = (int) (($info->temps - $min*60000 - $sec*1000) / 10);
$texte ="$z$place. $0f9";
$texte .= "$min:";
if ($sec < 10) $texte .= "0";
$texte .= $sec.'.';
if ($cen < 10) $texte .= "0";
$texte .= $cen;
$posy = $i * (-2);
$xml.='<quad posn="0 ' .$posy. '" sizen="14 2.2" halign="center" valign="center" style="Bgs1InRace" substyle="NavButton" />';
$posy = $posy+0.1;
$xml.='<label posn="-6.2 ' .$posy. '" sizen="6.5 2" halign="left" valign="center" text="'.$texte.'"/>';
$xml.='<label posn="-0.4 ' .$posy. '" sizen="6.5 2" halign="left" valign="center" text="'.$info->nickname.'"/>';
if ($i < $nb_temps_cp){ // affiche les checkpoints de chaque temps
$ii = 0;
foreach ($info->checks as $cp){
if ($ii < $nb_cp_temps){
$minn = (int) (($cp) / 60000);
$secc = (int) ((($cp) - $minn * 60000) / 1000);
$cenn = (int) (($cp - $minn*60000 - $secc*1000) / 10);
$textee ="$z$fff";
$textee .= "$minn:";
if ($secc < 10) $textee .= "0";
$textee .= $secc.'.';
if ($cenn < 10) $textee .= "0";
$textee .= $cenn;
$posx = 9.5 + ($ii * (5.2));
$xml.='<quad posn="' .$posx. " " .$posy. '" sizen="5.5 2.2" halign="center" valign="center" style="Bgs1InRace" substyle="NavButton" />';
$xml.='<label posn="' .$posx. " " .$posy. '" sizen="5.5 2" halign="center" valign="center" text="'.$textee.'"/>';
$ii++;
}else{
break;
}
}
}
$i++;
$place++;
}
$xml.='</frame></manialink>';
$aseco->client->query("SendDisplayManialinkPage", $xml, 0, false); //requete d'affichage
}
Hope you can use it

-
weerwolf1
- smooth traffic navigator

- Posts: 236
- Joined: 08 May 2008 09:25
- Owned TM-games: All but original
- Location: The Netherlands
Post
by weerwolf1 » 21 Feb 2010 20:37
Ok..... Was the idea above so awful that you even did not try to give a comment of it and considering adding it to updates?

-
Xymph
- Pit Crew

- Posts: 5726
- Joined: 19 Aug 2007 12:58
- Owned TM-games: TMN, TMU, TMF, TM²
-
Contact:
Post
by Xymph » 22 Feb 2010 08:57
You seem to have forgotten to include the Readme file that was in the previous version of the zip.
-
afisse
- cyclist

- Posts: 48
- Joined: 13 Jun 2009 11:54
- Owned TM-games: TMUF
Post
by afisse » 01 Mar 2010 08:59
weerwolf1 wrote:Ok..... Was the idea above so awful that you even did not try to give a comment of it and considering adding it to updates?

Main Post
viewtopic.php?f=127&t=22232
Galaad, le chevalier au coeur pur
-
pepel
- cyclist

- Posts: 40
- Joined: 30 Sep 2010 16:33
- Owned TM-games: TMNF
Post
by pepel » 25 Oct 2010 17:36
afisse wrote:Hi all, here is the best Checkpoints widget
how to configurate it like author pic?
give me cod pls
Last edited by
Xymph on 25 Oct 2010 18:27, edited 1 time in total.
Reason: Fixed quoting
-
w1lla
- TM-Patrol

- Posts: 1466
- Joined: 23 May 2007 07:20
- Owned TM-games: TMU, TMN, TMF
- Manialink(s): intr
- Location: Venray
Post
by w1lla » 25 Oct 2010 17:46
try one of these in the .xml provided.
Code: Select all
<orientation>1</orientation><!--0 : horizontal, 1 : vertical_V1, 2 : vertical_V2, 3 : vertical_V3 -->
Code: Select all
tmnforever is nations and united makes it special. tmnforever has united. I need united!
-
micsoccer10
- highway camper

- Posts: 4
- Joined: 03 Mar 2008 21:49
- Owned TM-games: TMU
Post
by micsoccer10 » 03 Nov 2010 21:26
Hi ! How I can close the plugin when we are at the scores ?
-
Ant
- TM-Patrol

- Posts: 1845
- Joined: 01 Dec 2007 17:04
- Owned TM-games: TMN, TMUF, TM Wii
- Location: London, England
-
Contact:
Post
by Ant » 03 Nov 2010 22:28
In v1.1 add this after line 14 in plugin.bestcps.php
Code: Select all
Aseco::registerEvent('onEndRace', 'clear_bestcps');
That will call this function (which is lines 252 - 255)
Code: Select all
function clear_bestcps($aseco, $challenge){//efface le widget entre 2 challenges
$xml = '<manialink id="123123456"></manialink>';
$aseco->client->query("SendDisplayManialinkPage", $xml, 1, false);
}
-
micsoccer10
- highway camper

- Posts: 4
- Joined: 03 Mar 2008 21:49
- Owned TM-games: TMU
Post
by micsoccer10 » 04 Nov 2010 21:05
OMG It work !
Thanks you so much !
-
Ant
- TM-Patrol

- Posts: 1845
- Joined: 01 Dec 2007 17:04
- Owned TM-games: TMN, TMUF, TM Wii
- Location: London, England
-
Contact:
Post
by Ant » 05 Nov 2010 18:56
no problem man

-
nerve
- highway camper

- Posts: 2
- Joined: 20 Mar 2010 23:52
- Owned TM-games: TMUF
Post
by nerve » 07 Nov 2010 22:01
fixed it, online zip updated - you can download it again from same link