barao45 Posted April 24, 2023 Posted April 24, 2023 Hi People! Does anyone know how I can create an object that increases the percentage of the character's drop?. I'm using L2jSunrise. Quote
0 Zake Posted April 25, 2023 Posted April 25, 2023 On 4/24/2023 at 10:52 PM, barao45 said: Hi People! Does anyone know how I can create an object that increases the percentage of the character's drop?. I'm using L2jSunrise. Expand Drop chance or quantity? Also what kind of object? java object? ingame object like item/skill? Quote
0 barao45 Posted April 25, 2023 Author Posted April 25, 2023 Yes i wanna to increment chance drop of all items. like materials, weapons. etc. Quote
0 Kyboi Posted May 17, 2023 Posted May 17, 2023 I made a stat that increased Drop chance/amount, you can add that stat to items, skills, etc. Post your drop related files (all multiplierstrategies.java) to see if its compatible with the one I made (I use l2jmaster files) Quote
0 MayhemARG Posted May 19, 2023 Posted May 19, 2023 Not a working code, but maybe can help you out to start. public class RuneOfDrop extends ItemInstance { private static final int RUNE_OF_DROP_ITEM_ID = 12345; // Replace with your desired item ID private static final int DROP_BONUS_PERCENTAGE = 25; // Increase drop by 25% public RuneOfDrop(int objectId, Item template) { super(objectId, template); } @Override public void onEquip(Player player) { applyDropBonus(player); } @Override public void onUnequip(Player player) { removeDropBonus(player); } private void applyDropBonus(Player player) { double dropBonus = DROP_BONUS_PERCENTAGE / 100.0; player.getStat().mergeAdd(ModifierType.DROP, dropBonus); } private void removeDropBonus(Player player) { double dropBonus = DROP_BONUS_PERCENTAGE / 100.0; player.getStat().mergeRemove(ModifierType.DROP, dropBonus); } @Override public void onLogout(Player player) { if (!player.getInventory().hasItemId(RUNE_OF_DROP_ITEM_ID)) { removeDropBonus(player); } } public static Item createInstance(int objectId, int count) { Item template = new Item(RUNE_OF_DROP_ITEM_ID); template.setName("Rune of Drop"); // Replace with your desired name template.setType2(ItemType.TYPE2_OTHER); // Adjust the item type as needed template.setEtcItemType(EtcItemType.RUNE); // Adjust the item type as needed template.setWeight(10); // Set the desired weight template.setReuseDelay(0); // Set the desired reuse delay template.setCrystalType(CrystalGrade.C); // Adjust the crystal grade as needed template.setBodyPart(0); // Set the desired body part // Set the weapon type if applicable, or remove the line if not a weapon template.setWeaponType(WeaponType.SWORD); template.setMaterial(ItemMaterialType.MAGIC; // Adjust the material type as needed ItemInstance instance = new RuneOfDrop(objectId, template); instance.setCount(count); // Set the desired count return instance; } } Quote
0 Titanic8432 Posted June 10, 2023 Posted June 10, 2023 I am also looking for this feature of the game. Glad you have the same question as me. donkey kong Quote
Question
barao45
Hi People! Does anyone know how I can create an object that increases the percentage of the character's drop?. I'm using L2jSunrise.
6 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.