kidsada Posted April 27 Share Posted April 27 (edited) I want to modify @mi to look like the picture, can someone give me a solution, thanks. Add + ( 0.01%) separate to add in the pressing part, bubble gum or the part that says various drop Edited April 27 by kidsada Quote Link to comment Share on other sites More sharing options...
1 joecalis Posted May 1 Share Posted May 1 (edited) In the latest version of Rathena this is already implemented. If you're using an older version you might have to diff patch the itemlink commands by Cydh. The older rathena versions supports the "itemlink-20190319-e6f1f21d.diff" Then you would have to edit the atcommand.cpp in ACMD_FUNC(mobinfo) Find: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { int droprate; if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL) continue; droprate = mob->dropitem[i].p; #ifdef RENEWAL_DROP if( battle_config.atcommand_mobinfo_type ) { droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100; if (droprate <= 0 && !battle_config.drop_rate0item) droprate = 1; } #endif if (pc_isvip(sd)) // Display drop rate increase for VIP droprate += (droprate * battle_config.vip_drop_increase) / 100; if (item_data->slot) sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, (float)droprate / 100); else sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, (float)droprate / 100); strcat(atcmd_output, atcmd_output2); if (++j % 3 == 0) { clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. else if (j % 3 != 0) clif_displaymessage(fd, atcmd_output); // mvp if (mob->mexp) { float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%u clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; if (j == 1) { if (item_data->slot) sprintf(atcmd_output2, " %s[%d] %02.02f%%", item_data->jname, item_data->slot, mvppercent); else sprintf(atcmd_output2, " %s %02.02f%%", item_data->jname, mvppercent); } else { if (item_data->slot) sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, mvppercent); else sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, mvppercent); } strcat(atcmd_output, atcmd_output2); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. else clif_displaymessage(fd, atcmd_output); } Change to: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { int droprate; int dropbonus = 0; if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL) continue; droprate = mob->dropitem[i].p; #ifdef RENEWAL_DROP if( battle_config.atcommand_mobinfo_type ) { droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100; if (droprate <= 0 && !battle_config.drop_rate0item) droprate = 1; } #endif if((sd->sc.count && sd->sc.data[SC_ITEMBOOST])) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum dropbonus += (droprate * sd->sc.data[SC_ITEMBOOST]->val1) / 100; if (pc_isvip(sd)) // Display drop rate increase for VIP dropbonus += (droprate * battle_config.vip_drop_increase) / 100; if (dropbonus) sprintf(atcmd_output2, " %s %02.02f%% + (%02.02f%%)", createItemLink(item_data->nameid, 0, NULL).c_str(), (float)droprate / 100, (float)dropbonus / 100); else sprintf(atcmd_output2, " %s %02.02f%%", createItemLink(item_data->nameid, 0, NULL).c_str(), (float)droprate / 100); strcat(atcmd_output, atcmd_output2); j++; clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. // mvp if (mob->mexp) { float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%u clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; sprintf(atcmd_output2, " %s %02.02f%%", createItemLink(item_data->nameid, 0, NULL).c_str(), mvppercent); strcat(atcmd_output, atcmd_output2); clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. } Edited May 6 by joecalis 1 1 Quote Link to comment Share on other sites More sharing options...
0 kidsada Posted May 6 Author Share Posted May 6 In the latest version of Rathena 2022+ code int dropbonus = 0; Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted May 7 Share Posted May 7 On 5/1/2023 at 10:46 AM, joecalis said: In the latest version of Rathena this is already implemented. If you're using an older version you might have to diff patch the itemlink commands by Cydh. The older rathena versions supports the "itemlink-20190319-e6f1f21d.diff" Then you would have to edit the atcommand.cpp in ACMD_FUNC(mobinfo) Find: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { int droprate; if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL) continue; droprate = mob->dropitem[i].p; #ifdef RENEWAL_DROP if( battle_config.atcommand_mobinfo_type ) { droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100; if (droprate <= 0 && !battle_config.drop_rate0item) droprate = 1; } #endif if (pc_isvip(sd)) // Display drop rate increase for VIP droprate += (droprate * battle_config.vip_drop_increase) / 100; if (item_data->slot) sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, (float)droprate / 100); else sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, (float)droprate / 100); strcat(atcmd_output, atcmd_output2); if (++j % 3 == 0) { clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. else if (j % 3 != 0) clif_displaymessage(fd, atcmd_output); // mvp if (mob->mexp) { float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%u clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; if (j == 1) { if (item_data->slot) sprintf(atcmd_output2, " %s[%d] %02.02f%%", item_data->jname, item_data->slot, mvppercent); else sprintf(atcmd_output2, " %s %02.02f%%", item_data->jname, mvppercent); } else { if (item_data->slot) sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, mvppercent); else sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, mvppercent); } strcat(atcmd_output, atcmd_output2); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. else clif_displaymessage(fd, atcmd_output); } Change to: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { int droprate; int dropbonus = 0; if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL) continue; droprate = mob->dropitem[i].p; #ifdef RENEWAL_DROP if( battle_config.atcommand_mobinfo_type ) { droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100; if (droprate <= 0 && !battle_config.drop_rate0item) droprate = 1; } #endif if((sd->sc.count && sd->sc.data[SC_ITEMBOOST])) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum dropbonus += (droprate * sd->sc.data[SC_ITEMBOOST]->val1) / 100; if (pc_isvip(sd)) // Display drop rate increase for VIP dropbonus += (droprate * battle_config.vip_drop_increase) / 100; if (dropbonus) sprintf(atcmd_output2, " %s %02.02f%% + (%02.02f%%)", createItemLink(item_data->nameid, 0, NULL).c_str(), (float)droprate / 100, (float)dropbonus / 100); else sprintf(atcmd_output2, " %s %02.02f%%", createItemLink(item_data->nameid, 0, NULL).c_str(), (float)droprate / 100); strcat(atcmd_output, atcmd_output2); j++; clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. // mvp if (mob->mexp) { float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%u clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; sprintf(atcmd_output2, " %s %02.02f%%", createItemLink(item_data->nameid, 0, NULL).c_str(), mvppercent); strcat(atcmd_output, atcmd_output2); clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. } thanks for this Working 100% i'm using itemlink-20190319-e6f1f21d.diff 1 Quote Link to comment Share on other sites More sharing options...
0 Gidz Cross Posted May 7 Share Posted May 7 (edited) On 5/1/2023 at 10:46 AM, joecalis said: In the latest version of Rathena this is already implemented. If you're using an older version you might have to diff patch the itemlink commands by Cydh. The older rathena versions supports the "itemlink-20190319-e6f1f21d.diff" Then you would have to edit the atcommand.cpp in ACMD_FUNC(mobinfo) Find: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { int droprate; if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL) continue; droprate = mob->dropitem[i].p; #ifdef RENEWAL_DROP if( battle_config.atcommand_mobinfo_type ) { droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100; if (droprate <= 0 && !battle_config.drop_rate0item) droprate = 1; } #endif if (pc_isvip(sd)) // Display drop rate increase for VIP droprate += (droprate * battle_config.vip_drop_increase) / 100; if (item_data->slot) sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, (float)droprate / 100); else sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, (float)droprate / 100); strcat(atcmd_output, atcmd_output2); if (++j % 3 == 0) { clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. else if (j % 3 != 0) clif_displaymessage(fd, atcmd_output); // mvp if (mob->mexp) { float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%u clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; if (j == 1) { if (item_data->slot) sprintf(atcmd_output2, " %s[%d] %02.02f%%", item_data->jname, item_data->slot, mvppercent); else sprintf(atcmd_output2, " %s %02.02f%%", item_data->jname, mvppercent); } else { if (item_data->slot) sprintf(atcmd_output2, " - %s[%d] %02.02f%%", item_data->jname, item_data->slot, mvppercent); else sprintf(atcmd_output2, " - %s %02.02f%%", item_data->jname, mvppercent); } strcat(atcmd_output, atcmd_output2); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. else clif_displaymessage(fd, atcmd_output); } Change to: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { int droprate; int dropbonus = 0; if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL) continue; droprate = mob->dropitem[i].p; #ifdef RENEWAL_DROP if( battle_config.atcommand_mobinfo_type ) { droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100; if (droprate <= 0 && !battle_config.drop_rate0item) droprate = 1; } #endif if((sd->sc.count && sd->sc.data[SC_ITEMBOOST])) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum dropbonus += (droprate * sd->sc.data[SC_ITEMBOOST]->val1) / 100; if (pc_isvip(sd)) // Display drop rate increase for VIP dropbonus += (droprate * battle_config.vip_drop_increase) / 100; if (dropbonus) sprintf(atcmd_output2, " %s %02.02f%% + (%02.02f%%)", createItemLink(item_data->nameid, 0, NULL).c_str(), (float)droprate / 100, (float)dropbonus / 100); else sprintf(atcmd_output2, " %s %02.02f%%", createItemLink(item_data->nameid, 0, NULL).c_str(), (float)droprate / 100); strcat(atcmd_output, atcmd_output2); j++; clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. // mvp if (mob->mexp) { float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%u clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; sprintf(atcmd_output2, " %s %02.02f%%", createItemLink(item_data->nameid, 0, NULL).c_str(), mvppercent); strcat(atcmd_output, atcmd_output2); clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. } Hey mate! Thank you for this. I wish that this can be implemented to @whodrops as well. *EDIT Item linking is not necessary for @whodrops. Just the original drop rate + (bonuses) when you are on VIP or consumed Bubblegums. Edited May 7 by Gidz Cross Quote Link to comment Share on other sites More sharing options...
0 joecalis Posted May 7 Share Posted May 7 (edited) 28 minutes ago, Gidz Cross said: Hey mate! Thank you for this. I wish that this can be implemented to @whodrops as well. *EDIT Item linking is not necessary for @whodrops. Just the original drop rate + (bonuses) when you are on VIP or consumed Bubblegums. in atcommand.cpp Find: for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++) { int dropchance = item_data->mob[j].chance; Change To: for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++) { int dropchance = item_data->mob[j].chance; int dropbonus = 0; Find: #endif if (pc_isvip(sd)) // Display item rate increase for VIP dropchance += (dropchance * battle_config.vip_drop_increase) / 100; sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.); Change To: #endif if(sd->sc.count && sd->sc.data[SC_ITEMBOOST]) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum dropbonus += (dropchance * sd->sc.data[SC_ITEMBOOST]->val1) / 100; if (pc_isvip(sd)) // Display item rate increase for VIP dropbonus += (dropchance * battle_config.vip_drop_increase) / 100; if(dropbonus) sprintf(atcmd_output, "- %s (%d): %02.02f%% + (%02.02f%%)", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100., dropbonus/100.); else sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.); Edited May 7 by joecalis 1 Quote Link to comment Share on other sites More sharing options...
0 Gidz Cross Posted May 7 Share Posted May 7 (edited) 2 minutes ago, joecalis said: in atcommand.cpp Find: for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++) { int dropchance = item_data->mob[j].chance; Change To: for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++) { int dropchance = item_data->mob[j].chance; int dropbonus = 0; Find: #endif if (pc_isvip(sd)) // Display item rate increase for VIP dropchance += (dropchance * battle_config.vip_drop_increase) / 100; sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.); Change To: #endif if(sd->sc.count && sd->sc.data[SC_ITEMBOOST]) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum dropbonus += (dropchance * sd->sc.data[SC_ITEMBOOST]->val1) / 100; if (pc_isvip(sd)) // Display item rate increase for VIP dropbonus += (dropchance * battle_config.vip_drop_increase) / 100; if(dropbonus) sprintf(atcmd_output, "- %s (%d): %02.02f%% + (%02.02f%%)", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100., dropbonus/100.); else sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.); Oh my goodness! Thank you for getting back with me! Gimme few minutes. Will try this! **EDIT It Works! Edited May 7 by Gidz Cross 1 Quote Link to comment Share on other sites More sharing options...
0 kidsada Posted May 8 Author Share Posted May 8 Find: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { if (mob->dropitem[i].nameid == 0 || mob->dropitem[i].rate < 1) continue; std::shared_ptr<item_data> id = item_db.find(mob->dropitem[i].nameid); if (id == nullptr) continue; int droprate = mob_getdroprate( &sd->bl, mob, mob->dropitem[i].rate, drop_modifier ); sprintf(atcmd_output2, " - %s %02.02f%%", item_db.create_item_link( id ).c_str(), (float)droprate / 100); strcat(atcmd_output, atcmd_output2); if (++j % 1 == 0) { clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. else if (j % 3 != 0) clif_displaymessage(fd, atcmd_output); // mvp if( mob->get_bosstype() == BOSSTYPE_MVP ){ float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%llu clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid == 0) continue; std::shared_ptr<item_data> id = item_db.find(mob->mvpitem[i].nameid); if (id == nullptr) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].rate * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; if (j == 1) { sprintf(atcmd_output2, " %s %02.02f%%", item_db.create_item_link( id ).c_str(), mvppercent); } else { sprintf(atcmd_output2, " - %s %02.02f%%", item_db.create_item_link( id ).c_str(), mvppercent); } strcat(atcmd_output, atcmd_output2); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. else clif_displaymessage(fd, atcmd_output); } } return 0; } my Code Quote Link to comment Share on other sites More sharing options...
0 joecalis Posted May 8 Share Posted May 8 (edited) 4 hours ago, kidsada said: Find: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { if (mob->dropitem[i].nameid == 0 || mob->dropitem[i].rate < 1) continue; std::shared_ptr<item_data> id = item_db.find(mob->dropitem[i].nameid); if (id == nullptr) continue; int droprate = mob_getdroprate( &sd->bl, mob, mob->dropitem[i].rate, drop_modifier ); sprintf(atcmd_output2, " - %s %02.02f%%", item_db.create_item_link( id ).c_str(), (float)droprate / 100); strcat(atcmd_output, atcmd_output2); if (++j % 1 == 0) { clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. else if (j % 3 != 0) clif_displaymessage(fd, atcmd_output); // mvp if( mob->get_bosstype() == BOSSTYPE_MVP ){ float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%llu clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid == 0) continue; std::shared_ptr<item_data> id = item_db.find(mob->mvpitem[i].nameid); if (id == nullptr) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].rate * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; if (j == 1) { sprintf(atcmd_output2, " %s %02.02f%%", item_db.create_item_link( id ).c_str(), mvppercent); } else { sprintf(atcmd_output2, " - %s %02.02f%%", item_db.create_item_link( id ).c_str(), mvppercent); } strcat(atcmd_output, atcmd_output2); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. else clif_displaymessage(fd, atcmd_output); } } return 0; } my Code change to this: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { if (mob->dropitem[i].nameid == 0 || mob->dropitem[i].rate < 1) continue; std::shared_ptr<item_data> id = item_db.find(mob->dropitem[i].nameid); if (id == nullptr) continue; int droprate = apply_rate(mob->dropitem[i].rate, drop_modifier); //mob_getdroprate( &sd->bl, mob, mob->dropitem[i].rate, drop_modifier ); // Cap it to 100% droprate = min(droprate, 10000); // If the monster's drop rate can become 0 if (battle_config.drop_rate0item) { droprate = max(droprate, 0); } else { // If not - cap to 0.01% drop rate - as on official servers droprate = max(droprate, 1); } int dropbonus = 0; if (pc_isvip(sd)) dropbonus += (battle_config.vip_drop_increase * droprate) / 100; dropbonus += (sd->sc.getSCE(SC_ITEMBOOST) ? ((droprate * sd->sc.getSCE(SC_ITEMBOOST)->val1) / 100) : 0); sprintf(atcmd_output2, (dropbonus > 0 ? " - %s %02.02f%% + (%02.02f%%)" : " - %s %02.02f%%"), item_db.create_item_link(id).c_str(), (float)droprate / 100, (float)dropbonus / 100); strcat(atcmd_output, atcmd_output2); clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. // mvp if( mob->get_bosstype() == BOSSTYPE_MVP ){ float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%llu clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid == 0) continue; std::shared_ptr<item_data> id = item_db.find(mob->mvpitem[i].nameid); if (id == nullptr) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].rate * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; sprintf(atcmd_output2, " - %s %02.02f%%", item_db.create_item_link( id ).c_str(), mvppercent); strcat(atcmd_output, atcmd_output2); clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. } } return 0; } Edited May 8 by joecalis Quote Link to comment Share on other sites More sharing options...
0 kidsada Posted May 9 Author Share Posted May 9 The drop rate is still combined. Quote Link to comment Share on other sites More sharing options...
0 joecalis Posted May 9 Share Posted May 9 (edited) 3 hours ago, kidsada said: The drop rate is still combined. no it's not. The bubblegum you are using adds 100% drop chance that's why it's the same. Try using bubblegum id: 12264 that one adds 200% drop chance Edited May 9 by joecalis Quote Link to comment Share on other sites More sharing options...
0 jhof10 Posted May 14 Share Posted May 14 On 5/7/2023 at 3:54 PM, joecalis said: in atcommand.cpp Find: for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++) { int dropchance = item_data->mob[j].chance; Change To: for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++) { int dropchance = item_data->mob[j].chance; int dropbonus = 0; Find: #endif if (pc_isvip(sd)) // Display item rate increase for VIP dropchance += (dropchance * battle_config.vip_drop_increase) / 100; sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.); Change To: #endif if(sd->sc.count && sd->sc.data[SC_ITEMBOOST]) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum dropbonus += (dropchance * sd->sc.data[SC_ITEMBOOST]->val1) / 100; if (pc_isvip(sd)) // Display item rate increase for VIP dropbonus += (dropchance * battle_config.vip_drop_increase) / 100; if(dropbonus) sprintf(atcmd_output, "- %s (%d): %02.02f%% + (%02.02f%%)", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100., dropbonus/100.); else sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.); Hi @joecalis May I ask your inputs to work on latest pull rathena ? Thank you Quote Link to comment Share on other sites More sharing options...
I want to modify @mi to look like the picture, can someone give me a solution, thanks.
Add + ( 0.01%)
separate to add in the pressing part, bubble gum
or the part that says various drop
Link to comment
Share on other sites