HueHue 1 Posted July 10, 2024 Share Posted July 10, 2024 Hi, I want to create like a pickaxe costume that has a 10% chance of doubling the drop from the veins. Is that already somewhere in files or does it need implementation of new functions etc. Link to comment https://metin2.dev/topic/32793-double-mining-drop-bonus/ Share on other sites More sharing options...
HueHue 1 Posted January 5 Author Share Posted January 5 bump Link to comment https://metin2.dev/topic/32793-double-mining-drop-bonus/#findComment-168934 Share on other sites More sharing options...
Active+ Member jking 429 Posted January 8 Active+ Member Share Posted January 8 (edited) The fastest and simply way: in minin.cpp, find: void OreDrop(LPCHARACTER ch, DWORD dwLoadVnum) under: if (iFractionCount == 0) { sys_err("Wrong ore fraction count"); return; } add something like: LPITEM pick_costume = ch->GetWear(WEAR_COSTUME_WEAPON); if (pick_costume && pick_costume->GetVnum() == YOUR_ITEM_VNUM) { if (number(1, 100) <= 10) { dwRawOreVnum = YOUR_ITEM_VNUM_TO_DROP; } } and thats all Edited January 8 by jking 1 Link to comment https://metin2.dev/topic/32793-double-mining-drop-bonus/#findComment-168956 Share on other sites More sharing options...
Active Member [GF]Froslass 192 Posted January 8 Active Member Share Posted January 8 (edited) 58 minutes ago, jking said: The fastest and simply way: in minin.cpp, find: void OreDrop(LPCHARACTER ch, DWORD dwLoadVnum) under: if (iFractionCount == 0) { sys_err("Wrong ore fraction count"); return; } add something like: LPITEM pick_costume = ch->GetWear(WEAR_COSTUME_WEAPON); if (pick_costume && pick_costume->GetVnum() == YOUR_ITEM_VNUM) { if (number(1, 100) <= 10) { dwRawOreVnum = YOUR_ITEM_VNUM_TO_DROP; } } and thats all This doesn't seems right.. wouldn't it make much more sense inside EVENTFUNC(mining_event): int iPct = GetOrePct(ch); if (number(1, 100) <= iPct) { OreDrop(ch, load->GetRaceNum()); ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("䱤¿¡ ¼º°øÇÏ¿´½À´Ï´Ù.")); } and change it to this: int iPct = GetOrePct(ch); LPITEM pick_costume = ch->GetWear(WEAR_COSTUME_WEAPON); if (pick_costume && pick_costume->GetVnum() == YOUR_ITEM_VNUM) iPct += 10; if (number(1, 100) <= iPct) { OreDrop(ch, load->GetRaceNum()); ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("䱤¿¡ ¼º°øÇÏ¿´½À´Ï´Ù.")); } EDIT: Nvm, he wants double drop, i thought he wanted to increase the chance of dropping by 10%, i'm sorry EDIT2: It still doesn't seems right, shouldn't this: if (number(1, 100) <= 10) { dwRawOreVnum = YOUR_ITEM_VNUM_TO_DROP; } be: if (number(1, 100) <= 10) { iFractionCount *= 2; } Edited January 8 by [GF]Froslass Link to comment https://metin2.dev/topic/32793-double-mining-drop-bonus/#findComment-168958 Share on other sites More sharing options...
Active+ Member jking 429 Posted January 10 Active+ Member Share Posted January 10 Hmm, I don't know what was in my brain reading this post, but I was sure he wants chance to extra item when wearing weapon costume Link to comment https://metin2.dev/topic/32793-double-mining-drop-bonus/#findComment-168975 Share on other sites More sharing options...
HueHue 1 Posted January 15 Author Share Posted January 15 Thank you so much for all the replies but I would like to do that in a way that if im using the costume i have 10% change of doubling the drop. so not always doubling. only 10% chance for a double drop. Link to comment https://metin2.dev/topic/32793-double-mining-drop-bonus/#findComment-169061 Share on other sites More sharing options...
Active Member [GF]Froslass 192 Posted January 15 Active Member Share Posted January 15 42 minutes ago, HueHue said: Thank you so much for all the replies but I would like to do that in a way that if im using the costume i have 10% change of doubling the drop. so not always doubling. only 10% chance for a double drop. Yes this is how our code works. Just use the code @ jking provided, and apply my fix: On 1/8/2025 at 9:30 PM, [GF]Froslass said: EDIT2: It still doesn't seems right, shouldn't this: if (number(1, 100) <= 10) { dwRawOreVnum = YOUR_ITEM_VNUM_TO_DROP; } be: if (number(1, 100) <= 10) { iFractionCount *= 2; } Link to comment https://metin2.dev/topic/32793-double-mining-drop-bonus/#findComment-169063 Share on other sites More sharing options...
Recommended Posts
Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now