Jump to content

Recommended Posts

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

  • Active Member

For fix damage error go to cha.cpp and search:

Spoiler

void CHARACTER::ComputeBattlePoints()

and remplace all function with this:

Spoiler

void CHARACTER::ComputeBattlePoints()
{
    /* if (IsPolymorphed())
     {
         DWORD dwMobVnum = GetPolymorphVnum();
         const CMob * pMob = CMobManager::instance().Get(dwMobVnum);
         int iAtt = 0;
         int iDef = 0;

         if (pMob)
         {
             iAtt = GetLevel() * 2 + GetPolymorphPoint(POINT_ST) * 2;
             lev + con
             iDef = GetLevel() + GetPolymorphPoint(POINT_HT) + pMob->m_table.wDef;
         }

         SetPoint(POINT_ATT_GRADE, iAtt);
         SetPoint(POINT_DEF_GRADE, iDef);
         SetPoint(POINT_MAGIC_ATT_GRADE, GetPoint(POINT_ATT_GRADE)); 
         SetPoint(POINT_MAGIC_DEF_GRADE, GetPoint(POINT_DEF_GRADE));
     }
    */ else if (IsPC())
    if (IsPC())

Now, if you want polymorph work, you need go to mob_proto.txt or mob_proto.sql, and search polymorph_item (use excel to find it)

and you add this polymorph : 70104, 70105 , 70106 , 70107 or 171093

Now all the mobs that throw that polymorphic ball will transform into that mob, although it must be clarified that there are some mobs that by default do not do damage, such as azrael, red dragon, etc. I do not know where their function is but with my solution you can use the typical ones of the official

https://metin2.download/picture/2S4EmZmz2QyEKsNfbnH33EWdYXVKnG8W/.gif

Edited by Metin2 Dev
Core X - External 2 Internal

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active Member
2 hours ago, redscoutyt2 said:

@nazox

¡Hola! ¡Gracias por tu respuesta!

Ya hice esto, no ayudó (char.cpp)

Estoy usando el tipo item_quest en item_proto y una misión que te transforma en una mafia, y elimina el artículo. Debería funcionar, ¿verdad?

yes is other solution, but  maybe no solve problem with damage, this problem is comming source, but if find other solution i tell you

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

Why comment the char.cpp function? I don't understand.


 battle.cpp my function:

float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreTargetRating)
{
    int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX);
    int attacker_lv = pkAttacker->GetLevel();

    int victim_dx = pkVictim->GetPolymorphPoint(POINT_DX);
    int victim_lv = pkAttacker->GetLevel();

    int iARSrc = MIN(90, (attacker_dx * 4    + attacker_lv * 2) / 6);
    int iERSrc = MIN(90, (victim_dx      * 4    + victim_lv   * 2) / 6);

    float fAR = ((float) iARSrc + 210.0f) / 300.0f; // fAR = 0.7 ~ 1.0

    if (bIgnoreTargetRating)
        return fAR;

    // ((Edx * 2 + 20) / (Edx + 110)) * 0.3
    float fER = ((float) (iERSrc * 2 + 5) / (iERSrc + 95)) * 3.0f / 10.0f;

    return fAR - fER;
}

 

         if (pMob)
         {
             iAtt = GetLevel() * 2 + GetPolymorphPoint(POINT_ST) * 2;
             lev + con
             iDef = GetLevel() + GetPolymorphPoint(POINT_HT) + pMob->m_table.wDef;
         }

 

 


Before

 

After

Edited by Metin2 Dev
Core X - External 2 Internal
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.