Jump to content

Delete stone+0,+1+,2+,3 from Metin Stone


Recommended Posts

Hi Metin2Dev,

I have a question for the expert users.

How I delete from source the drop of stone+0+1+2 and +3 from the Metin Stone?

I have finded this in source but i can't modify...

char.cpp

Spoiler

void CHARACTER::DetermineDropMetinStone()
{
    const int METIN_STONE_NUM = 14;
    static DWORD c_adwMetin[METIN_STONE_NUM] = 
    {
        28030,
        28031,
        28032,
        28033,
        28034,
        28035,
        28036,
        28037,
        28038,
        28039,
        28040,
        28041,
        28042,
        28043,
    };
    DWORD stone_num = GetRaceNum();
    int idx = std::lower_bound(aStoneDrop, aStoneDrop+STONE_INFO_MAX_NUM, stone_num) - aStoneDrop;
    if (idx >= STONE_INFO_MAX_NUM || aStoneDrop[idx].dwMobVnum != stone_num)
    {
        m_dwDropMetinStone = 0;
    }
    else
    {
        const SStoneDropInfo & info = aStoneDrop[idx];
        m_bDropMetinStonePct = info.iDropPct;
        {
            m_dwDropMetinStone = c_adwMetin[number(0, METIN_STONE_NUM - 1)];
            int iGradePct = number(1, 100);
            for (int iStoneLevel = 0; iStoneLevel < STONE_LEVEL_MAX_NUM; iStoneLevel ++)
            {
                int iLevelGradePortion = info.iLevelPct[iStoneLevel];
                if (iGradePct <= iLevelGradePortion)
                {
                    break;
                }
                else
                {
                    iGradePct -= iLevelGradePortion;
                    m_dwDropMetinStone += 100; // µ¹ +a -> +(a+1)ÀÌ µÉ¶§¸¶´Ù 100¾¿ Áõ°¡
                }
            }
        }
    }
}

 

Link to comment
Share on other sites

1 hour ago, Suainzettello said:

Hi Metin2Dev,

I have a question for the expert users.

How I delete from source the stone+0+1+2 and +3?

I have finded this in source:

char.cpp

  Reveal hidden contents

void CHARACTER::DetermineDropMetinStone()
{
    const int METIN_STONE_NUM = 14;
    static DWORD c_adwMetin[METIN_STONE_NUM] = 
    {
        28030,
        28031,
        28032,
        28033,
        28034,
        28035,
        28036,
        28037,
        28038,
        28039,
        28040,
        28041,
        28042,
        28043,
    };
    DWORD stone_num = GetRaceNum();
    int idx = std::lower_bound(aStoneDrop, aStoneDrop+STONE_INFO_MAX_NUM, stone_num) - aStoneDrop;
    if (idx >= STONE_INFO_MAX_NUM || aStoneDrop[idx].dwMobVnum != stone_num)
    {
        m_dwDropMetinStone = 0;
    }
    else
    {
        const SStoneDropInfo & info = aStoneDrop[idx];
        m_bDropMetinStonePct = info.iDropPct;
        {
            m_dwDropMetinStone = c_adwMetin[number(0, METIN_STONE_NUM - 1)];
            int iGradePct = number(1, 100);
            for (int iStoneLevel = 0; iStoneLevel < STONE_LEVEL_MAX_NUM; iStoneLevel ++)
            {
                int iLevelGradePortion = info.iLevelPct[iStoneLevel];
                if (iGradePct <= iLevelGradePortion)
                {
                    break;
                }
                else
                {
                    iGradePct -= iLevelGradePortion;
                    m_dwDropMetinStone += 100; // µ¹ +a -> +(a+1)ÀÌ µÉ¶§¸¶´Ù 100¾¿ Áõ°¡
                }
            }
        }
    }
}

 

An example?

Link to comment
Share on other sites

  • 7 years later...

Hello,

I don't know if the problem has been solved since then, or if it's still current, for you or anyone else, but there is a solution.

Do this in char.cpp:

void CHARACTER::DetermineDropMetinStone()
{
    m_dwDropMetinStone = 0;
}

Then go here: usr/game/server/share/locale/xxx.(or whatever is your path) Edit this file here: mob_drop_item.txt

Example:

Group	비마석
{
	Mob	8001	--> Metin ID. 
	Type	drop
	1	28430	1	100		--> The last two values: quantity and % chance
	2	28431	1	100
	3	28432	1	100
	4	28433	1	100
	5	28434	1	100
	6	28435	1	100
	7	28436	1	100
	8	28437	1	100
	9	28438	1	100
	10	28439	1	100
	11	28440	1	100
	12	28441	1	100
	13	28442	1	100
	14	28443	1	100
}

With this solution only +4 stones will drop from metins.

 

Edited by Crow
  • Metin2 Dev 1
Link to comment
Share on other sites

  • 7 months later...

check constants.cpp in game source:

const SStoneDropInfo aStoneDrop[STONE_INFO_MAX_NUM] =
{
    //  mob        pct    {+0    +1    +2    +3    +4}
    {8005,    60,    {30,    30,    30,    9,    1}    },
    {8006,    60,    {28,    29,    31,    11,    1}    },
    {8007,    60,    {24,    29,    32,    13,    2}    },
    {8008,    60,    {22,    28,    33,    15,    2}    },
    {8009,    60,    {21,    27,    33,    17,    2}    },
    {8010,    60,    {18,    26,    34,    20,    2}    },
    {8011,    60,    {14,    26,    35,    22,    3}    },
    {8012,    60,    {10,    26,    37,    24,    3}    },
    {8013,    60,    {2,    26,    40,    29,    3}    },
    {8014,    60,    {0,    26,    41,    30,    3}    },
};

here you have from which metins stone drop (8005=lvl25, 8014=lvl 70, you can add other), and in table is % chance of drop specified + of stone

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


×
×
  • 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.