SebyWalker 4 Posted March 10, 2023 Share Posted March 10, 2023 Hello! I have an issue with stones dropping from metinstones. As far as i know, stones should drop by default with these functions from char.cpp Spoiler 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 is also set in void CHARACTER::SetProto(const CMob * pkMob): Spoiler if (IsStone()) { DetermineDropMetinStone(); } And also, this is the constants.cpp: Spoiler 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} }, }; I tried to hardcode every stone vnum in 1 metinstone but it actually can drop multiple stones, like sometimes i would get 0 but sometimes even 5 at once. I don't like that, i want to drop only 1 stone per metinstone kill. Does anybody know the solution or what should i look for? Also, i compared these files with ones from another svfile and they actually look the same. On that server file there was never this problem. 1 Link to comment Share on other sites More sharing options...
Active Member Klaus 158 Posted March 10, 2023 Active Member Share Posted March 10, 2023 flag "no_drop_metin_stone" is set to 0 ? 1 Link to comment Share on other sites More sharing options...
SebyWalker 4 Posted March 11, 2023 Author Share Posted March 11, 2023 Hey. If you are reffering to this: Spoiler 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}, } It is set to 0 but nothing happens. 1 Link to comment Share on other sites More sharing options...
SebyWalker 4 Posted March 12, 2023 Author Share Posted March 12, 2023 up 1 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