Skip to content

Need Help With Plunder Effect

Featured Replies

Hello, I stuck in ertheya- underground server with skill's plunder effect "plunder" or what ever how you will call it:

/**
 * @author Sdw
 */
public final class Plunder extends AbstractEffect
{
	public Plunder(StatsSet params)
	{
	}
	
	@Override
	public boolean calcSuccess(L2Character effector, L2Character effected, Skill skill)
	{
		return Formulas.calcMagicSuccess(effector, effected, skill);
	}
	
	@Override
	public boolean isInstant()
	{
		return true;
	}
	
	@Override
	public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
	{
		if (!effector.isPlayer())
		{
			return;
		}
		else if (!effected.isMonster() || effected.isDead())
		{
			effector.sendPacket(SystemMessageId.INVALID_TARGET);
			return;
		}
		
		final L2MonsterInstance monster = (L2MonsterInstance) effected;
		final L2PcInstance player = effector.getActingPlayer();
		
		if (monster.isSpoiled())
		{
			effector.sendPacket(SystemMessageId.PLUNDER_SKILL_HAS_BEEN_ALREADY_USED_ON_THIS_TARGET);
			return;
		}
		
		monster.setSpoilerObjectId(effector.getObjectId());
		if (monster.isSweepActive())
		{
			final Collection<ItemHolder> items = monster.takeSweep();
			if (items != null)
			{
				for (ItemHolder sweepedItem : items)
				{
					final L2Party party = effector.getParty();
					if (party != null)
					{
						party.distributeItem(player, sweepedItem, true, monster);
					}
					else
					{
						player.addItem("Plunder", sweepedItem, effected, true);
					}
				}
			}
		}
		monster.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, effector);
	}
}

already effect I have does only damage, and when using not first-time on mob, writing that mob is already spoiled... but never seen any spoil.

 

few ppl gave idea try to change:

# This option, if enabled, will allow magic to fail, and if disabled magic damage will always succeed with a 100% chance.
# Default: True
MagicFailures = True

to False. - not helped, then tried to change calculation formula, offered by another person, as well didn't work:

      @Override
	public boolean calcSuccess(L2Character effector, L2Character effected, Skill skill)
	{
		return effected.isMonster() && Formulas.calcMagicSuccess(effector, effected, skill);
	}

anyone can help me to fix this skill, please? I just really don't have more minds whats can be wrong... I know that as Creator of that script told me that it's fucked up, and he fixed it but after he just ignored me, so help from him = 0

in formulas.java

calcMagicSuccess(....

u can see how calculate skill chance. try change skill power

in formulas.java

calcMagicSuccess(....

u can see how calculate skill chance. try change skill power

No.

  • Author

maybe and found, just mine javascript knowledge not enough to rewrite the script from one source to at all another...  it will take a bit time for me to infiltrate  it :)

isSweepActive is never true as sweep data is generated on mob death.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.