Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Fix overlapping text not using :%s:

Newbie Spellweaver
Joined
Sep 6, 2011
Messages
77
Reaction score
42
Code:
00591710      803C32 3A     /CMP BYTE PTR DS:[EDX+ESI],3A
00591714      74 3A         |JE SHORT 00591750

Code:
0058FFB0      803C32 3A     /CMP BYTE PTR DS:[EDX+ESI],3A
0058FFB4      74 3A         |JE SHORT 0058FFF0


3A = : in Hexadecimal.

The simple NOP in this, solve.

After done this tutorial:

s9mB - Fix overlapping text not using :%s: - RaGEZONE Forums


Credits: Me ( ProgBoss in other forum, before they speak something. ).
 

Attachments

You must be registered for see attachments list
Last edited:
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Yea... that would work.

I'm still hoping for a solution which retains a different colour between the players name and the chat text. :\
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Yea... I can think how to start, but it's a lot of work, and some natty code to skirt around.

Here's the thing... the second TextOut() API call offsets it's X co-ordinate by more the more characters are in the name, but it takes no consideration of how wide the characters are. (W compared to I for example) What you need to do is to calculate that offset X using passed the string from the first TextOut(), rather than just a fixed number of pixels per character in that string.

The method used is not too bad in Kana / Han symbols (used in East Asia) because each glyph is typically the same size anyway. It works better with non-proportional fonts too, which is why a lot of private PT clients where set to Courier font... but you still have to tweak it a bit.

Finding the width (in pixels) of the first string when rendered in the current GDI font is the only way to correctly position the second string on the screen.

The required function is not imported in the Client, so you'd have to add it. It may be easier to write a replacement function for both text displays in C(++), compile to a DLL and import that... then replace both routines in the executable with the new function in your DLL. (which will then import the missing API for you)
 
Newbie Spellweaver
Joined
Jun 4, 2012
Messages
18
Reaction score
2
Do I have to reassemble the codes like:

00591710 803C32 3A NOP

instead of

00591710 803C32 3A /CMP BYTE PTR DS:[EDX+ESI],3A

or I should change 3A > 0 (or just erase the 3A perhaps)?

'cause when I change to NOP, I got game.exe error when I try to send normal chat..
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Understand the code first. 0x3A (the comparator) is the ":" character. This is looking for the ":" to separate the name and the chat. Also, check out to which this one is a response.

It used to be hosted here, but Gregoo keeps it on his own server now, and he can format and "prettify" the guide more and with ease there. :wink:
 
Back
Top