Script callbacks

Moderator: NADEO

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

Re: Script callbacks

Post by Eole »

I'm working on it. I couldn't reproduce your bug exactly, but found another one. I'll transfer this part of the code from the game modes to the warm-up library and rewrite a part of it. So we'll have a better standard between modes in the next release.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
w1lla
Posts: 2396
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Script callbacks

Post by w1lla »

Is +0 also sent through a callback or only the +1,+2,+3 etc?

I mean this particular in Elite.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole »

kremsy wrote: The bug is like, when you are in warmup state, the counter counts down, 60,59,58 and you extend now warmup with 10secs it should be continue counting down 68 67... but it doesnt. If you extend the time nothing changes as long as (the warmup counts down).
Fixed. There's also a new "WarmUp_GetStatus" method. When called it'll send back a "WarmUp_Status" callback saying if the mode use the WarmUp library or not.
kremsy wrote: I also have another request is it possible to make a callback at the end of a Map which exactly says how long a Player did Play (without warmups and spectator times)?

And one question more ;). As I know there is an Autokick function in most of the scripts, is there a possability to make this generall and accessable for controllers, like receiving a Callback from the Script which the Controllers can Manage (force them to spec or kick them or whatever). Would be very nice if something is possible in that direction.
I'll see what I can do if I have the time, but it's not at the top of the priority list.
w1lla wrote:Is +0 also sent through a callback or only the +1,+2,+3 etc?

I mean this particular in Elite.
The script can't detect a +0, so it's not possible to send a callback for this specific event at the time being.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
jonthekiller
Translator
Translator
Posts: 4702
Joined: 15 Jun 2010, 11:07
Location: In Maniaplanet Alpha
Contact:

Re: Script callbacks

Post by jonthekiller »

Eole wrote:
w1lla wrote:Is +0 also sent through a callback or only the +1,+2,+3 etc?

I mean this particular in Elite.
The script can't detect a +0, so it's not possible to send a callback for this specific event at the time being.
It's possible to add this in the big todo? :roll:
Image
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole »

kremsy wrote:And one question more ;). As I know there is an Autokick function in most of the scripts, is there a possability to make this generall and accessable for controllers, like receiving a Callback from the Script which the Controllers can Manage (force them to spec or kick them or whatever). Would be very nice if something is possible in that direction.
I moved the AFK library into ModeBase.Script.txt so it will be available in all modes. There's a setting to turn on/off the library and a few callbacks and methods to control it. The library is turned off by default except in Royal, Battle and Siege.

Code: Select all

## Callbacks

##### LibAFK_IsAFK
* Data : An array with the login of the AFK player
* Example : ["Login"]
* Note : This callback is sent when the library detect an AFK player. It will be sent each time the library check AFK players until the player is removed from the Players array (spectator mode, kicked, ...).

##### LibAFK_Properties
* Data : An array with the properties of the AFK library
* Example : ["90000", "15000", "10000", "True"]
* Note : 
    * IdleTimeLimit -> Time after which a player is considered to be AFK
    * SpawnTimeLimit -> Time after spawn before which a player can't be considered to be AFK
    * CheckInterval -> Time between each AFK check
    * ForceSpec -> Let the library force the AFK player into spectator mode

## Methods

##### LibAFK_SetProperties
* Note : Set the properties of the AFK library. The parameters are in this order: IdleTimeLimit, SpawnTimeLimit, CheckInterval, ForceSpec.
* String : "LibAFK_SetProperties"
* Array : ["90000", "15000", "10000", "True"]

##### LibAFK_GetProperties
* Note : Get the properties of the AFK library. This will sent the `LibAFK_Properties` callback in return.
* String1 : "LibAFK_GetProperties"
* String2 : ""
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole »

kremsy wrote:Does this also recognize Players who timed out and are still on the server
No, the script suffer from the same problem at the moment.
kremsy wrote:And about the Time, is it in ms ?
Yes.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 1 guest