• Announcement:
    In order to download VIP files, you need to UPGRADE your account.

Not answered Stone Problem

Member
Mar
Threads
2
23
0
1
HubMoney
156
Hello! I have a problem with stones dropping from metinstones. I will be short on this. Stones do not drop by default from metinstones as it should. This is the char.cpp:
void CHARACTER::DetermineDropMetinStone()
{
#ifdef ENABLE_NEWSTUFF
if (g_NoDropMetinStone)
{
m_dwDropMetinStone = 0;
return;
}
#endif

static const DWORD c_adwMetin[] =
{
#if defined(ENABLE_WOLFMAN_CHARACTER) && defined(USE_WOLFMAN_STONES)
28012,
#endif
28030,
28031,
28032,
28033,
28034,
28035,
28036,
28037,
28038,
28039,
28040,
28041,
28042,
28043,
#if defined(ENABLE_MAGIC_REDUCTION_SYSTEM) && defined(USE_MAGIC_REDUCTION_STONES)
28044,
28045,
#endif
};
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, sizeof(c_adwMetin)/sizeof(DWORD) - 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씩 증가
}
}
}
}
}
This function is also set in CHARACTER::SetProto(const CMob * pkMob):
if (IsStone())
{
DetermineDropMetinStone();
}
And also this is constants.cpp:
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} },
};
As well, i tried to set flag no_drop_metin_stone to 0 and even comment the whole function that set the flags but nothing happens:
function check_event_flags()
local event_table = {
{"gold_drop_limit_time", 1},
{"item_drop_limit_time", 1},
{"box_use_limit_time", 1},
{"buysell_limit_time", 1},
{"no_drop_metin_stone", 0},
{"no_mount_at_guild_war", 1},
{"no_potions_on_pvp", 1},
}
for num1,str1 in ipairs(event_table) do
if game.get_event_flag(str1[1])~=str1[2] then
game.set_event_flag(str1[1], str1[2])
end
end
end
I tried hardcoding the stones vnums in mob_drop_item and it may actually drop more stones than 1. So I want to only drop 0 and 1 stone from metinstones. If anybody knows a fix or maybe tell me to look further, I am waiting for a reply, or maybe a message on my discord: seby134#8172 so we can discuss more there.
Thank you in advance.
 
Last edited:
Metin2Hub Bot
M2Hub Bot
Feb
Threads
65
1,623
1
660
113
HubMoney
1,025
Hello! I have a problem with stones dropping from metinstones. I will be short on this. This is the char.cpp:
void CHARACTER::DetermineDropMetinStone()
{
#ifdef ENABLE_NEWSTUFF
if (g_NoDropMetinStone)
{
m_dwDropMetinStone = 0;
return;
}
#endif

static const DWORD c_adwMetin[] =
{
#if defined(ENABLE_WOLFMAN_CHARACTER) && defined(USE_WOLFMAN_STONES)
28012,
#endif
28030,
28031,
28032,
28033,
28034,
28035,
28036,
28037,
28038,
28039,
28040,
28041,
28042,
28043,
#if defined(ENABLE_MAGIC_REDUCTION_SYSTEM) && defined(USE_MAGIC_REDUCTION_STONES)
28044,
28045,
#endif
};
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, sizeof(c_adwMetin)/sizeof(DWORD) - 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씩 증가
}
}
}
}
}
This function is also set in CHARACTER::SetProto(const CMob * pkMob):
if (IsStone())
{
DetermineDropMetinStone();
}
And also this is constants.cpp:
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} },
};
As well, i tried to set flag no_drop_metin_stone to 0 and even comment the whole function that set the flags but nothing happens:
function check_event_flags()
local event_table = {
{"gold_drop_limit_time", 1},
{"item_drop_limit_time", 1},
{"box_use_limit_time", 1},
{"buysell_limit_time", 1},
{"no_drop_metin_stone", 0},
{"no_mount_at_guild_war", 1},
{"no_potions_on_pvp", 1},
}
for num1,str1 in ipairs(event_table) do
if game.get_event_flag(str1[1])~=str1[2] then
game.set_event_flag(str1[1], str1[2])
end
end
end
I tried hardcoding the stones vnums in mob_drop_item and it may actually drop more stones than 1. So I want to only drop 0 and 1 stone from metinstones. If anybody knows a fix or maybe tell me to look further, I am waiting for a reply, or maybe a message on my discord: seby134#8172 so we can discuss more there.
Thank you in advance.

Hello dear user,

Your post will be under surveillance by bots for the next few hours.

Forum description : Metin2 private server, Metin2 download, Metin2 support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.
 
Member
Dec
Threads
0
17
2
3
HubMoney
194
I would check what the value of g_NoDropMetinStone is, maybe that's the reason you're not getting drops.
Alternatively, comment out this part

#ifdef ENABLE_NEWSTUFF
if (g_NoDropMetinStone)
{
m_dwDropMetinStone = 0;
return;
}
#endif

from DetermineDropMetinStone() in char.cpp
 
Member
Mar
Threads
2
23
0
1
HubMoney
156
I would check what the value of g_NoDropMetinStone is, maybe that's the reason you're not getting drops.
Alternatively, comment out this part

#ifdef ENABLE_NEWSTUFF
if (g_NoDropMetinStone)
{
m_dwDropMetinStone = 0;
return;
}
#endif

from DetermineDropMetinStone() in char.cpp
Well, tried some things after your reply and I actually solved this.
Actually, you did :). So, commenting that "ENABLE_NEWSTUFF" did the work. I really never thought of that. Thank you!
 
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock