Updated Battle Mode Script

Moderator: NADEO

Post Reply
User avatar
Emilieng
Posts: 70
Joined: 17 Dec 2012, 13:13
Contact:

Updated Battle Mode Script

Post by Emilieng » 19 Feb 2013, 10:19

Here is the new script for Battle mode (version 2013-02-19). It fixes the issue with ladder points calculation.
Please use this script instead of the previous one.

Thank you very much :thumbsup:

User avatar
franck70
Posts: 228
Joined: 10 Jan 2011, 18:15
Location: France/Rhone-Alpes/Isère

Re: Updated Battle Mode Script

Post by franck70 » 19 Feb 2013, 22:03

Ty :thumbsup:
Image

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Updated Battle Mode Script

Post by kremsy » 20 Feb 2013, 15:07

I try to ask it again. Please nadeo put some Callbacks in every script, especially in the Script we can't access.

It is always anoying to update the scripts every week or something, and for you it is only some lines to add.

Please add only these few lines in all your scripts!

Code: Select all

XmlRpc.SendCallback("beginMap", "");

XmlRpc.SendCallback("beginRound",GetRankings());

XmlRpc.SendCallback("playerDeath", Event.Victim.Login);   
XmlRpc.SendCallback("poleCapture", Players[PlayerId].Login);       
XmlRpc.SendCallback("playerRespawn", Event.Player.Login);
XmlRpc.SendCallback("playerSurvival", Event.Player.Login);
XmlRpc.SendCallback("playerHit", "Victim:"^Event.Victim.Login^";Shooter:"^Event.Shooter.Login^";"^Points);   

XmlRpc.SendCallback("endRound",GetRankings());
XmlRpc.SendCallback("endMap",GetRankings());

// Get the current rankings for xmlrpc callbacks
Text GetRankings() {
	declare PlayerList = "";
	foreach (Score in Scores) {
		PlayerList ^= Score.User.Login^":"^Score.Points^";";
	}
	return PlayerList;
}

The Endmap Callback should come directly after:
***EndMap***
***

You can save us hours of work, if you add these lines once in your scripts.
It would be a great beginn to get a better serversoftware.
If you don't have time to do it, we can add this callbacks for you and send you the scripts than.

Another request would be, if there will be no method in the serversoftware, than let us disable and enable the alt menu via the TriggerModeScriptEvent in every mode (best would be if you include it into a libary) (especially Royal, Elite, Heroes), like this:

Code: Select all

$xyz->client->query('TriggerModeScriptEvent', 'disableAltMenu', $login);  
$xyz->client->query('TriggerModeScriptEvent', 'enableAltMenu', $login);  
And also for the scriptmakers, please please make the scoreboard 2cm smaller on the left and right side!

Thank you!

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Updated Battle Mode Script

Post by kremsy » 21 Feb 2013, 21:05

I just putted the most Important Callbacks in the Battlescript / Realm / Siege / Melee.

Here is the new Battle script with XML-Callbacks

Here is the Realm script with XML-Callbacks
In Realms would be nice if you can put the flaggs to the middle like in the battle script!

Here is the Siege script with XML-Callbacks

Here is the Melee script with XML-Callbacks

Please nadeo, put them into your next release!

In royal we need the following callbacks:

Code: Select all

After StartMap:
[b]XmlRpc.SendCallback("beginMap","");[/b]

After StartRound:
XmlRpc.SendCallback("beginRound",GetRankings());

After Top::IncrementPlayerPoints("Survival", Player, 1):
XmlRpc.SendCallback("playerSurvival", Player.Login);	

After Top::IncrementPlayerPoints("Hit", Event.Shooter, Points);
XmlRpc.SendCallback("playerHit", "Victim:"^Event.Victim.Login^";Shooter:"^Event.Shooter.Login^";"^Points);	

After the Player got Eliminated:
XmlRpc.SendCallback("playerDeath", Event.Victim.Login);

After Top::IncrementPlayerPoints("Pole", Player, Points):
XmlRpc.SendCallback("poleCapture", Players[PlayerId].Login);

After declare Removed = PlayersAlive.removekey(Event.Player.Id);
XmlRpc.SendCallback("playerRespawn", Event.Player.Login);

After EndRound:
XmlRpc.SendCallback("endRound",GetRankings());

After MapEnd:
XmlRpc.SendCallback("endMap",GetRankings());

and the Rankings Method.
And please put the callbacks in the scripts we have no access (especially Royal).

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Updated Battle Mode Script

Post by kremsy » 10 Apr 2013, 22:27

Thank you very much Nadeo for implementing the callbacks finally!

XmlRpc.SendCallback("playerSurvival", Event.Player.Login);
For royal would be nice.
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

User avatar
Eole
Nadeo
Nadeo
Posts: 1262
Joined: 26 Apr 2011, 21:08

Re: Updated Battle Mode Script

Post by Eole » 12 Apr 2013, 14:02

There should be a "Royal_UpdatePoints" callback in Royal. It returns an array with 3 entries:
- The player login
- The type of point: Hit, Survival, Pole
- The number of points

It's sent from the script each time a player scores 1 point. Does it solve your problem or do you need a special callback for a more specific use?

PS: I'll post a complete list of the script callbacks I added in the latest update later today.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Updated Battle Mode Script

Post by kremsy » 12 Apr 2013, 16:21

Eole wrote:There should be a "Royal_UpdatePoints" callback in Royal. It returns an array with 3 entries:
- The player login
- The type of point: Hit, Survival, Pole
- The number of points

It's sent from the script each time a player scores 1 point. Does it solve your problem or do you need a special callback for a more specific use?

PS: I'll post a complete list of the script callbacks I added in the latest update later today.
Thank you very much for these great callbacks eole!

I know the whole list of the callbacks, thank you for implement them!

As Survival I meant, only the last player (the player who won the Round).

And please take a look to this post: http://forum.maniaplanet.com/viewtopic. ... 30#p158639
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 2 guests