TChatMessage = class

Class describing ingame messages. Example: Scanning ingame chat, search of needed phrases

Name Result Description Code Params Examples
OID Cardinal Unique message ID
function OID: Cardinal;
There are no arguments Examples not found
Unread Boolean Returns true if the message hasnt been read
function Unread: Boolean;
There are no arguments
if (ChatMessage.Unread) then ... // if message hasnt been read then
Sender String Returns sender nickname
function Sender: String;
There are no arguments
if (ChatMessage.Sender = Party.Leader.Name) then ... // if sender - our party leader, then
Text String Message content
function Text: String;
There are no arguments
if (ChatMessage.Text = 'USE PR!') then ...   // if text of message coincide with specified, then
Time Cardinal Time elapsed since message was sent (ms)
function Time: Cardinal;
There are no arguments
if (ChatMessage.Time > 2000) then ...  // if more than 2 seconds have passed since the message was sent, then..
ChatType TMessageType Returns type of chat
function ChatType: TMessageType;
There are no arguments
if  (ChatMessage.ChatType = mtPrivate) then  // if chat type - pm, then...


Name Class Description
ChatMessage TChatMessage Buffer storing information about the last chat message. Example: Game chat scanner, looking for needed phrases


Name Result Description
TMessages.GetMessage TChatMessage Getting message from logs by index.
TL2Control.GetChatMessage TChatMessage Gets last message from a chat from another account