Jump to content

[Help]Beran-Setaou bug attack and skills


Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

I tried to compare them with other bluedraon files but they are all the same..

I think the problem might be here:

char_state.cpp:

	if (2493 == m_pkMobData->m_table.dwVnum)
	{
		
		m_dwStateDuration = BlueDragon_StateBattle(this);
		return;
	}

BlueDragon.cpp:

int BlueDragon_StateBattle(LPCHARACTER pChar)
{
	if (pChar->GetHPPct() > 98)
		return PASSES_PER_SEC(1);

	const int SkillCount = 3;
	int SkillPriority[SkillCount];
	static time_t timeSkillCanUseTime[SkillCount];

	if (pChar->GetHPPct() > 76)
	{
		SkillPriority[0] = 1;
		SkillPriority[1] = 0;
		SkillPriority[2] = 2;
	}
	else if (pChar->GetHPPct() > 31)
	{
		SkillPriority[0] = 0;
		SkillPriority[1] = 1;
		SkillPriority[2] = 2;
	}
	else
	{
		SkillPriority[0] = 0;
		SkillPriority[1] = 2;
		SkillPriority[2] = 1;
	}

	time_t timeNow = static_cast<time_t>(get_dword_time());

	for (int i=0 ; i < SkillCount ; ++i)
	{
		const int SkillIndex = SkillPriority[i];

		if (timeSkillCanUseTime[SkillIndex] < timeNow)
		{
			int SkillUsingDuration =
				static_cast<int>(CMotionManager::instance().GetMotionDuration( pChar->GetRaceNum(), MAKE_MOTION_KEY(MOTION_MODE_GENERAL, MOTION_SPECIAL_1 + SkillIndex) ));

			timeSkillCanUseTime[SkillIndex] = timeNow + (UseBlueDragonSkill( pChar, SkillIndex ) * 1000) + SkillUsingDuration + 3000;

			pChar->SendMovePacket(FUNC_MOB_SKILL, SkillIndex, pChar->GetX(), pChar->GetY(), 0, timeNow);

			return 0 == SkillUsingDuration ? PASSES_PER_SEC(1) : PASSES_PER_SEC(SkillUsingDuration);
		}
	}

	return PASSES_PER_SEC(1);
}

 

If I change the vnum in the char_state.cpp file, the new vnum can't attack but use skills and the vnum 2493 can now attack but it doesn't use skills

But I still don't understand because the files are the same of other sources, so everyone should have the same problem..

Link to comment
Share on other sites

  • Premium

This is not an issue, it is like that in every server. Beran Setaou is coded so it doesn't use normal attacks.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

36 minutes ago, Syreldar said:

This is not an issue, it is like that in every server. Beran Setaou is coded so it doesn't use normal attacks.

Oh you are right... damn i was 100% sure that some time ago the beran used to attack and used skills lol..

well now i know that it is not a bug, thank you

31 minutes ago, WeedHex said:

Exactly 


BlueDragon_StateBattle(this)

add new monster in this check if you want 2493 same 2499

How exactly i can  add a new vnum here? like this?

	if (2493 || 2499 == m_pkMobData->m_table.dwVnum)
Link to comment
Share on other sites

  • Forum Moderator
1 hour ago, Cripplez said:

How exactly i can  add a new vnum here? like this?


	if (2493 || 2499 == m_pkMobData->m_table.dwVnum)
	if (m_pkMobData->m_table.dwVnum == 2493 || m_pkMobData->m_table.dwVnum == 2499)

 

  • Metin2 Dev 1
  • Sad 1
  • Love 4
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.