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.
How to disable Mana Potion in PvP&Siege
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Naonah
- Posts: 357
- Joined: Sun Apr 04, 2010 11:12 pm
Re: How to disable Mana Potion in PvP&Siege
if (player.isinsiege())
return;
something like that
return;
something like that
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
- lucky.it
- Posts: 20
- Joined: Fri May 08, 2009 11:06 am
Re: How to disable Mana Potion in PvP&Siege
In this file?
ManaPotion.java
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); }}
- Naonah
- Posts: 357
- Joined: Sun Apr 04, 2010 11:12 pm
Re: How to disable Mana Potion in PvP&Siege
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;
}
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: How to disable Mana Potion in PvP&Siege
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;
public static final int PI = 3.1415926535897932384626433832795;