• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ OnLook with more than one color?

Fadu

New Member
Joined
Sep 28, 2010
Messages
13
Reaction score
0
Hello.

So, I know that i can change the color of the "OnLook" by editing this function:
C++:
bool Game::playerLookAt(uint32_t playerId, const Position& pos, uint16_t spriteId, int16_t stackpos)
Here:
C++:
player->sendTextMessage(MSG_INFO_DESCR, ss.str());
But how can I make it have two colors in the same output?

I thought of using twice the "player->sendTextMessage(MSG_INFO_DESCR, ss.str());", but it would come in two different messages.

So maybe I need something like this? I'm not sure
C++:
if (ss.find("weigh")) {
// set only that line to red
}

I'm using tfs 0.3.7 and otclient
 
This is also a client side edit, I haven't ran any tests on the idea but you'll need to send colors to the client from the server and then the client has to be able to parse those packets
 
Back
Top