Jump to content
  • 0

[HELP] Mana Potions NOT-USABLE on pk


KriminalMind

Question

9 answers to this question

Recommended Posts

  • 0

game\data\scripts\handlers\itemhandlers\ManaPotion.java

on

@Override
public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
{

 

insert:

if(((L2PcInstance) playable).getKarma()!=0)
{
playable.sendPacket(SystemMessageId.NOTHING_HAPPENED);
		return;
}

Link to comment
Share on other sites

  • 0

Is this right?

 

package handlers.itemhandlers;

 

import l2.gp.Config;

import l2.gp.gameserver.model.actor.L2Playable;

import l2.gp.gameserver.model.items.instance.L2ItemInstance;

import l2.gp.gameserver.network.SystemMessageId;

 

public class ManaPotion extends ItemSkills

{

/**

*

* @see l2.gp.gameserver.handler.IItemHandler#useItem(l2.gp.gameserver.model.actor.L2Playable, l2.gp.gameserver.model.items.instance.L2ItemInstance, boolean)

*/

@Override

public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)

{

 

                if (((L2PcInstance) playable).getKarmaO!=0)

                {

                        playable.sendPacket(SystemMessageId.NOTHING_HAPPENED);

                        return;

                }

 

if (!Config.L2JMOD_ENABLE_MANA_POTIONS_SUPPORT)

{

playable.sendPacket(SystemMessageId.NOTHING_HAPPENED);

return;

}

super.useItem(playable, item, forceUse);

}

}

Link to comment
Share on other sites

  • 0

should be... anyway... why do u ask?

are u getting any error on eclipse? did u test it?...

I think instead of asking if it's ok... you can test it... it's faster

Link to comment
Share on other sites

  • 0

Loading Server Scripts
----------
1. ERROR in "path"/game/data/scripts/handlers/itemhandlers/ManaPotion.java (at line 32)
if (((L2PcInstance) playable).getKarmaO!=0)
             ^^^^^^^^^^^^^^^^^^^^^^^
L2PcInstance cannot be resolved to a type

1. ERROR in "path"/game/data/scripts/handlers/itemhandlers/ManaPotion.java (at line 32)
if (((L2PcInstance) playable).getKarmaO!=0)
             ^^^^^^^^^^^^^^
L2PcInstance cannot be resolved to a type
----------

 

I'm sorry, this is the error!

Link to comment
Share on other sites

  • 0

Did you try to import L2PcInstance?...

Sometimes, there is just no hope you know.

 

Bip - bip - biiiiiiiiiiiiiiiiiiiiiii...

"Doctor, we lost him."

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...