Jump to content
  • 0
evilpuncker

Two small requests about mob_dead function

Question

This one.

 

First issue (most likely a question):

we have this code:

			if (src) {
				//Drops affected by luk as a fixed increase [Valaris]
				if (battle_config.drops_by_luk)
					drop_rate += status_get_luk(src)*battle_config.drops_by_luk/100;
				//Drops affected by luk as a % increase [Skotlex]
				if (battle_config.drops_by_luk2)
					drop_rate += (int)(0.5+drop_rate*status_get_luk(src)*battle_config.drops_by_luk2/10000.);
			}

 

lets say my server max stat is 600, what value should I use so at 600 LUCK, I get +10% drop

 

Second issue:

Since they removed the old battle conf that we could set a drop announce for items with X% drop chance, without any replacement (okay we have the DropAnnounce, but its a pain to add that on every item entry), the question is: what should I change on this code in order to make it announce items with drop chance "equal or lower than X%"?

 

			// Official Drop Announce [Jedzkie]
			if (mvp_sd != NULL) {
				if ((id = itemdb->search(it->nameid)) != NULL && id->flag.drop_announce) {
					clif->item_drop_announce(mvp_sd, it->nameid, md->name);
				}
			}

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
1 hour ago, evilpuncker said:

I wanted to know if its possible to edit the code to something like this:

plugin ... please no source edit, hercules member please don't edit source code by any means necessary
https://github.com/AnnieRuru/Release/blob/master/plugins/rare_drop_announce.c

 

 

2 hours ago, evilpuncker said:

and about the other luk issue, its really hard to track since @monsterinfo doesn't display drop rates based on current player values, but flat values (I think)

try write a plugin yourself ?

Share this post


Link to post
Share on other sites
  • 0
44 minutes ago, evilpuncker said:

lets say my server max stat is 600, what value should I use so at 600 LUCK, I get +10% drop

Poring has 70% chance to drop a Jellopy

 

if having 100 LUK, this will make Jellopy 80% drop rate (70% +10)

// Makes your LUK value affect drop rates on an absolute basis.
// Setting to 100 means each LUK adds 0.01% chance to find items
// (regardless of item's base drop rate).
drops_by_luk: 100000

if having 100 LUK, this will make Jellopy 77% drop rate (70% * 1.1)

// Makes your LUK value affect drop rates on a relative basis.
// Setting to 100 means each LUK adds 1% chance to find items
// (So at 100 luk, everything will have double chance of dropping).
drops_by_luk2: 10

 

600 LUK ... then the value above should divide by 6

10/6 = .... don't want to think about it

 

DIDN'T TEST

 


 

this isn't a percentage type calculation, but a flag on/off

db\re\item_db.conf


	BuyingStore: true/false       (boolean, defaults to false)
	Delay: Delay to use item      (int, defaults to 0)
	KeepAfterUse: true/false      (boolean, defaults to false)
	DropAnnounce: true/false      (boolean, defaults to false) <---- HERE
	ShowDropEffect: true/false    (boolean, defaults to false)
	DropEffectMode: Effect Type   (int, default to 0)

.... if this feature isn't renewal only why this isn't include in db\item_db2.conf ?

Share this post


Link to post
Share on other sites
  • 0
42 minutes ago, AnnieRuru said:

this isn't a percentage type calculation, but a flag on/off

 

I mean this feature that they removed:

https://github.com/HerculesWS/Hercules/commit/b767de877460a7fb55c4c8a6bd8e21bcbe079b07

 

I wanted to know if its possible to edit the code to something like this:

 

(pseudo code)

if ((id = itemdb->search(it->nameid)) != NULL && id->flag.drop_announce (or drop_rate lower/equal than X%)) {
	clif->item_drop_announce(mvp_sd, it->nameid, md->name);
}

 

 

and about the other luk issue, its really hard to track since @monsterinfo doesn't display drop rates based on current player values, but flat values (I think)

Edited by evilpuncker

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.