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.
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
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank 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
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.