Bot Metin2 Dev 4947 Posted April 18, 2018 Bot Share Posted April 18, 2018 Hello, I was trying to make that when you attack a specific mob, the damage is 1 (something like in the Chiefs Chase event of the official server) So: I look for the following: bool CHARACTER :: Damage (LPCHARACTER pAttacker, int dam, EDamageType type) I add this below: if (pAttacker) { if (GetRaceNum() == 101) { SendDamagePacket(pAttacker, 1, DAMAGE_NORMAL); return false; } } In this case, when I attack mob 101 (Wild Dog), I only hit 1 damage (all right up here) But what happens is that life does not go down, and life should go down, 1 in 1 to kill the mob. Does anyone have any help for me? Thanks in advance. Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4947 Posted April 20, 2018 Author Bot Share Posted April 20, 2018 UP Link to comment Share on other sites More sharing options...
Premium WeedHex 636 Posted April 20, 2018 Premium Share Posted April 20, 2018 Work from battle.cpp bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) do like this: if (victim->GetRaceNum() == 101) return false; Link to comment Share on other sites More sharing options...
Xploitz 8 Posted April 20, 2018 Share Posted April 20, 2018 Have you tried to set the Health regen to 0 on the mob when you made the test? Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4947 Posted April 21, 2018 Author Bot Share Posted April 21, 2018 10 hours ago, WeedHex said: Work from battle.cpp bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) do like this: if (victim->GetRaceNum() == 101) return false; I'm trying to get the mob to die, this I think it means that it can not be attacked. Link to comment Share on other sites More sharing options...
3bd0 182 Posted April 21, 2018 Share Posted April 21, 2018 it may be because of his health regen, try it with more damage so you can see it pr set the mob hp regen to zero Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4947 Posted April 21, 2018 Author Bot Share Posted April 21, 2018 14 hours ago, Xploitz said: Have you tried to set the Health regen to 0 on the mob when you made the test? 2 hours ago, 3bd0 said: it may be because of his health regen, try it with more damage so you can see it pr set the mob hp regen to zero I just tried to put more damage and turn the regen to 0, and ... effectively, I do more damage, but the stupid dog does not die xD! Link to comment Share on other sites More sharing options...
Premium Solution tierrilopes 453 Posted April 21, 2018 Premium Solution Share Posted April 21, 2018 (edited) 7 hours ago, WLsj24 said: I just tried to put more damage and turn the regen to 0, and ... effectively, I do more damage, but the stupid dog does not die xD! Do you want to change the "hit" only or also skills? Changes at the stated functions for hits and arrows (example on arrow): battle.cpp int CalcArrowDamage int battle_hit for skills: char_skill FuncSplashDamage Do you want critical and so on to also work or to always 1 damage, independently of critical, penetrate, etc? _______________________________________________________________________________________________________ If you want ONLY 1 damage to mobs (hits, skills, criticals, etc), ignore the previous steps and Go to char_battle.cpp, in the damage function, edit like on image: Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4947 Posted April 21, 2018 Author Bot Share Posted April 21, 2018 (edited) 5 hours ago, tierrilopes said: Do you want to change the "hit" only or also skills? Changes at the stated functions for hits and arrows (example on arrow): battle.cpp int CalcArrowDamage int battle_hit for skills: char_skill FuncSplashDamage Do you want critical and so on to also work or to always 1 damage, independently of critical, penetrate, etc? _______________________________________________________________________________________________________ If you want ONLY 1 damage to mobs (hits, skills, criticals, etc) Go to char_battle.cpp, in the damage function, edit like on image: Thanks, it works perfect. To work on hits, skills, criticals, penetrates, poisons, I just need to remove damageFlag = DAMAGE_NORMAL. Like this: if (GetRaceNum() == 101) { dam = 1; } One thing that happens is that if you have bonus APPLY_STEAL_HP, you will continue to remove 1 damage to the mob, but if you absorb HP obviously the life of the mob will drop more than 1 per hit, which does not matter to me otherwise, it will It would take a long time to kill the mob. Thank you very much for the help, I was already overwhelmed xD! Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member ReFresh 2358 Posted December 9, 2018 Active Member Share Posted December 9, 2018 Is here another solution for this? I want to kill some mob only with my hand without weapon, so I set in database strong against.... so player giving no damage with weapon, skills, etc. Only with his hand he can do a damage and I need to set this damage to 700 as default to specific mobs. I'll be always helpful! Link to comment Share on other sites More sharing options...
Premium tierrilopes 453 Posted December 10, 2018 Premium Share Posted December 10, 2018 Functions where to touch were pointed already, issues the same so...i'd say you pretty much have everything on this topic to adapt it to your liking. Link to comment Share on other sites More sharing options...
Premium WeedHex 636 Posted December 10, 2018 Premium Share Posted December 10, 2018 There are many bonus remember it. You can't work only in 1 dmg type. 1 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