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
I have a license lucera classic to sell for 80$
rebinding through deazer developer
bundled with a datapack is more profitable, more details in telegram
Hi all guys I just wanted to ask a question
when I write //Walk then the z y x coordinates with which procedure should I write them.
like for example z/17080 y157610 x-2638,because I tried to dots, commas, brackets
but it doesn't read the coordinates, I'm definitely writing them incorrectly
thank you very much in advance to all of you
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
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now