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!

Adding new ^ Colours to the client (ASM)

Elite Diviner
Joined
Aug 19, 2007
Messages
437
Reaction score
152
Since you asked...

(Don't complain about how I write things in ASM: if you don't like it, change it! :p. You should get how it works here anyway.)

This tutorial assumes you're using a variant of "Xiaos" runnable (I'm using the unmasked runnable.) If you follow my instructions exactly, you'll get two new colours, Cyan and Teal. (^:, ^; respectively)

It also assumes some basic knowledge of OllyDbg.

1) Go to address 005466F3

2) This CMP is the maximum ASCII hex # you're going to add a colour for. I'm adding a colour for 0-; in ascii so I've changed it to CMP CL,3B

Refer to

3) Go to address 0054679C

4) Change this to a JMP to a large, empty area. I used 005E5203, but you're welcome to change that if you'd like.

5) Go to the address mentioned in 4.

6) Place all of the colours in this format, or if not, figure out your own. Replace all bold parts with your stuff.

(Note: You need to start from ASCII 30 as this is 0, and we replaced it with a JMP, so we've got to redo 0-9.)

Once you've done all the colours, instead of another CMP, ASCII, do MOV EAX, -1 and JMP back to the original function. This should make it white if you missed any colours out.

Look below for exactly what I did...

Code:
CMP EAX, [B]ASCII HEX CODE[/B]
JNZ [B]NEXT CMP[/B]
MOV EAX, [B]ARGB CODE[/B]
JMP 005467A3
[B]...
REPEAT FOR ALL ASCII NUMBERS YOU CHOSE
...[/B]
MOV EAX,-1
JMP 005467A3
7) For example, this is what I have.

Code:
005E5203    > \83F8 30                       CMP EAX,30
005E5206    .  75 0A                         JNZ SHORT Aristrum.005E5212
005E5208    .  B8 808080FF                   MOV EAX,FF808080
005E520D    .^ E9 9115F6FF                   JMP Aristrum.005467A3
005E5212    >  83F8 31                       CMP EAX,31
005E5215    .  75 0A                         JNZ SHORT Aristrum.005E5221
005E5217    .  B8 0000FFFF                   MOV EAX,FFFF0000
005E521C    .^ E9 8215F6FF                   JMP Aristrum.005467A3
005E5221    >  83F8 32                       CMP EAX,32
005E5224    .  75 0A                         JNZ SHORT Aristrum.005E5230
005E5226    .  B8 00FF00FF                   MOV EAX,FF00FF00
005E522B    .^ E9 7315F6FF                   JMP Aristrum.005467A3
005E5230    >  83F8 33                       CMP EAX,33
005E5233    .  75 0A                         JNZ SHORT Aristrum.005E523F
005E5235    .  B8 FF0000FF                   MOV EAX,FF0000FF
005E523A    .^ E9 6415F6FF                   JMP Aristrum.005467A3
005E523F    >  83F8 34                       CMP EAX,34
005E5242    .  75 0A                         JNZ SHORT Aristrum.005E524E
005E5244    .  B8 00FFFFFF                   MOV EAX,-100
005E5249    .^ E9 5515F6FF                   JMP Aristrum.005467A3
005E524E    >  83F8 35                       CMP EAX,35
005E5251    .  75 0A                         JNZ SHORT Aristrum.005E525D
005E5253    .  B8 000080FF                   MOV EAX,FF800000
005E5258    .^ E9 4615F6FF                   JMP Aristrum.005467A3
005E525D    >  83F8 36                       CMP EAX,36
005E5260    .  75 0A                         JNZ SHORT Aristrum.005E526C
005E5262    .  B8 008000FF                   MOV EAX,FF008000
005E5267    .^ E9 3715F6FF                   JMP Aristrum.005467A3
005E526C    >  83F8 37                       CMP EAX,37
005E526F    .  75 0A                         JNZ SHORT Aristrum.005E527B
005E5271    .  B8 800000FF                   MOV EAX,FF000080
005E5276    .^ E9 2815F6FF                   JMP Aristrum.005467A3
005E527B    >  83F8 38                       CMP EAX,38
005E527E    .  75 0A                         JNZ SHORT Aristrum.005E528A
005E5280    .  B8 008080FF                   MOV EAX,FF808000
005E5285    .^ E9 1915F6FF                   JMP Aristrum.005467A3
005E528A    >  83F8 39                       CMP EAX,39
005E528D    .  75 0A                         JNZ SHORT Aristrum.005E5299
005E528F    .  B8 FFFFFFFF                   MOV EAX,-1
005E5294    .^ E9 0A15F6FF                   JMP Aristrum.005467A3
005E5299    >  83F8 3A                       CMP EAX,3A
005E529C    .  75 0A                         JNZ SHORT Aristrum.005E52A8
005E529E    .  B8 FFFF00FF                   MOV EAX,FF00FFFF
005E52A3    .^ E9 FB14F6FF                   JMP Aristrum.005467A3
005E52A8    >  83F8 3B                       CMP EAX,3B
005E52AB    .  75 0A                         JNZ SHORT Aristrum.005E52B7
005E52AD    .  B8 808000FF                   MOV EAX,FF008080
005E52B2    .^ E9 EC14F6FF                   JMP Aristrum.005467A3
005E52B7    >  B8 FFFFFFFF                   MOV EAX,-1
005E52BC    .^ E9 E214F6FF                   JMP Aristrum.005467A3
Note how I have all the old colours there, and my new ones on the end. (3A and 3B.)

8) Save your executable to somewhere new, launch it however and test it out. If you did everything as I said, you'd end up with something like this:

Mark - Adding new ^ Colours to the client (ASM) - RaGEZONE Forums


9) Now go back and add as many colours as you want. You'll end up with something like this.

