Иконка ресурса

[aCis] [MOD] Only Adena Drop 2026-07-10

Нет прав для скачивания
Хроники
  1. Interlude
[MOD] Only Adena Drop (Configurable) for L2jAcis
Description:
This mod allows you to disable all standard item drops (materials, equipment, enchants, etc.) from all regular monsters in the game, keeping only Adena drops.

The system is designed to be intelligent: it automatically ignores Raid Bosses and Grand Bosses, ensuring the server's epic content remains unaffected. Additionally, it features a configuration-based "Whitelist" allowing you to add custom monster IDs (such as event mobs or custom mobs) that should continue dropping items normally.
Features:
  • Full Control: Enable or disable via the .properties file.
  • Rate Fidelity: The mod respects RATE_DROP_ADENA and the value range (min/max) defined in the mob's XML.
  • AutoLoot Compatible: Detects if AutoLoot is active and sends Adena directly to the inventory or the ground.
  • Safety: Native protection to ensure Raid Bosses and their Minions are not affected.
  • Whitelist: Allows specific IDs to be excluded from the "Adena Only" rule.


1. Core Changes (Java)
Config.java

public static boolean ONLY_ADENA_DROP;
public static Set<Integer> ADENA_EXCLUDED_SET = new HashSet<>();

// No carregamento (load):
ONLY_ADENA_DROP = l2jModSettings.getProperty("OnlyAdenaDrop", false);
String[] excludedIds = l2jModSettings.getProperty("AdenaDropExcludedIds", "").split(",");
for (String id : excludedIds) {
if (!id.trim().isEmpty())
ADENA_EXCLUDED_SET.add(Integer.parseInt(id.trim()));
}

L2MonsterInstance.java
Go to the end of the code, before the last `}`, and add...


@Override
public void doItemDrop(NpcTemplate template, L2Character lastAttacker)
{
if (Config.ONLY_ADENA_DROP && !Config.ADENA_EXCLUDED_SET.contains(template.getNpcId()))
{
if (!isRaid() && !isRaidMinion())
{
final L2PcInstance player = lastAttacker.getActingPlayer();
if (player == null)
return;

for (DropCategory cat : template.getDropData())
{
for (DropData drop : cat.getAllDrops())
{
if (drop.getItemId() == 57) // Adena
{
if (Rnd.get(1000000) <= drop.getChance())
{
int count = (int) (Rnd.get(drop.getMinDrop(), drop.getMaxDrop()) * Config.RATE_DROP_ADENA);
if (count < 1) count = 1;

if (Config.AUTO_LOOT)
player.addAdena("Drop", count, this, true);
else
dropItem(player, drop.getItemId(), count);
}
}
}
}
return;
}
}
super.doItemDrop(template, lastAttacker);
}


2. Configuration (.properties)
Add these lines to your l2jmod.properties or custom.properties file:


# -------------------------------------------------------------
# Custom Drop System - Adena Only
# -------------------------------------------------------------
# If True, normal monsters will drop only Adena.
# Items such as materials and equipment will be ignored.
OnlyAdenaDrop = True

# Monster IDs that should NOT be subject to the rule above.
# Use for custom mobs, event mobs, or special farming mobs.
# Example: 50001,60002,70005
AdenaDropExcludedIds =


Credits: CaioxD

Base Revision: L2jAcis (Adaptable to other bases)

Advantage: Ideal for PvP-farming servers where the focus is on obtaining Adena to purchase items from custom shops, preventing the ground from becoming cluttered with mob trash (clean drops).
Назад
Сверху Снизу