Two small requests about mob_dead function

evilpuncker

vai se tratar garota
Messages
2,178
Points
0
Age
109
Location
bronzil
Github
EPuncker
Emulator
Client Version
2019-05-30a MAIN
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%"?

Code:
			// 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);
				}
			}
 
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 ?

 
Last edited by a moderator:
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)

 
Last edited by a moderator:
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

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 ?

 
Back
Top