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.



  • Posts

    • totally agree, the problem started with professionals who made easy to open a server, specially interlude has been abused unstoppably since you can open a server with few clicks now days making fewer players for many servers, while back in time when "compile" was a secret and opening a server was going max players but true things are changing and this has become a job but dont lie everyone knows what is going on, lying is showing desperation, better go and work. i've worked with lots of people with kids that invest huge amounts of money into this and fail while they needed the money its an addiction.
    • well,we all know that everyone is doing it for money. And it's acceptable since you put much more effort than the usual admins. If you're proffesional on l2 servers,i don't find a reason to not see it as a job. Ofc it's job,but all jobs has their own prides. I'll talk about me,i'm a guy that working 10 +/- hours per day. I have 2-3 free hours on my daily activity and sometimes i enjoy playing Lineage because nostalgia hits me everyday. If you are many years on scene,u'll understand that lineage will never be the same like old days. Days that we was gathering at internet cafes,and the battle was daily. Anyway, some people perfer to pay big clans and provide them black market with special prices and benefits that a casual player wont have. Also big clans means big wars,so server will have population even if you have zero quality. And there is some projects that wont pay those d1ckheads,so they wont join them and project need to find other ways to increase the population. So,i'm a player that i'll donate 20-40-50 euros on every server i play,and usually i'm getting "scammed" since they re-open their server every 2 months. And the problem is that,i personally don't mind to donate few money every 2 months for my joy,but the majority of owners has zero knowledge about L2 gaming. That's why they can't fix a sh1t,and when the problems pile up,they slowly close the server and starting advertising for another one. Actually,on high rate scene mostly,is the same guy that doing it everytime. He opens his project for 1-2 months,he close it and before he shut down the server,he has already started the advertising on his next server with different name. It's just crazy and that part shouldn't be acceptable. So yes,i perfer to support a project with honest admin team,and somewhere they have the knowledge to implent things. Business is business,but at least as community,we should enjoy our game that we love, cheers. 
    • thanks for sharing !! any guide to install this? it would be great!!
  • Topics

×
×
  • Create New...