Chat¶
Methods to interact with the chat box.
Chat.GetDisplayNameBox¶
function TRSChat.GetDisplayNameBox(Colors: TIntegerArray = [$FFFFFF, $000000]): TBox;
function TRSChat.GetDisplayNameBox(Colors: TIntegerArray = [$FFFFFF, $000000]): TBox; overload;
Get the user name box. Useful for certain things like hiding the username for screenshots.
Example:
Debug(Chat.GetDisplayNameBox());
Chat.GetDisplayName¶
function TRSChat.GetDisplayName(Colors: TIntegerArray = [$FFFFFF, $000000]): String;
Get the user displayed name.
Example:
WriteLn('The user name is: ', Chat.GetDisplayName());
Chat.IsTransparent¶
function TRSChat.IsTransparent: Boolean;
Returns true if the chat box is in transparent mode.
Example:
WriteLn Chat.IsTransparent();
Chat.IsOpen¶
function TRSChat.IsOpen: Boolean;
Returns true if the chat box is open.
Example:
WriteLn Chat.IsOpen;
Chat.GetQuery¶
function TRSChat.GetQuery: String;
Returns the query question.
Example:
WriteLn Chat.GetQuery;
Chat.GetQueryAnswer¶
function TRSChat.GetQueryAnswer: String;
Returns the currently typed answer.
Example:
WriteLn Chat.GetQueryAnswer;
Chat.FindQuery¶
function TRSChat.FindQuery(Query: String; WaitTime: Integer; Interval: Integer = -1): Boolean;
Returns true if the specified Query is currently open or opens up within WaitTime.
Example:
WriteLn Chat.FindQuery('How many doses', 2000); //Example query of NMZ Potion Barrels.
Chat.AnswerQuery¶
function TRSChat.AnswerQuery(Query, Answer: String; WaitTime: Integer; Interval: Integer = -1): Boolean;
Replies with Answer to the specified Query.
Example:
Chat.AnswerQuery('How many doses', '20', 2000); //Example query of NMZ Potion Barrels.
Chat.GetMessage¶
function TRSChat.GetMessage(Line: Integer; Colors: TIntegerArray = CHAT_MESSAGE_COLORS): String;
Get the message in the specified Line.
Example:
WriteLn Chat.GetMessage(5);
Chat.GetMessages¶
function TRSChat.GetMessages(Colors: TIntegerArray = CHAT_MESSAGE_COLORS): TStringArray;
Returns an array of chat messages on all lines.
Chat.HasMessage¶
function TRSChat.HasMessage(Message: String; Colors: TIntegerArray = CHAT_MESSAGE_COLORS): Boolean;
Returns true if any line contains the text Message.
Example:
if Chat.HasMessage('Hello') then
WriteLn('Hello!');
Chat.Setup¶
procedure TRSChat.Setup; override;
Initializes Chat variables.
Note
This is automatically called on the Chat variable.
var Chat