QQfoolsorellina Posted May 25, 2012 Posted May 25, 2012 (edited) src/map/itemdb.h find unsigned autoequip: 1; unsigned buyingstore : 1; } flag; short gm_lv_trade_override; //GM-level to override trade_restriction }; replace with unsigned autoequip: 1; unsigned buyingstore : 1; } flag; unsigned ann: 1;//annouce flag short gm_lv_trade_override; //GM-level to override trade_restriction }; src/map/item.c find /*==================================== * read all item-related databases *------------------------------------*/ add above /*==================================== * read item_announce.txt *------------------------------------*/ static bool itemdb_read_announce(char* fields[], int columns, int current) { unsigned short nameid; struct item_data* id; nameid = (unsigned short)strtoul(fields[0], NULL, 10); if( ( id = itemdb_exists(nameid) ) == NULL ) { ShowWarning("itemdb_read_announce: Unknow item id '%hu'.\n", nameid); return false; } id->ann=1; return true; } /*==================================== item.c find sv_readdb(db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, &itemdb_read_itemtrade); sv_readdb(db_path, "item_delay.txt", ',', 2, 2, -1, &itemdb_read_itemdelay); sv_readdb(db_path, "item_buyingstore.txt", ',', 1, 1, -1, &itemdb_read_buyingstore); add after sv_readdb(db_path, "item_announce.txt", ',', 1, 1, -1, &itemdb_read_announce); src/map/mob.c find //A Rare Drop Global Announce by Lupus if( mvp_sd && drop_rate <= battle_config.rare_drop_announce ) { struct item_data *i_data; char message[128]; i_data = itemdb_search(ditem->item_data.nameid); sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, i_data->jname, (float)drop_rate/100); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif_broadcast(message,strlen(message)+1,0); } add after if(mvp_sd) {//specify drop item announce struct item_data *dd = NULL; char anme[128]; dd = itemdb_search(ditem->item_data.nameid); if(dd->ann==1){ sprintf (anme, msg_txt(541), mvp_sd->status.name, md->name, dd->jname, (float)drop_rate/100); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif_broadcast(anme,strlen(anme)+1,0); } } find //A Rare MVP Drop Global Announce by Lupus if(temp<=battle_config.rare_drop_announce) { struct item_data *i_data; char message[128]; i_data = itemdb_exists(item.nameid); sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, i_data->jname, temp/100.); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif_broadcast(message,strlen(message)+1,0); } add after if(mvp_sd) {//specify drop item announce struct item_data *dd = NULL; char anme[128]; dd = itemdb_search(item.nameid); if(dd->ann==1){ sprintf (anme, msg_txt(541), mvp_sd->status.name, md->name, dd->jname, (float)temp/100); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif_broadcast(anme,strlen(anme)+1,0); } } db/ create a doc named item_announce.txt //to set drop announce item id //@reloditemdb to reload all setting //format: item id //512 //501 //502 don't forgot to recompile sida.patch Edited May 25, 2012 by QQfoolsorellina 2 Quote
Loke Posted May 25, 2012 Posted May 25, 2012 Working on 3CeaM? no announcement after I try to implement this on 3ceam Quote
QQfoolsorellina Posted May 25, 2012 Author Posted May 25, 2012 Working on 3CeaM? no announcement after I try to implement this on 3ceam Sorry ,i m not using 3Ceam ,I can't test it but it work for me(using rathena) Quote
Loke Posted May 26, 2012 Posted May 26, 2012 Sorry my bad its working on 3ceam I forgot to recompile :3 Thank you Quote
wazhanudin Posted May 26, 2012 Posted May 26, 2012 This mod will announce all item drop by GM or only announce item listed in item_announce.txt Thanks in advance. Quote
Loke Posted May 26, 2012 Posted May 26, 2012 This mod will announce all item drop by GM or only announce item listed in item_announce.txt Thanks in advance. No this mod will announce the drop of the monster which is listed in item_announce.txt Example: 2423 // Variant Shoes The player who got Variant Shoes will automatically announce. This mod will help your server to those GM who secretly killing mvp's ) Quote
neineinei Posted June 4, 2012 Posted June 4, 2012 Thank you very much It can work with 3CEAM 672 Quote
QQfoolsorellina Posted June 6, 2012 Author Posted June 6, 2012 thx I m new to src edit and glad to see it work Quote
maynard Posted June 13, 2012 Posted June 13, 2012 I tried using rathena, If you forgot to autoloot the card will be drop but there will be announcement that you got the card. So it is possible if it will only announce if you really get the card. Or maybe change the broadcast to: Maynard killed a "monster name" with "Card". This way it is his fault if he didnt get or if he is not autoloot enabled. Quote
QQfoolsorellina Posted June 13, 2012 Author Posted June 13, 2012 I tried using rathena, If you forgot to autoloot the card will be drop but there will be announcement that you got the card. So it is possible if it will only announce if you really get the card. Or maybe change the broadcast to: Maynard killed a "monster name" with "Card". This way it is his fault if he didnt get or if he is not autoloot enabled. just change all 541 to 901 in src conf/msg_athena.conf and add a msg 901: '%s' kill %s with %s (chance: %0.02f%%) Quote
eduardos Posted December 26, 2012 Posted December 26, 2012 how do I advertise if I capture for a pet? example "player" test captured a "poring" with 15% chance please! Quote
QQfoolsorellina Posted December 28, 2012 Author Posted December 28, 2012 how do I advertise if I capture for a pet? example "player" test captured a "poring" with 15% chance please! src/map/pet.c inside if(rnd()%10000 < pet_catch_rate){ here to make a announce} Quote
serakh00 Posted January 21, 2013 Posted January 21, 2013 how to add map name into the announce, example : "player A" got "monster name" 's "monster drop" in the "map name" Quote
Cyrix Posted February 22, 2013 Posted February 22, 2013 (edited) how to fix this error? thx Edited February 22, 2013 by Cyrix Quote
Brynner Posted April 24, 2013 Posted April 24, 2013 how to fix the Error 4 error C2059: syntax error : ')' ? Quote
ajaytrix Posted August 16, 2013 Posted August 16, 2013 (edited) On 2/22/2013 at 7:48 PM, Cyrix said: how to fix this error? thx Having the same error as this. Is this topic still alive? I'm using 17404 revision. Bump? Anyone? Edited August 16, 2013 by ajaytrix Quote
Cydh Posted August 18, 2013 Posted August 18, 2013 try this one, I just made this for r17457: item_announce-rA-r17457.patch 1 Quote
Ukiram Posted December 12, 2019 Posted December 12, 2019 On 8/18/2013 at 1:50 PM, Cydh said: try this one, I just made this for r17457: item_announce-rA-r17457.patch is this still working? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.