-
Member
[Question]chatlog problem
Hey, i just tried to read the chatlog and i just get some crazy text
Code:
BlackMagic WoW = new BlackMagic();
WoW.OpenProcessAndThread(SProcess.GetProcessFromProcessName("Wow.exe"));
for (uint i = 0; i < 60; i++)
{
string Chat = WoW.ReadASCIIString(0x00B0E990 + i * 0x17C0, 255);
list1.Items.Add(Chat);
}

hope for some help :|
greetings
-
Member
If I'm not totally wrong WoW uses unicode, so reading the chat as ascii chars will ofcourse make no sens at all.
-
Active Member
Code:
BlackMagic WoW = new BlackMagic();
WoW.OpenProcessAndThread(SProcess.GetProcessFromProcessName("Wow.exe"));
for (uint i = 0; i < 60; i++)
{
string Chat = WoW.ReadASCIIString((0x00B0E9CC + (0x17C0 * i)), 255); // <-- see what i did thar?
list1.Items.Add(Chat);
}
drugs are baad kids.. m'kay.
-
Member
Originally Posted by
zutto
Code:
BlackMagic WoW = new BlackMagic();
WoW.OpenProcessAndThread(SProcess.GetProcessFromProcessName("Wow.exe"));
for (uint i = 0; i < 60; i++)
{
string Chat = WoW.ReadASCIIString((0x00B0E9CC + (0x17C0 * i)), 255); // <-- see what i did thar?
list1.Items.Add(Chat);
}
oh god damned thanks.. works just fine!
-
Active Member
Originally Posted by
zutto
Code:
BlackMagic WoW = new BlackMagic();
WoW.OpenProcessAndThread(SProcess.GetProcessFromProcessName("Wow.exe"));
for (uint i = 0; i < 60; i++)
{
string Chat = WoW.ReadASCIIString((0x00B0E9CC + (0x17C0 * i)), 255); // <-- see what i did thar?
list1.Items.Add(Chat);
}
c# doesn't respect the hierarchical laws in math? 0.o
-
Corporal
Originally Posted by
!@^^@!
c# doesn't respect the hierarchical laws in math? 0.o
It does. That's not the significant change he made.
-
Kynox's Sister's Pimp
Originally Posted by
Xarg0
If I'm not totally wrong WoW uses unicode, so reading the chat as ascii chars will ofcourse make no sens at all.
That's where things get confusing. "Unicode" is a very broad term. What you mean is that WoW uses UTF-8, which is backwards compatible with ASCII. On the other hand, when the term "Unicode" is used in a Windows-based context it usually implies UTF-16, because that's the encoding that Windows uses internally for all its strings.
I typically use the terms "narrow" and "wide" to differentiate between the two, but that's mainly because I come from a C++ background where there are only two character and string types, and their encodings are implementation defined.*
So, when you're reading strings from WoW you'll generally be reading them as "ASCII" (at least as far as most APIs are concerned), despite the fact that they are technically UTF-8 encoded Unicode strings.
* This will be changing in C++0x where we will finally get character types which specify their encoding (char16_t, char32_t).
-
Banned
$ChatBufferStart = 0x00B0E990
$NextMessage = 0x17C0
$Compteurchat=0xB67F24
$compteur=_MEMORYREAD($Compteurchat,$process,"dword") -1
$buffer=_MEMORYREAD($ChatBufferStart+($compteur*$NextMessage)+0x3C,$process,"cha r[500]"))
-
Member
Originally Posted by
Cypher
That's where things get confusing. "Unicode" is a very broad term. What you mean is that WoW uses UTF-8, which is backwards compatible with ASCII. On the other hand, when the term "Unicode" is used in a Windows-based context it usually implies UTF-16, because that's the encoding that Windows uses internally for all its strings.
I typically use the terms "narrow" and "wide" to differentiate between the two, but that's mainly because I come from a C++ background where there are only two character and string types, and their encodings are implementation defined.*
So, when you're reading strings from WoW you'll generally be reading them as "ASCII" (at least as far as most APIs are concerned), despite the fact that they are technically UTF-8 encoded Unicode strings.
* This will be changing in C++0x where we will finally get character types which specify their encoding (char16_t, char32_t).
but it's always a good idea to read the chars in right size, because depending on the locale you'll need wide chars, for example in the russian version wow you'll face cyrillic script, wich is not supported in the ascii world.
I didn't knew that utf-8 was backward compatible, so thanks for clearing that up.
-
Kynox's Sister's Pimp
Originally Posted by
Xarg0
but it's always a good idea to read the chars in right size, because depending on the locale you'll need wide chars, for example in the russian version wow you'll face cyrillic script, wich is not supported in the ascii world.
I didn't knew that utf-8 was backward compatible, so thanks for clearing that up.
Huh? What are you talking about? Reread what I said. I said you are reading them as ASCII "as far as the APIs are concerned", as most people still label their APIs incorrectly as ASCII rather than UTF-8.
Last edited by Cypher; 03-22-2010 at 10:56 AM.
-
Post Thanks / Like - 1 Thanks
Fufavu (1 members gave Thanks to Cypher for this useful post)