Jump to content

Specify item drop announce


Recommended Posts


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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 by QQfoolsorellina
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  12/20/11
  • Last Seen:  

Working on 3CeaM?

no announcement after I try to implement this on 3ceam

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  12/20/11
  • Last Seen:  

Sorry my bad its working on 3ceam I forgot to recompile :3

Thank you /kis

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   1
  • Joined:  05/15/12
  • Last Seen:  

This mod will announce all item drop by GM or only announce item listed in item_announce.txt

Thanks in advance.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  12/20/11
  • Last Seen:  

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 :))

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  06/04/12
  • Last Seen:  

Thank you very much

It can work with 3CEAM 672 /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

thanks.It is working in my eathena svn 14993

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

thx I m new to src edit and glad to see it work

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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%%)

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

works like a charm thanks.

Link to comment
Share on other sites

  • 6 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  12/26/12
  • Last Seen:  

how do I advertise if I capture for a pet?

example "player" test captured a "poring" with 15% chance

please!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

nice one, thanks for release /no1

Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

how to add map name into the announce,

example : "player A" got "monster name" 's "monster drop" in the "map name"

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   13
  • Joined:  02/16/12
  • Last Seen:  

how to fix this error?

thx

 

FwmuXb8.png

Edited by Cyrix
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

how to fix the 

 

Error 4 error C2059: syntax error : ')' ?

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  03/29/12
  • Last Seen:  

On 2/22/2013 at 7:48 PM, Cyrix said:

how to fix this error?

thx

FwmuXb8.png

Having the same error as this. Is this topic still alive?

I'm using 17404 revision. 

Bump? Anyone? ?

Edited by ajaytrix
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

try this one, I just made this for r17457: item_announce-rA-r17457.patch

  • Upvote 1
Link to comment
Share on other sites

  • 6 years later...

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

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?

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
Reply to this topic...

×   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...