Variables (Global) NewLine
Shortcut to add a line within a string.
Shortcut to add a line within a string.
"\r\n"
Pi
3.141592653589793238
3.141592653589793238
3.141592653589793238
TwoPi
6.283185307179586476
6.283185307179586476
6.283185307179586476
Overview
This library is needed to use ther IF server's features.
The server library is necessary for the MIFL scripting language to communicate with the "MIF Server". It provides functionality for managing user connections over the internet. It accepts new user connections, sends and receives messages to users, etc.
List of Strings
List of Resources rHelpCopyright
Copyright information.
Copyright information
Circumreality is copyright 2001-2009 by Mike Rozak, all rights reserved.
See http://www.mXac.com.au for
more information.
The lexicon for text-to-speech comes from CMU University.
rTitleInfo
You must have one (and only one) rTitleInfo for every interactive fiction title. This is a placeholder resource that can be overridden.
rVoiceChatInfoDefault
Default voice-chat features that a player can use. You may wish to customize this for your own need, perhaps even on a character-race basis.
Method Definitions ConnectionEnd
Called just before the connection object is destroyed..
ConnectionEnd() is called after just before a cConnection object is destroyed. You should replace this method with whatever functionality a connection should undertake when its shutting down.
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionError
Called with an error occurs in the connection.
This method is called when an error occurs with the connection, basically meaning that a disconnect is necessary because the connection has terminated.
The default behavior of the ConnectionError() call for the Connection object is to delete itself.
Parameter Name
|
Description
|
ErrorNumber
|
Error number.
|
ErrorString
|
String describing the error.
|
Return value description
|
None
|
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionInfoForServer
Called when miscellaneous pieces of information are sent to the server.
Called when miscellaneous pieces of information are sent to the server. This includes messages for the user's time zone, graphics speed, and language.
Parameter Name
|
Description
|
Name
|
This is the value name. Currently, it can be:
"artstyle" - A number from 0 to 3 for the art style to use. See gVisualPainterlyNames.
"timezone" - The current time zone. Add this value (in hours) to GMT to create the local time.
"langid" - The current Windows language ID. "1033" is American English, for example.
"graphspeed" - The graphics speed setting that the user has chosen, from 0 to 4.
|
Value
|
A string value.
|
Return value description
|
None
|
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionLogOff
Called with a logoff message is received from the client.
Called with a logoff message is received from the client. It means that the client has shut down.
The default behavior of the ConnectionLogOff() is to set a timer for 30 (or whatever) seconds that will then cause a shutdown.
Parameter Name
|
Description
|
TimeToShutdown
|
If this is a number, then it's the number of seconds before the connection will shut down.
If this is 0 then the shutdown is aborted.
If Undefined or NULL, then the connection will shut down in 30 seconds, or whatever gConnectionLogOffTime is.
|
Return value description
|
None
|
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionMessage
Called with a new command message comes in from the client.
This method is called by the server when a new message comes in from the client. It is up to the client to process the message.
You should override this to handle the incoming message. Usually this involves forwarding the message to the player or character object.
Parameter Name
|
Description
|
LanguageID
|
The language of the message. This number is a standard LANGID from WindowNT. It can be passed into LanguageSet().
|
Message
|
A message string for the incoming message.
|
Return value description
|
None
|
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionSend
Sends a message to the user.
Sends a message to the user.
This also sends the message to any users that are spying on the current user.
Parameter Name
|
Description
|
MessageQueue
|
Pass true to queue this message up in the audio queue, so that if it's a message for more audio or graphics, it won't be heard/shown until it's turn in the queue.
If false then play this audio (or show the image) right away.
|
Message
|
Message to send. This is either a resource, or string that's wrapped up in MML tags to look like a resource.
|
Return value description
|
True if the message was sent, false if it failed.
|
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionSendVoiceChat
Sends a voice chat message to the user.
Sends a voice chat message to the user.
This also sends the message to any users that are spying on the current user.
Parameter Name
|
Description
|
MMLString
|
MML string to send, from MMLSpeakObjectVoiceChat().
|
VoiceChatBinary
|
Binary data of voice chat, from the connection's ConnectionVoiceChat() method.
|
Garble
|
If TRUE then garble the speech to simulate the characters not understanding one another.
|
Effect
|
0 for no effect. 1 for whisper.
|
Return value description
|
True if the message was sent, false if it failed.
|
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionStart
Called once the connection has been initialized.
ConnectionStart() is called after a new cConnection object has been created. You should replace this method with whatever functionality a new connection should undertake.
Parameter Name
|
Description
|
Return value description
|
None
|
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionUploadImage
Called with an image uploaded from the client.
This method is called by the server when a new image comes in from the client. It is up to the client to process the message.
You should override this to handle the incoming message. Usually this involves saving the image away and alerting the player.
Parameter Name
|
Description
|
Number
|
Image number, 1 based.
|
Width
|
Width of the image, in pixels.
|
Height
|
Height of the image in pixels.
|
Binary
|
JPEG binary for the image that can be saved to the database.
|
Return value description
|
None
|
Overrides: Call only the highest priority method
NOT Common to all objects
ConnectionVoiceChat
Called with voice chat data that comes from the client.
This method is called by the server when a voice chat packet comes in from one of the clients.
You should override this to handle the incoming message. Usually this involves sending the voice chat information to all players in the room.
Parameter Name
|
Description
|
SpeakTo
|
Object that the player is speaking to, or NULL if none.
|
SpeakingStyle
|
Speaking style. "speak" if normal speech. "whisper" is whispering. "shout" if yelling.
|
Language
|
Language string (localized to whatever the current language of the player is). You should make sure other players can understand the languages.
|
Binary
|
Compressed voice chat binary. This can be sent to the other players to hear and/or saved away.
|
Return value description
|
None
|
Overrides: Call only the highest priority method
NOT Common to all objects
Share with your friends: |