• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

OTClient ( Shows 2 mana healing instead of one )

Marko999x

ArchezOt soon
Premium User
Joined
Dec 14, 2017
Messages
3,976
Solutions
104
Reaction score
3,108
Location
Germany
Can someone tell me why the mana healing comes up two times?
hONl0.png


I added animatedtext for healing but I just want it yellow instead of yellow and ping ( Happends only on OtClient, on cipsoft client not. )
 
I'll assume the version is 1.3.
This is where the color is applied for mana gain in the sources.
otland/forgottenserver

So you could change this line from.
C++:
message.primary.color = TEXTCOLOR_MAYABLUE;
To
C++:
message.primary.color = TEXTCOLOR_NONE;
But then when people are given mana it won't show any color at all on a regular tibia client.

However if you want to be more explicit you could try something like this and it should work for both the regular & the otclient.
C++:
message.primary.color = (targetPlayer->getOperatingSystem() <= 3) ? TEXTCOLOR_MAYABLUE : TEXTCOLOR_NONE;
 
Im using tfs 0.4
Well then if you are going post a problem then you should always post the distribution.

An example is; this is my problem and this is the distribution i am using.

Without code or anything that gives us any indication of the distribution you are using most will assume the latest distribution.

I am quite sure the code i provided resembles something similar to 0.4, however the wording will be a bit different but the logic in general will be the same unless of course 0.4's sources does not have a means of dectecting the type of client/host which is connecting to the server.
 
Back
Top