Jump to content

rezist_fire / rezist_elect on items


Recommended Posts

Hello everyone, I want to do the bonuses rezist_fire(flame dungeon-razador) and rezist_elect(v4) on items to work.

I think the bonuses are correct in the mob_proto table because I made them like the ones from fly v3,swapp v5, mob_proto.txt oficial client.

.png

But it seems that this is not enough and it does not work.

In my google search I found a tutorial in which i need to activate him from length.h and at the same time I have to disable SKILL_ATTR_TYPE_RANGE ( arrow atacks )

.png

And I don't really know if this is the solution to the problem. Can someone guide me?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Active Member

game -> battle.cpp

 

Find:

int CalcAttBonus(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int iAtk)

Make sure all the elements are together, like this (example):

 

		if (pkVictim->IsRaceFlag(RACE_FLAG_ATT_WIND))
			iAtk += (iAtk * pkAttacker->GetPoint(POINT_ENCHANT_WIND)) / 100;

Do the same with fire, elec, ice, earth, dark

Link to comment
Share on other sites

12 hours ago, caanmasu said:

game -> battle.cpp

 

Find:

int CalcAttBonus(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int iAtk)

Make sure all the elements are together, like this (example):

 

		if (pkVictim->IsRaceFlag(RACE_FLAG_ATT_WIND))
			iAtk += (iAtk * pkAttacker->GetPoint(POINT_ENCHANT_WIND)) / 100;

Do the same with fire, elec, ice, earth, dark

i allready have this:

 

Quote

    if (pkAttacker->IsNPC() && pkVictim->IsPC())
    {
        if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_ELEC))
            iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_ELEC))        / 10000;
        else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_FIRE))
            iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_FIRE))        / 10000;
        else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_ICE))
            iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_ICE))        / 10000;
        else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_WIND))
            iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_WIND))        / 10000;
        else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_EARTH))
            iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_EARTH))    / 10000;
        else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_DARK))
            iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_DARK))        / 10000;
    }

 

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.