• 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!

[Request] Added Health and Mana

Gzeep

fucking idiot
Joined
Sep 24, 2008
Messages
87
Reaction score
2
I am searching for the code who after the Exura use, an animation will show me text "+ 14". As well as after adding many. Something like that are on WypasOTS.

Sorry for my english.
 
I using the 0.2pl23.

if you are using 0.2 you need to go into game.cpp search for
Code:
target->changeHealth(healthChange);
and add after it
PHP:
		Player* targetPlayer = target->getPlayer();
		if(targetPlayer)
		{
			const SpectatorVec& list = getSpectators(targetPos);
			char buffer[10];
			sprintf(buffer, "+%d", healthChange);
			if(combatType != COMBAT_HEALING)
				addMagicEffect(list, targetPos, NM_ME_MAGIC_ENERGY);
			addAnimatedText(list, targetPos, TEXTCOLOR_LIGHTGREEN, buffer);
		}
for mana to show search for
Code:
target->changeMana(manaChange);
and after it add
PHP:
			char buffer[10];
			sprintf(buffer, "+%d", manaChange);
			addAnimatedText(list, targetPos, TEXTCOLOR_LIGHTBLUE, buffer);



for the health i made it so only healing of players shows and not monsters healing themselves, if u want that changed instead of pasting in what i said for health paste this in
Code:
			const SpectatorVec& list = getSpectators(targetPos);
			char buffer[10];
			sprintf(buffer, "+%d", healthChange);
			if(combatType != COMBAT_HEALING)
				addMagicEffect(list, targetPos, NM_ME_MAGIC_ENERGY);
			addAnimatedText(list, targetPos, TEXTCOLOR_LIGHTGREEN, buffer);
 
Back
Top