Skip to content

[help] spoil message

Featured Replies

Hi, i have been trying to change spoil message.. That if spoil success,

the message will be written in PARTY.

But i still have one eror:

cannot find symbol: variable TARGET

so the code is:

            {

                spoil = Formulas.getInstance().calcMagicSuccess(activeChar, (L2Character)element, skill);

               

                if (spoil)

                {

                    target.setSpoil(true);

                    target.setIsSpoiledBy(activeChar.getObjectId());

activeChar.sendPacket(new SystemMessage(SystemMessageId.SPOIL_SUCCESS));

L2Party playerParty = activeChar.getParty();

CreatureSay cs = new CreatureSay(0, Say2.TARGET, activeChar.getName(), target.getName()+" spoiled successfully");

if (activeChar.isInParty())

{

for (L2PcInstance player : playerParty.getPartyMembers())

{

player.sendPacket(cs);

}

}

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.