Mark - Adding new ^ Colours to the client (ASM) - RaGEZONE Forums


Have fun doing all those colours. As I said, once you got this working, feel free to play with it to make it work better for you.
 
Last edited:

FxS

Newbie Spellweaver
Joined
Jun 9, 2009
Messages
15
Reaction score
0
Yay (first post & awesome tut)

That's like every color in the rainbow down below and the tut is so easy to read : )
Yay Ari.
 
Status: Pooping
Joined
Jul 16, 2008
Messages
861
Reaction score
25
Looks good thanks for the tut.
 
2D > 3D
Loyal Member
Joined
Dec 19, 2008
Messages
2,413
Reaction score
1,193
nah that shouldnt be it nobody

btw mark, that is easy xD, you should show me how you found it laterz O.O xDDD
 
(。◕‿‿◕。)
Loyal Member
Joined
Oct 15, 2008
Messages
1,451
Reaction score
152
nah that shouldnt be it nobody

btw mark, that is easy xD, you should show me how you found it laterz O.O xDDD

well the client im doing all my ASM work on is Xiaos...file list skip I think, can't remember which one.

I even went back and copied what he did to see if that would fix it >-> didn't.
 
Elite Diviner
Joined
Aug 19, 2007
Messages
437
Reaction score
152
Shouldn't crash - That's exactly how I have it done in my client. Does it only crash when going to speak with colours?

(Thanks for the comments guys)
 
2D > 3D
Loyal Member
Joined
Dec 19, 2008
Messages
2,413
Reaction score
1,193
testing it now, i love how your stuff is always so clean mark xD, question do you have to do all digits from 30-(Number of your choice) or do you just have to stop with that digit
 
Skilled Illusionist
Joined
Nov 11, 2008
Messages
388
Reaction score
42
Great work Aristrum!
10/10.
 
Experienced Elementalist
Joined
Nov 28, 2007
Messages
235
Reaction score
261
Misread thread. Remove this post.
 
Last edited:
Skilled Illusionist
Joined
Mar 15, 2009
Messages
331
Reaction score
15
Can I just point out that it makes no sense to use this:

Code:
CMP EAX, [B]ASCII HEX CODE[/B]

When you JMP from code which compares to CL.

This is how it should be:

Code:
CMP CL, [B]ASCII HEX CODE[/B]


Now, I'm not very good at asm, so correct me if I'm wrong, but I think you're wrong and astrium is right. Why? Because right before line 0054679C (the line where your suppost to change to JMP (colour code line), is this:

Code:
00546799 MOVZX EAX,CL

So everything from CL is already copied into EAX which would make sense for him to compare to EAX instead of CL. Once again, I'm just a beginner to this, so correct me if I'm wrong xO. Btw nice tut astrium, I just have a quick question. How would I go about adding more than 15 colours to the game, cuz you can only go up to F. If I wanted lets say 26 colours, would I have to assemble

Code:
005466F3 CMP CL,31A

Cuz I tried to assemble that, but it filled an extra line with code, so I'm not sure if that's suppost to happen. And once again, nice tut :p.
 
Last edited:
Elite Diviner
Joined
Aug 19, 2007
Messages
437
Reaction score
152
Can I just point out that it makes no sense to use this:

Code:
CMP EAX, [B]ASCII HEX CODE[/B]
When you JMP from code which compares to CL.

This is how it should be:

Code:
CMP CL, [B]ASCII HEX CODE[/B]

The original code uses EAX to determine the colour (EAX*4)+Some address - So I used EAX.

Btw nice tut astrium, I just have a quick question. How would I go about adding more than 15 colours to the game, cuz you can only go up to F. If I wanted lets say 26 colours, would I have to assemble

Code:
005466F3 CMP CL,31A
Cuz I tried to assemble that, but it filled an extra line with code, so I'm not sure if that's suppost to happen. And once again, nice tut :p

Right. The bit I said to change is the "last" letter. For me, I changed it to ;, meaning I now have colours from 0-;.

Refer to the Hex column in and then use that in the CMP CL,HEX CODE.

For example, to have colours from 0-Z (0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ), you would use CMP CL, 5A.

Then you would extend the codecave to incorporate all these colours. It's worth noting that if you dont want to include strange characters (such as <, =, >) you can just leave them out and their colour will default to white, if you use a similar structure as I posted.

Oh and, if I made any errors, sorry :p
 
Skilled Illusionist
Joined
Mar 15, 2009
Messages
331
Reaction score
15
thanks for the table/post, they were quite helpful :p. Once I finish this, I'm gonna test and post my results here :p. Oh, and I think you should add that table to your main post, It'd probably be very useful for alot of newbies like me who don't know the hex code for different characters.
 
Experienced Elementalist
Joined
Nov 28, 2007
Messages
235
Reaction score
261
I completely misread your tutorial, and thought you were replacing this line:

Code:
CMP CL,39

With your JMP and returning to 005467A3 after setting EAX.
 
Skilled Illusionist
Joined
Mar 15, 2009
Messages
331
Reaction score
15
amazing tutorial aristrum, tested, and works beautifully.

Mark - Adding new ^ Colours to the client (ASM) - RaGEZONE Forums


Btw, I was wondering if it's possible to add characters with a hex value less than 30. Like for example, I wanted to add ! as one of the colours, but because it's hex value was like 21, it didn't work ingame. So if you can figure it out much would be appreciated :p.

P.S. Spelt your name wrong ingame, sorry xO.
 
Custom Title Activated
Loyal Member
Joined
Nov 5, 2006
Messages
1,358
Reaction score
15
Fuckin' wes! You blocked me on msn or what? where are you? I'm back in the business!

Nice tutorial by the way !
 
Back
Top