Jump to content
  • 0
Cripplez

open [Help]Beran-Setaou bug attack and skills

Question

Hello,

I have a problem with the mob 2493 Beran-Setaou, it only use skills and never use the normal attack with his claw, but if i create a copy of 2493 (and i make for example 2499) it will use only his normal attack with claw and never use the skills, do you know how i can fix this? Thank you

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0

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..

Share this post


Link to post
  • 0

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

Share this post


Link to post
  • 0

Exactly 

BlueDragon_StateBattle(this)

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

Share this post


Link to post
  • 0
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)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.