The Chat include contains all chat-related functions
const
CHAT_GAME = 0;
CHAT_PUBLIC = 1;
CHAT_PRIVATE = 2;
CHAT_CLAN = 3;
CHAT_TRADE = 4;
CHAT_ASSIST = 5;
function SetChat(state: string; chat: Integer): Boolean;
Sets Chat to desired state Game Public Private Clan Trade Assist 0 1 2 3 4 5
Note
by Wizzup?, WT-Fakawi, Starblaster100, N1ke! & Coh3n
Example:
procedure SetAllChats(Game, Pub, Priv, Clan, Trade, Assist: string);
Sets all the chats to a particular state in one simple procedure. Leave the parameter as ‘’ if you wish to leave the chat as it is.
Note
by ZephyrsFury
Example:
SetAlChats('all', 'Hide', '', 'Off', '', 'Friend');
function PleaseWait : Boolean;
Returns true if ‘Please wait...’ is in chat
Note
by _ChArMz & Narcle
Example:
procedure ChatWait;
Waits while there’s Please Wait in the chatbox.
Note
by Nielsie95
Example:
function ClickContinue(Click, Wait: Boolean): Boolean;
Returns true if the blue ‘Click To Continue’ text in the chat box is found. If will click if Click = True, calls ChatWait if Wait = True.
Note
by _ChArMz & Narcle (Original by EvilChicken!)
Example:
function ClickToContinue: Boolean;
Click the blue ‘Click To Continue’ text in the chat box.
Note
by ZephyrsFury
Example:
Function TextCoords(textn: Integer): TPoint;
Returns x, y for text. (1 to 8)
Note
by Wizzup?
Example:
function GetChatBoxText(Line, TextCol: Integer): string;
Gets text on the line Line with colour TextCol. (Line 1 is the top, Line 8 is the bottom line). Colours:
- clMessage/clBlack - Black text messages (“Oh Dear you are dead”, etc).
- clChat/clBlue - Chat messages from you and other players.
- clTrade/clPurple - Colour of trade request text.
- clFriend - Colour of friend and clan chat.
Works with other colours too.
Note
by ZephyrsFury
Example:
function FindChatBoxText(Text: string; Line: Integer; TextCol: Integer): Boolean;
Searches for Text on Line with colour TextCol. True if found.
Note
by ZephyrsFury
Example:
function IsChatBoxTextBetween(Text: string; TextCol, StartLine, EndLine: Integer): Boolean;
Returns true if Text with colour TextCol is found anywhere in the chat box.
Note
by ZephyrsFury
Example:
function IsChatBoxTextAnyLine(Text: string; TextCol: Integer): Boolean;
Returns true if Text with colour TextCol is found anywhere in the chat box.
Note
by ZephyrsFury
Example:
function ChatBoxTextArray(TextCol: Integer): TStringArray;
Gets and return a TStringArray with the contents of each line
with the colour TextCol (see GetChatBoxText for list of colours).
Gets and return a TStringArray with the contents of each line
with the colour TextCol (see GetChatBoxText for list of colours).
- Line 1 is Result[1]
- Line 2 is Result[2]
- Line 3 is Result[3]
- Line 4 is Result[4]
- Line 5 is Result[5]
- Line 6 is Result[6]
- Line 7 is Result[7]
- Line 8 is Result[8]
Note
by ZephyrsFury
Example:
function GetBlackChatMessage: String;
Gets text with color 0 in last chat line.
Note
by Wizzup?
Example:
function FindBlackChatMessage(ChatMsg: String): Boolean;
Returns True if text with color 0 in last chat line is found.
Note
by Wizzup?
Example:
function LastChatter(var name: String): Boolean;
Returns name and true if a person was talking, or false and the text
Note
by masquerader
Example:
function GetLastChatText(var chat: String): Boolean;
Returns true if blue chat text was found
Note
by masquerader / Wizzup?
Example:
function InChat(Text: String): Boolean;
Grabs Last Chat Line and performs checks on occurence of text
Note
by WT-Fakawi
Example:
function SaveToChatLog: Boolean;
Saves chat to log file
Note
by WT-Fakawi / masquerader
Example:
function ColorEffectAdd(Color, Effect: Boolean): string;
Returns a RS chat effect based on ‘Color’ and ‘Effect’ booleans.
Note
by NiCbaZ
Example: