Jump to content
  • 0

[HELP] Mana Potions NOT-USABLE on pk


Question

9 answers to this question

Recommended Posts

  • 0
Posted

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;
}

  • 0
Posted

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

}

}

  • 0
Posted

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

  • 0
Posted

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!

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