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

Set a max hp limit

DestinationSer

@echo off
Joined
Mar 7, 2009
Messages
2,806
Solutions
1
Reaction score
676
When a player reaches 2000m hp or mana he/she cannot level anymore before using a hp remover or a mana remover.
Could you give me this script? Thanks.
 
Omfg, You dont understand a shit lmfao

YOU GET 2000m HP, I WANT TO TAKE AWAY THE MAX HP SO YOU CAN GET ALOT OF MORE OR SET A MAXIMUM HP.
WHEN REACHING MAXIMUM HP YOU DO NOT GET ANYMORE EXP BEFORE YOU REMOVE SOME HP
UNDERSTAND?
omfg
 
Code:
bool Player::gainExperience(double& gainExp, Creature* target)
{
	if(!rateExperience(gainExp, target)[B] || getMaxHealth() >= 2000000000 || getMaxMana() >= 2000000000[/B])
		return false;

	//soul regeneration
	if(gainExp >= level)
	{
		if(Condition* condition = Condition::createCondition(
			CONDITIONID_DEFAULT, CONDITION_SOUL, 4 * 60 * 1000))
		{
			condition->setParam(CONDITIONPARAM_SOULGAIN,
				vocation->getGainAmount(GAIN_SOUL));
			condition->setParam(CONDITIONPARAM_SOULTICKS,
				(vocation->getGainTicks(GAIN_SOUL) * 1000));
			addCondition(condition);
		}
	}

	addExperience((uint64_t)gainExp);
	return true;
}
h
 
Omfg, You dont understand a shit lmfao

YOU GET 2000m HP, I WANT TO TAKE AWAY THE MAX HP SO YOU CAN GET ALOT OF MORE OR SET A MAXIMUM HP.
WHEN REACHING MAXIMUM HP YOU DO NOT GET ANYMORE EXP BEFORE YOU REMOVE SOME HP
UNDERSTAND?
omfg

Funny how you ask and complain for everything to someone who is trying to help instead of doing it yourself, moron.
 
Back
Top