Cripplez 40 Posted September 30, 2019 Share Posted September 30, 2019 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 Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted September 30, 2019 Premium Share Posted September 30, 2019 bluedragon c++ files, good study. Link to comment Share on other sites More sharing options...
Cripplez 40 Posted September 30, 2019 Author Share Posted September 30, 2019 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 More sharing options...
Premium Syreldar 1875 Posted September 30, 2019 Premium Share Posted September 30, 2019 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 More sharing options...
Premium WeedHex 635 Posted September 30, 2019 Premium Share Posted September 30, 2019 Exactly BlueDragon_StateBattle(this) add new monster in this check if you want 2493 same 2499 Link to comment Share on other sites More sharing options...
Cripplez 40 Posted September 30, 2019 Author Share Posted September 30, 2019 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 More sharing options...
Forum Moderator VegaS™ 10275 Posted September 30, 2019 Forum Moderator Share Posted September 30, 2019 1 hour ago, Cripplez said: How exactly i can add a new vnum here? like this? if (2493 || 2499 == m_pkMobData->m_table.dwVnum) http://www.cplusplus.com/doc/tutorial/operators/ if (m_pkMobData->m_table.dwVnum == 2493 || m_pkMobData->m_table.dwVnum == 2499) 1 1 4 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now