Jump to content

Question

Posted

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

8 answers to this question

Recommended Posts

  • 0
Posted

in formulas.java

calcMagicSuccess(....

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

No.

  • 0
Posted

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 :)

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock