Chat ==== The Chat include contains all chat-related functions .. code-block:: pascal const CHAT_GAME = 0; CHAT_PUBLIC = 1; CHAT_PRIVATE = 2; CHAT_CLAN = 3; CHAT_TRADE = 4; CHAT_ASSIST = 5; SetChat ~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal SetAllChats ~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal SetAlChats('all', 'Hide', '', 'Off', '', 'Friend'); ChatsOff ~~~~~~~~ .. code-block:: pascal procedure ChatsOff; Sets all Chats to off. .. note:: by Starblaster100 Example: .. code-block:: pascal PleaseWait ~~~~~~~~~~ .. code-block:: pascal function PleaseWait : Boolean; Returns true if 'Please wait...' is in chat .. note:: by _ChArMz & Narcle Example: .. code-block:: pascal ChatWait ~~~~~~~~ .. code-block:: pascal procedure ChatWait; Waits while there's Please Wait in the chatbox. .. note:: by Nielsie95 Example: .. code-block:: pascal ClickContinue ~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal ClickToContinue ~~~~~~~~~~~~~~~ .. code-block:: pascal function ClickToContinue: Boolean; Click the blue 'Click To Continue' text in the chat box. .. note:: by ZephyrsFury Example: .. code-block:: pascal TextCoords ~~~~~~~~~~ .. code-block:: pascal Function TextCoords(textn: Integer): TPoint; Returns x, y for text. (1 to 8) .. note:: by Wizzup? Example: .. code-block:: pascal GetChatBoxText ~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal FindChatBoxText ~~~~~~~~~~~~~~~ .. code-block:: pascal function FindChatBoxText(Text: string; Line: Integer; TextCol: Integer): Boolean; Searches for Text on Line with colour TextCol. True if found. .. note:: by ZephyrsFury Example: .. code-block:: pascal IsChatBoxTextBetween ~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal IsChatBoxTextAnyLine ~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal ChatBoxTextArray ~~~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal GetBlackChatMessage ~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function GetBlackChatMessage: String; Gets text with color 0 in last chat line. .. note:: by Wizzup? Example: .. code-block:: pascal FindBlackChatMessage ~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function FindBlackChatMessage(ChatMsg: String): Boolean; Returns True if text with color 0 in last chat line is found. .. note:: by Wizzup? Example: .. code-block:: pascal LastChatter ~~~~~~~~~~~ .. code-block:: pascal function LastChatter(var name: String): Boolean; Returns name and true if a person was talking, or false and the text .. note:: by masquerader Example: .. code-block:: pascal GetLastChatText ~~~~~~~~~~~~~~~ .. code-block:: pascal function GetLastChatText(var chat: String): Boolean; Returns true if blue chat text was found .. note:: by masquerader / Wizzup? Example: .. code-block:: pascal InChat ~~~~~~ .. code-block:: pascal function InChat(Text: String): Boolean; Grabs Last Chat Line and performs checks on occurence of text .. note:: by WT-Fakawi Example: .. code-block:: pascal FixChat ~~~~~~~ .. code-block:: pascal procedure FixChat; Scrolls ChatText scrollbar down. .. note:: by WT-Fakawi Example: .. code-block:: pascal SaveToChatLog ~~~~~~~~~~~~~ .. code-block:: pascal function SaveToChatLog: Boolean; Saves chat to log file .. note:: by WT-Fakawi / masquerader Example: .. code-block:: pascal ColorEffectAdd ~~~~~~~~~~~~~~ .. code-block:: pascal function ColorEffectAdd(Color, Effect: Boolean): string; Returns a RS chat effect based on 'Color' and 'Effect' booleans. .. note:: by NiCbaZ Example: .. code-block:: pascal