How to disable Mana Potion in PvP&Siege

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
lucky.it
Posts: 20
Joined: Fri May 08, 2009 11:06 am

How to disable Mana Potion in PvP&Siege

Post by lucky.it »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 4422:
L2JDP Revision 7669:

Hi all,
in Freya release how to disable Mana Potions during PvP and Siege?

I find this old solution for Epilogue: https://www.l2jserver.com/forum/viewtop ... 10&start=0 but i don't find solution for Freya.

Thank in advanced.
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Re: How to disable Mana Potion in PvP&Siege

Post by Naonah »

if (player.isinsiege())
return;

something like that
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
User avatar
lucky.it
Posts: 20
Joined: Fri May 08, 2009 11:06 am

Re: How to disable Mana Potion in PvP&Siege

Post by lucky.it »

In this file?

ManaPotion.java

Code: Select all

package handlers.itemhandlers; import com.l2jserver.Config;import com.l2jserver.gameserver.model.L2ItemInstance;import com.l2jserver.gameserver.model.actor.L2Playable;import com.l2jserver.gameserver.network.SystemMessageId;import com.l2jserver.gameserver.network.serverpackets.SystemMessage; public class ManaPotion extends ItemSkills{    /**     *      * @see com.l2jserver.gameserver.handler.IItemHandler#useItem(com.l2jserver.gameserver.model.actor.L2Playable, com.l2jserver.gameserver.model.L2ItemInstance, boolean)     */    @Override    public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)    {        if (!Config.L2JMOD_ENABLE_MANA_POTIONS_SUPPORT)        {            playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));            return;        }        super.useItem(playable, item, forceUse);    }}
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Re: How to disable Mana Potion in PvP&Siege

Post by Naonah »

yes but check this player.isinsiege or activeChar.isinsiege in L2PcInstance, check also the method isinsiege() if I named this correctly
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: How to disable Mana Potion in PvP&Siege

Post by _DS_ »

LOL ?

Code: Select all

        <cond msgId="113" addName="1">                <not>                        <player SiegeZone="126" />                </not>        </cond> 
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Post Reply