Reading chat from process, building block of chatlines menu

User Tag List

Results 1 to 7 of 7
  1. #1
    radarlove's Avatar Contributor
    Reputation
    158
    Join Date
    Jun 2012
    Posts
    205
    Thanks G/R
    2/11
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reading chat from process, building block of chatlines

    So,

    I managed to read the chat lines from the WoW-process (removed names in this example).
    Code:
    LINE:  Type: [17], Channel: [Trade - City], Player Name: [XXXXXXXX], Sender GUID: [0300000003C4835F], Active player: [030000000384EEDE], Text: [LFM DS 10 normal Fun run (Blazing drake reserved) we're going for a speed run / w me! <3 (any1 level 85+ welcome) 5
    LINE:  Type: [17], Channel: [Trade - City], Player Name: [XXXXXXXX], Sender GUID: [03000000036A528F], Active player: [030000000384EEDE], Text: [LFM for RBG cap. Need 1 FC, last spot.]
    LINE:  Type: [17], Channel: [Trade - City], Player Name: [XXXXXXXX], Sender GUID: [0300000003DDC2F6], Active player: [030000000384EEDE], Text: [WTS 17x  |cff1eff00|Hitem:72238:0:0:0:0:0:0:396631728:90:0:0|h[Golden Lotus]|h|r Cheaper than AH]
    So the basic building blocks in these lines I see:
    1) Type
    2) Channel
    3) Player Name / Sender Guid
    4) Active Player
    5) Text

    My questions:
    - Are these all "building blocks"? Are there more in other types of messages?
    - Is there some sort of description of the "1/Type". And is the Type to describe the type of message like guild/whisper/yell/say/etc.?
    - How do you guys remove linked items from the Text?

    thx for your replies,
    RL

    Reading chat from process, building block of chatlines
  2. #2
    dan934's Avatar Banned
    Reputation
    33
    Join Date
    Jun 2009
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    see here: http://www.ownedcore.com/forums/worl...ml#post2589839 (Looking for Guides to handle wow chat)

    x86 offsets for 5.1.0(untested but should work):
    Code:
    private const int ChatBufferStart_x86 = 0xCCBD68;
    private const int ChatBufferPos_x86 = 0xD25300;
    his example shows some information about the message struct.

    as for chat Type, according to the WoW API:

    chatType
    String - (Optional) The type of chat message to be sent, "SAY", "PARTY", etc. See the list of chatTypeIds.
    If chatType is nil or omitted then "SAY" will be used.

    channel
    String - The channel or player receiving the message for "CHANNEL"/"WHISPER" communication. If sending to a channel you must use the number (eg. "1"); obtain it using GetChannelName("channelName"). This field is required for the "CHANNEL"/"WHISPER" chat types and ignored for any other chat type.

    hope this helps.
    Last edited by dan934; 12-01-2012 at 07:45 PM.

  3. #3
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also remove guid's from your output data? Unless they are edited*?

    To seperate out the linked item (I don't know, just guessing)
    Code:
    LINE:  Type: [17], Channel: [Trade - City], Player Name: [XXXXXXXX], Sender GUID: [0300000003DDC2F6], Active player: [030000000384EEDE], Text: [WTS 17x  |cff1eff00|Hitem:72238:0:0:0:0:0:0:396631728:90:0:0|h[Golden Lotus]|h|r Cheaper than AH]
    Text: [WTS 17x  |cff1eff00|Hitem:72238:0:0:0:0:0:0:396631728:90:0:0|h[Golden Lotus]|h|r Cheaper than AH]
    breaking down the output, the 'Text' is in the format [some text][linkitemstuff][more text]
    and it looks like linkitemstuff has delimeters? the |c |H |h |h |r
    not sure how to seperate based on that vertical bar (shift + backslash key?) but you could use String.IndexOf() to find the vertical bars, and go from there? Maybe start a text file filled with example chat Txts that have links in them -- then try to deduce if there is common format with the |c |h |H things. (or maybe those are common strings and i'm just ignorant to them?)

    based off this 1 example: every link text starts with |c and ends with |r
    or maybe just starts with any |? and ends with any |? (where ? is wildcard for 1 letter)
    -- probably need more example to figure out the format tho.

    edit: my way won't work. Because you still need some of the data from inside the link (ie. the item name in this example), so you need to figure out the format of the |?'s
    Last edited by abuckau907; 12-02-2012 at 12:57 AM.
    Some things that can be counted, don't matter. And some things that matter, can't be counted.

  4. #4
    dan934's Avatar Banned
    Reputation
    33
    Join Date
    Jun 2009
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "|cff1eff00" is used to change the color of the text (i.e |cff1eff00 would represent Uncommon items).
    "|H" notes the start of the hyperlink in chat
    "item:72238:0:0:0:0:0:0:396631728:90:0:0" is the link for Golden Lotus
    "|h" end of itemlink
    "[Golden Lotus]" text to be displayed(green as referenced by the earlier tokens)
    "|h" end of hyperlink
    "|r" restores color to normal

    references:

    itemLink - WoWWiki - Your guide to the World of Warcraft
    itemString - WoWWiki - Your guide to the World of Warcraft
    API GetItemQualityColor - WoWWiki - Your guide to the World of Warcraft
    Last edited by dan934; 12-02-2012 at 02:26 AM.

  5. #5
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @dan934: thanks.

    so, it should just be a matter of finding the delimeters and pulling out the pieces you want. String manipulation stuff. will post some pseudocode later.

    @radar: tell us when you find solution so we don't keep posting
    Some things that can be counted, don't matter. And some things that matter, can't be counted.

  6. #6
    radarlove's Avatar Contributor
    Reputation
    158
    Join Date
    Jun 2012
    Posts
    205
    Thanks G/R
    2/11
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by abuckau907 View Post
    @radar: tell us when you find solution so we don't keep posting
    Sorry, didn't have a chance to reply :-) Wednesdays are my coding days, so didn't have time yet to do anything.
    But im 100% sure I can make a good function to read chat in Delphi (my preferred devtool) now. So, I found my solution

    Anyone wanna see the function when I actually worked it out?

  7. #7
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can remove item links (and other links) with Regex:
    Code:
    const string pattern = @"(\|c([0-9a-f]{8})\|H([a-z]+)(?::-?\d+|:[\dA-F]{16}|:[\w+/]+)+\|h)(\[[\w'\(\)\-\.–!: ]+\])(\|h\|r)";
    string result = Regex.Replace(msg, pattern, "$4");
    Reading chat from process, building block of chatlines-dc2ea-png
    Last edited by TOM_RUS; 12-04-2012 at 01:21 PM.

Similar Threads

  1. Read Chat messages out-of-process
    By kajko in forum WoW Memory Editing
    Replies: 2
    Last Post: 05-06-2011, 10:55 AM
  2. Reading Chat Out-of-Process
    By RiseAndShine in forum WoW Memory Editing
    Replies: 9
    Last Post: 06-06-2009, 02:10 AM
  3. WOTLK Music, extracted from current build.
    By Hasbro in forum World of Warcraft General
    Replies: 4
    Last Post: 11-08-2008, 03:41 PM
  4. [help] reading chat pane (for zeppelin arrivals)
    By korknob in forum WoW Memory Editing
    Replies: 2
    Last Post: 05-17-2008, 06:00 AM
  5. Memory Reading Chat, w/ help from an Add-On
    By Vector0 in forum WoW Memory Editing
    Replies: 6
    Last Post: 05-08-2008, 10:00 AM
All times are GMT -5. The time now is 04:55 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search