Jump to content
Eternal Lands Official Forums
Sign in to follow this  
(Athosino)

How to make colorized GMs?

Recommended Posts

Hello guys, I'm creating a simple guild bot and wanna know how to make colorized guild messages. It doesn't seem to be anywhere: I have searched the entire ELC source code and found nothing. Could you please point me the right direction?

 

Thanks

 

P.S.: Examples in C/C++ preferred :P

Share this post


Link to post
Share on other sites
I have searched the entire ELC source code and found nothing

You obviously haven't searched hard enough.

 

If I remember correctly, your message should contain the colour code at the beginning of the text you are adding to a #gm string.

 

For example:

char msg[50];
sprintf( msg,"#gm %c this is a test message",c_green1 );

(i'm no C programmer, thats off the top of my head :P)

Basically, read the colour codes in client_serv.h

Share this post


Link to post
Share on other sites

actually, it's 127 + colour number for the needed char code

the list is in client_serv.h, around line 380

and if you want a C++ style example... (from memory)

 

std::string output;

output = "#gm ";

output+=127+c_green1;

output+="this is my line";

send(output);

 

ed: forgot to mention... this is just how it's done in code... please make sure you have GM permission to use it and stuff :P coloured messages can get rather annoying at times

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×