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!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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