Jump to content

Recommended Posts

Posted

NullPvPFlag.java

 

/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;


/**
*
* @Author Revenger
*
*/

public class NullPvPFlag implements IVoicedCommandHandler
{

  private static final String[] VOICED_COMMANDS = { "null_pvp_flag" };


public boolean useVoicedCommand(String command, L2PcInstance activeChar,String target)
{
    if (command.equalsIgnoreCase("null_pvp_flag"))
    {
     if (activeChar.getPvpFlag() != 0 )
     {
    	 activeChar.setPvpFlag(0);
     }
     else if (activeChar.isParalyzed() || activeChar.isRooted() || activeChar.isDead() 
    		 || activeChar.isAlikeDead() || activeChar.isConfused() || activeChar.isBetrayed()
    		 || activeChar.isFakeDeath() || activeChar.isFlying() || activeChar.isMounted()
    		 || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.inObserverMode()
    		 || activeChar.isInJail())
    		 
     {
    	 activeChar.sendMessage("You Cannot Use This Command Right Now!");
    	 return false;
     }
    }
    return true;
}

public String[] getVoicedCommandList()
{
    return VOICED_COMMANDS;
}

    }

 

then register it on the gameserver

 

import net.sf.l2j.gameserver.handler.voicedcommandhandlers.NullPvPFlag;

 

_voicedCommandHandler.registerVoicedCommandHandler(new NullPvPFlag());

Posted

yeah... its quite scammable... unless it takes some item and sets your pvp flag to 0 after ~5 secs...

 

BTW... i find this as more propper way

 

  if (activeChar.isParalyzed() || activeChar.isRooted() || activeChar.isDead()

    || activeChar.isAlikeDead() || activeChar.isConfused() || activeChar.isBetrayed()

    || activeChar.isFakeDeath() || activeChar.isFlying() || activeChar.isMounted()

    || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.inObserverMode()

    || activeChar.isInJail())

   

    {

    activeChar.sendMessage("You Cannot Use This Command Right Now!");

    return false;

    }

  else if (activeChar.getPvpFlag() != 0 )

    {

    activeChar.setPvpFlag(0);

    }

    }

Posted

well well well maybe Revenger soon can make bit bigger things?^^

my first share was..

enterworld.java

if (!activeChar.isHero())
{
activeChar.setHero();
}

lol :D

its a nice start though.

Posted

my first share was..

enterworld.java

if (!activeChar.isHero())
{
activeChar.setHero();
}

lol :D

its a nice start though.

 

my first share was all class subclass to all class :D

nobody born smart good thing that some ppl start to learn^^

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
Reply to this topic...

×   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

    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • Hi people, someone has to sharing a client for Lineage 2 Shinemaker?. I found a few but are not working very well. Thanks
    • Grab a proper launcher for Your server - update files whenever You need
    • Dear players, 19.04 at 06:00 server time, the Airin server will be updated to Chronicle 2. - The x2 updater will be disabled on April 18, 2025, at 23:59 and will become available again during the update. - Server rates will be increased to x2.25; - The siege of Innadril will take place on April 27 at 16:00 server time; - Bonus Start will begin after the restart! Characters created after April 16, 00:00 will receive rewards.   You can download the full client for Airin C2 from the following link.  Do not run the updater until tomorrow's update. 
  • Topics

×
×
  • Create New...