anzert 0 Posted June 19, 2020 Share Posted June 19, 2020 Version of Files : XXX Hi community, Today I would like to ask you all, how poison works in metin2. Im playing in a 2015-2016 server files metin2 private server and when Im dueling I need from 3 to 7-8 hits in order to get poison in my rival. I use 8% in helmet, 12% in alchemy and 10% in server food, my rivals usually use 12% resist in alchemy and 3% resist in pendings being a total of 15% to get poison on them. I wanna know if is normal that with only 15% I need from 3 to 7-8 hits to get poison on them, or calculations in source code are weird? Is worth use weapon with another 8% poison? Could you pls show me the code? Thanks in advance Best regards! Link to comment Share on other sites More sharing options...
semoka10 57 Posted June 19, 2020 Share Posted June 19, 2020 I think poison resistance is related to how often you take damage drom poison after you are poisoned, and it doesn't affect the chance to poison the target. Not certain about it though. Link to comment Share on other sites More sharing options...
nTray 1 Posted June 20, 2020 Share Posted June 20, 2020 Hi, check battle.cpp there are bonus calculations. if (pkAttacker->GetPoint(POINT_POISON_PCT) && !pkVictim->IsAffectFlag(AFF_POISON)) { if (number(1, 100) <= pkAttacker->GetPoint(POINT_POISON_PCT)) pkVictim->AttackedByPoison(pkAttacker); } Link to comment Share on other sites More sharing options...
anzert 0 Posted June 20, 2020 Author Share Posted June 20, 2020 thank you so much bro Link to comment Share on other sites More sharing options...
Mefarious 3 Posted November 10, 2024 Share Posted November 10, 2024 I have another question, where can i find damage from poison? there is bonus for reducing damage recieving from poison, but how to set that poison damage? Link to comment Share on other sites More sharing options...
Honorable Member Syreldar 2098 Posted November 10, 2024 Honorable Member Share Posted November 10, 2024 void CHARACTER::AttackedByPoison(LPCHARACTER pkAttacker) { if (m_pkPoisonEvent) return; if (m_bHasPoisoned && !IsPC()) return; #ifdef ENABLE_WOLFMAN_CHARACTER if (m_pkBleedingEvent) return; if (m_bHasBled && !IsPC()) return; #endif if (pkAttacker && pkAttacker->GetLevel() < GetLevel()) { int delta = GetLevel() - pkAttacker->GetLevel(); if (delta > 8) delta = 8; if (number(1, 100) > poison_level_adjust[delta]) return; } /*if (IsImmune(IMMUNE_POISON)) return;*/ m_bHasPoisoned = true; AddAffect(AFFECT_POISON, POINT_NONE, 0, AFF_POISON, POISON_LENGTH + 1, 0, true); TPoisonEventInfo* info = AllocEventInfo<TPoisonEventInfo>(); info->ch = this; info->count = 10; info->attacker_pid = pkAttacker?pkAttacker->GetPlayerID():0; m_pkPoisonEvent = event_create(poison_event, info, 1); if (test_server && pkAttacker) { char buf[256]; snprintf(buf, sizeof(buf), "POISON %s -> %s", pkAttacker->GetName(), GetName()); pkAttacker->ChatPacket(CHAT_TYPE_INFO, "%s", buf); } } EVENTFUNC(poison_event) { TPoisonEventInfo * info = dynamic_cast<TPoisonEventInfo *>( event->info ); if ( info == NULL ) { sys_err( "poison_event> <Factor> Null pointer" ); return 0; } LPCHARACTER ch = info->ch; if (ch == NULL) { // <Factor> return 0; } LPCHARACTER pkAttacker = CHARACTER_MANAGER::instance().FindByPID(info->attacker_pid); int dam = ch->GetMaxHP() * GetPoisonDamageRate(ch) / 1000; if (test_server) ch->ChatPacket(CHAT_TYPE_NOTICE, "Poison Damage %d", dam); if (ch->Damage(pkAttacker, dam, DAMAGE_TYPE_POISON)) { ch->m_pkPoisonEvent = NULL; return 0; } --info->count; if (info->count) return PASSES_PER_SEC(3); else { ch->m_pkPoisonEvent = NULL; return 0; } } 1 "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...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now