Jump to content
  • 0

I want to modify @mi to look like the picture, can someone give me a solution, thanks.


kidsada

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  10/11/16
  • Last Seen:  

image.png.4d992d1c7eb58357e781e8b4af8a09d5.png
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 by kidsada
  • Love 1
Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  64
  • Reputation:   40
  • Joined:  03/26/12
  • Last Seen:  

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 by joecalis
  • Upvote 1
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  10/11/16
  • Last Seen:  

In the latest version of Rathena 2022+

code 

int dropbonus = 0;
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

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

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

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 by Gidz Cross
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  64
  • Reputation:   40
  • Joined:  03/26/12
  • Last Seen:  

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 by joecalis
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

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!

image.png.d678fa0f120e4f3c3e661ec5a359db8b.png

Edited by Gidz Cross
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  10/11/16
  • Last Seen:  

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 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  64
  • Reputation:   40
  • Joined:  03/26/12
  • Last Seen:  

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 by joecalis
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  10/11/16
  • Last Seen:  

The drop rate is still combined.

image.png.f3261b0ce1e944421f690767824e42ed.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  64
  • Reputation:   40
  • Joined:  03/26/12
  • Last Seen:  

3 hours ago, kidsada said:

The drop rate is still combined.

image.png.f3261b0ce1e944421f690767824e42ed.png

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

image.png.99effda0d270cbb9e88204ff102b0628.png

Edited by joecalis
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  03/22/15
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  06/26/18
  • Last Seen:  

Good

Edited by gabrielks
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

On 5/7/2023 at 3:55 PM, Gidz Cross said:

Oh my goodness! Thank you for getting back with me! Gimme few minutes. Will try this!

**EDIT

It Works!

image.png.d678fa0f120e4f3c3e661ec5a359db8b.png

Hi @joecalis

Turns out i want item linking in @whodrops. Can't seems to understand how to do it. Haha!


NVM. I already solved it.

Edited by Gidz Cross
FIXED IT.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...