Hello I'm creating a custom drop for Assis 374, I'm a customer but no one helped me there
Well this code works perfectly until going to level 81 the dropes are all tripled does anyone help me?
// Herbs.
if (getTemplate().getDropHerbGroup() > 0)
{
for (DropCategory cat : HerbDropData.getInstance().getHerbDroplist(getTemplate().getDropHerbGroup()))
{
final IntIntHolder item = calculateCategorizedHerbItem(cat, levelModifier);
if (item != null)
{
if (Config.AUTO_LOOT_HERBS)
player.addItem("Loot", item.getId(), 1, this, true);
else
{
// If multiple similar herbs drop, split them and make a unique drop per item.
final int count = item.getValue();
if (count > 1)
{
item.setValue(1);
for (int i = 0; i < count; i++)
dropItem(player, item);
}
else
dropItem(player, item);
}
}
}
}
+
+ // Drop All Monsters
+ if ((Config.ALLOW_GLOBAL_DROP) && ((this instanceof Monster)))
+ {
+ int levelMobMin = 0;
+ for (int i = 1; i < 81; i++)
+ {
+ levelMobMin = player.getLevel() - 8;
+ if (i > 10)
+ {
+ if (player.getLevel() == i && getLevel() < levelMobMin)
+ return;
+ }
+ }
+ dropItem(player, Config.GLOBAL_DROP_ITEMS);
+ }
}
+
+ private void dropItem(Player player, Map<Integer, List<Integer>> droplist)
+ {
+ Integer key;
+ Integer chance;
+ Integer min;
+ Integer max;
+ Integer itemMin;
+ Integer itemMax;
+ Integer count;
+ Integer rnd;
+ for (Entry<Integer, List<Integer>> entry : droplist.entrySet())
+ {
+ key = entry.getKey();
+ List<Integer> valueList = entry.getValue();
+
+ chance = valueList.get(0);
+ min = valueList.get(1);
+ max = valueList.get(2);
+
+ if (getLevel() > 9)
+ {
+ itemMin = getLevel() * min / 5;
+ itemMax = getLevel() * max / 6;
+ }
+ else
+ {
+ itemMin = min;
+ itemMax = max;
+ }
+ count = Rnd.get(itemMin, itemMax);
+
+ rnd = Rnd.get(100);
+
+ if (rnd < chance)
+ {
+ IntIntHolder item = new IntIntHolder(key, count);
+ if (Config.AUTO_LOOT)
+ player.doAutoLoot(this, item);
+ else
+ dropItem(player, item);
+ }
+ }
+ }
+
/**
* Drop reward item.
* @param mainDamageDealer The player who made highest damage.
* @param holder The ItemHolder.
* @return the dropped item instance.
*/
public ItemInstance dropItem(Player mainDamageDealer, IntIntHolder holder)
{
# Select o item for drop all monster
# Example : Itemid,chance,min,max;Itemid,chance,min,max
DropSystemItems = 9210,80,2,4;9211,70,1,3;9212,60,2,5;9213,40,3,5;9214,30,1,3;9215,50,2,3;9216,20,2,4
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Your words are fantastic; I've never seen so much crap come out of just one mouth.
Every time you try to explain yourself, you show even more that you're nothing but a natural-born scammer, a deceiver of innocent people.
If you pay attention to only one decompiler-compiler AiNasc, which was shared by Emca Eressea. A compiler that other developers want thousands of dollars for. This can already be fully considered a huge contribution to the development of the development community of our beloved great game Lineage 2.
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
Question
l2jkain
Hello I'm creating a custom drop for Assis 374, I'm a customer but no one helped me there
Well this code works perfectly until going to level 81 the dropes are all tripled does anyone help me?
# Select o item for drop all monster
# Example : Itemid,chance,min,max;Itemid,chance,min,max
DropSystemItems = 9210,80,2,4;9211,70,1,3;9212,60,2,5;9213,40,3,5;9214,30,1,3;9215,50,2,3;9216,20,2,4
4 answers to this question
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.
Note: Your post will require moderator approval before it will be visible.