Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Help] Monster Regen after Die (c++ dev issue)

Experienced Elementalist
Joined
Apr 15, 2012
Messages
203
Reaction score
25
Im creating a simple event and im experimenting issues with the monster.

I need take off the regen of the monsters, when die, stays die. And with my code, the monsters regen after die.

Code:
int MobPos = gObjMonsterAdd(this->Monster[iMonCount].MonsterIndex, this->Monster[iMonCount].Map, this->Monster[iMonCount].X, this->Monster[iMonCount].Y);

			if (MobPos >= 0)
			{
				int MobID = gObjAddMonster(this->Monster[iMonCount].Map);
				if (MobID >= 0)
				{
					gObjSetPosMonster(MobID, MobPos);
					gObjSetMonster(MobID, this->Monster[iMonCount].MonsterIndex);
					
					if (this->Monster[iMonCount].Boss == 0) { gObj[MobID].m_Attribute = 99; }
					if (this->Monster[iMonCount].Boss == 0) { gObj[MobID].m_Attribute = 98; }

					// Monster stats 
					gObj[MobID].m_AttackDamageMin = this->Monster[iMonCount].AttackDamageMin;
					gObj[MobID].m_AttackDamageMax = this->Monster[iMonCount].AttackDamageMax;
					gObj[MobID].Dir = this->Monster[iMonCount].Dir;
					gObj[MobID].m_Defense = this->Monster[iMonCount].Defense;
					gObj[MobID].m_SuccessfulBlocking = 700;
					gObj[MobID].Live = 1;
					gObj[MobID].DieRegen = 0;
					gObj[MobID].MaxRegenTime = 100000;
					gObj[MobID].RegenTime = 100000;
					gObj[MobID].m_State = 1;
					gObj[MobID].MaxLife = this->Monster[iMonCount].Life;
					gObj[MobID].Life = this->Monster[iMonCount].Life;
					gObj[MobID].Dir = this->Monster[iMonCount].Dir;
					gObj[MobID].m_MoveRange = 0;
					);
				}
			}

Any ideas?
 
Joined
May 26, 2009
Messages
17,304
Reaction score
3,216
Im creating a simple event and im experimenting issues with the monster.

I need take off the regen of the monsters, when die, stays die. And with my code, the monsters regen after die.

Code:
int MobPos = gObjMonsterAdd(this->Monster[iMonCount].MonsterIndex, this->Monster[iMonCount].Map, this->Monster[iMonCount].X, this->Monster[iMonCount].Y);

if (MobPos >= 0)
{
int MobID = gObjAddMonster(this->Monster[iMonCount].Map);
if (MobID >= 0)
{
gObjSetPosMonster(MobID, MobPos);
gObjSetMonster(MobID, this->Monster[iMonCount].MonsterIndex);

if (this->Monster[iMonCount].Boss == 0) { gObj[MobID].m_Attribute = 99; }
if (this->Monster[iMonCount].Boss == 0) { gObj[MobID].m_Attribute = 98; }

// Monster stats 
gObj[MobID].m_AttackDamageMin = this->Monster[iMonCount].AttackDamageMin;
gObj[MobID].m_AttackDamageMax = this->Monster[iMonCount].AttackDamageMax;
gObj[MobID].Dir = this->Monster[iMonCount].Dir;
gObj[MobID].m_Defense = this->Monster[iMonCount].Defense;
gObj[MobID].m_SuccessfulBlocking = 700;
gObj[MobID].Live = 1;
gObj[MobID].DieRegen = 0;
gObj[MobID].MaxRegenTime = 100000;
gObj[MobID].RegenTime = 100000;
gObj[MobID].m_State = 1;
gObj[MobID].MaxLife = this->Monster[iMonCount].Life;
gObj[MobID].Life = this->Monster[iMonCount].Life;
gObj[MobID].Dir = this->Monster[iMonCount].Dir;
gObj[MobID].m_MoveRange = 0;
);
}
}

Any ideas?
Why not make monster respawn in 999999999.. seconds and thats like never?

 
Upvote 0
Experienced Elementalist
Joined
Apr 15, 2012
Messages
203
Reaction score
25
Why not make monster respawn in 999999999.. seconds and thats like never?

Hello KarLi, merry xmas bro! :D

The respawn time its gObj[MobID].RegenTime?

Thats maybe works for me, in 10 mins the event delete all objects to the next hour.
 
Upvote 0
Back
Top