Jump to content

MayhemARG

Members
  • Posts

    4
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by MayhemARG

  1. Sup, yes it's possible, depends of the Pack you are using, wich one is it ?
  2. sup, added the code, works fine, but how do i add the whole world ? because i cant realize how to do that Fixed
  3. did you check or modify the client part?
  4. 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; } }
×
×
  • Create New...