Jump to content
  • 0

Block Bs In Flagzone


Question

Posted

Hellow guys! I'am from brasil, but sorry my very english bad ..

I need code to block bs in flagzone, can someone help me?

::)  ::)  ::)  ::)  :okey:

I need a code to block the bs in flagzone

Recommended Posts

  • 0
Posted

I  have erro:

sm61c4.png

 

Sorry i forget about that... Do it like

+if (character instanceof L2PcInstance)
+{
+	_player = (L2PcInstance)character;
+	final int[] supporters = {15,16,29,30,42,43,97,105,112,115,136,116}; // support classes ID's
+	for (int act : supporters)
+	if  (_player.getActiveClass() == act)
+	{
+		_player.sendMessage("You can't enter in flag zone with a support class.");
+		_player.teleToLocation(83417 + Rnd.get(101) - 50, 149028 + Rnd.get(101) - 50, -3408);
+	}
+}
  • 0
Posted

What the "bs" standing for?

 

The only that makes sense, is backstab...but wtf, you dont want backstab in your flag zone? :P

  • 0
Posted (edited)

What the "bs" standing for?

 

The only that makes sense, is backstab...but wtf, you dont want backstab in your flag zone? :P

Sorry man.. Bs = Bishop/Cardinal .. 

 

You can help me?

Edited by nortim
  • 0
Posted (edited)

Sorry man.. Bs = Bishop/Cardinal .. 

You could make the following:

 

onEnter method:

+               final int[] supporters = {15,16,29,30,42,43,97,105,112,115,136,116}; // support classes ID's
+        	for (int act : supporters)
+            	if  (_player.getActiveClass() == act)
+            	{
+            		_player.sendMessage("You can't enter in flag zone with a support class.");
+            		_player.teleToLocation(83417 + Rnd.get(101) - 50, 149028 + Rnd.get(101) - 50, -3408);
+            	}

supporters array has all supporters id (bishop,cardinal,evas saint etc etc). If you want to restrict only bishop keep id 15 and 97.

 

Edit: Whenever a supporter enters the zone, he gets teleport to Giran (with some random offset, which you can remove).

Edited by Solomun
  • 0
Posted

in heal.java

change id with your zone id
and here use class bishop
player.getClassId().getId() == 12

if(activeChar.isInsideZone(12345) && player.getClassId().getId() == 12)
{
	activeChar.getActingPlayer().sendMessage("You can't heal in this zone..");
	continue;
}
  • 0
Posted

 

in heal.java

change id with your zone id
and here use class bishop
player.getClassId().getId() == 12

if(activeChar.isInsideZone(12345) && player.getClassId().getId() == 12)
{
	activeChar.getActingPlayer().sendMessage("You can't heal in this zone..");
	continue;
}

 

This way, he could use cleanse and such skills right?

  • 0
Posted

is bad can't enter to pvp zone if bishop have augment skill and need play pvp ? how to play ?

He said to block bishop, not his heal.

 

This restricted bishop could get a subclass and play.

  • 0
Posted

is bad can't enter to pvp zone if bishop have augment skill and need play pvp ? how to play ?

with buffed players bp have no chance

  • 0
Posted

OMG! THX , YOU IS GOOOD !

Do I add these codes in flagzone.java?

Do I add these codes in flagzone.java?

 

Yes...onEnter method.

  • 0
Posted

What FlagZone code are you using?

 

package net.l2jpx.gameserver.model.zone.type;

 
import java.util.List;
 
import org.w3c.dom.Node;
 
import javolution.util.FastList;
 
import net.l2jpx.Config;
import net.l2jpx.gameserver.datatables.SkillTable;
import net.l2jpx.gameserver.model.L2Character;
import net.l2jpx.gameserver.model.L2Skill;
import net.l2jpx.gameserver.model.actor.instance.L2PcInstance;
import net.l2jpx.gameserver.model.zone.L2ZoneType;
import net.l2jpx.gameserver.network.serverpackets.ActionFailed;
import net.l2jpx.gameserver.network.serverpackets.NpcHtmlMessage;
import net.l2jpx.util.random.Rnd;
 
public class L2FlagZone extends L2ZoneType
{
private String _townName;
private int _townId;
private int _redirectTownId;
private int _taxById;
private boolean _FlagZone;
private FastList<int[]> _spawnLoc;
 
  public L2FlagZone(int id)
  {
    super(id);
 
_taxById = 0;
_spawnLoc = new FastList<>();
 
// Default to Giran
_redirectTownId = 1;
 
// Default peace zone
_FlagZone = false;
  }
 
@Override
public void setParameter(String name, String value)
{
if(name.equals("name"))
{
_townName = value;
}
else if(name.equals("townId"))
{
_townId = Integer.parseInt(value);
}
else if(name.equals("redirectTownId"))
{
_redirectTownId = Integer.parseInt(value);
}
else if(name.equals("taxById"))
{
_taxById = Integer.parseInt(value);
}
else if(name.equals("PvpZone"))
{
_FlagZone = Boolean.parseBoolean(value);
}
else
{
super.setParameter(name, value);
}
}
 
@Override
public void setSpawnLocs(Node node)
{
int ai[] = new int[3];
 
Node node1 = node.getAttributes().getNamedItem("X");
 
if(node1 != null)
{
ai[0] = Integer.parseInt(node1.getNodeValue());
}
 
node1 = node.getAttributes().getNamedItem("Y");
 
if(node1 != null)
{
ai[1] = Integer.parseInt(node1.getNodeValue());
}
 
node1 = node.getAttributes().getNamedItem("Z");
 
if(node1 != null)
{
ai[2] = Integer.parseInt(node1.getNodeValue());
}
_spawnLoc.add(ai);
}
 
  L2Skill noblesse = SkillTable.getInstance().getInfo(1323, 1);
  
  @Override
  protected void onEnter(L2Character character)
  {
    if ((character instanceof L2PcInstance))
    {
    if(character.getLevel() >= Config.ALLOW_FLAG_ZONE_MINILVL && character.getLevel() <= Config.ALLOW_FLAG_ZONE_MAXLVL)
    {
    ((L2PcInstance)character).teleToLocation(Config.ALLOW_FLAGl_ZONE_X, Config.ALLOW_FLAGl_ZONE_Y, Config.ALLOW_FLAGl_ZONE_Z);
    showHtmlLevel((L2PcInstance)character);
    return;
    }
 
      if (Config.RECEIVE_NOBLESSE)
      {
        this.noblesse.getEffects(character, character);
      }
      ((L2PcInstance)character).stopPvPFlag();
      ((L2PcInstance)character).updatePvPFlag(1);
      if (Config.MSG_ON_ENTER_FLAG)
      {
        ((L2PcInstance)character).sendMessage("[Wizard Zone]: " + Config.MESSAGE_ON_ENTER + ".");
      }
   
    
if (Config.ALLOW_FLAG_ZONE_TITLE)
{
  ((L2PcInstance)character).getAppearance().setTitleColor(Config.FLAG_ZONE_TITLE_COLOR);
}
   
if (Config.ALLOW_FLAG_ZONE_NAME)
{
  ((L2PcInstance)character).getAppearance().setNameColor(Config.FLAG_ZONE_NAME_COLOR);
}
 
    if(!_FlagZone && Config.ZONE_TOWN != 2)
{
character.setInsideZone(L2Character.ZONE_FLAGZONE, true);
}
    }
  }
 
  @Override
  protected void onExit(L2Character character)
  {
    if ((character instanceof L2PcInstance))
    {
      ((L2PcInstance)character).updatePvPFlag(0);
      if (Config.MSG_ON_ENTER_FLAG) {
        ((L2PcInstance)character).sendMessage("[Wizard Zone]: " + Config.MESSAGE_ON_EXIT + ".");
      }
    
if (Config.ALLOW_FLAG_ZONE_TITLE)
{
       ((L2PcInstance)character).getAppearance().setTitleColor(Config.NAME_COLOR);
}
if (Config.ALLOW_FLAG_ZONE_NAME)
{
       ((L2PcInstance)character).getAppearance().setNameColor(Config.TITLE_COLOR);
}
 
    if(!_FlagZone)
{
character.setInsideZone(L2Character.ZONE_FLAGZONE, false);
}
    }
  }
  
  @Override
  public void onDieInside(L2Character character) {}
  
  @Override
  public void onReviveInside(L2Character character)
  {
    onEnter(character);
    if (Config.RECEIVE_NOBLESSE)
    {
      this.noblesse.getEffects(character, character);
    }
  }
 
/**
* Returns this town zones name
* @return
*/
@Deprecated
public String getName()
{
return _townName;
}
 
/**
* Returns this zones town id (if any)
* @return
*/
public int getTownId()
{
return _townId;
}
 
/**
* Gets the id for this town zones redir town
* @return
*/
@Deprecated
public int getRedirectTownId()
{
return _redirectTownId;
}
 
/**
* Returns this zones spawn location
* @return
*/
public final int[] getSpawnLoc()
{
int ai[] = new int[3];
 
ai = _spawnLoc.get(Rnd.get(_spawnLoc.size()));
 
return ai;
}
 
private void showHtmlLevel(L2PcInstance activeChar)
{
 NpcHtmlMessage msg = new NpcHtmlMessage(5);
 msg.setFile("data/html/mods/level.htm");
  
 activeChar.sendPacket(msg);
 activeChar.sendPacket(new ActionFailed());
}
 
/**
* Returns this town zones castle id
* @return
*/
public final int getTaxById()
{
return _taxById;
}
}

Guest
This topic is now closed to further replies.


  • Posts

    • its not imagination we skip that on this topic my offer still stands i am accepting a house Mr. @ERROR501 for more information please contact me
    • Sell ready interlude server files, with all popular features and tested, stable source + fully functional premium geodata for free.   Features include: Events: DM CTF TVT LM Dressme system Custom Buffer GM Shop Custom community board Donation manager  Auto Farm   Album: sell c6 — ImgBB   Test Server online: Patch link: https://drive.google.com/file/d/1mvEbv9XESsvfWwc638xFyyzyESeE2U95/view?usp=drive_link Auto acc create and auto admin   Price: 300$. Discord: l2retro
    • Faltan demasiados archivos,  y lógicas en clases claves como L2pcInstance, entre otras. si bien muchas cosas están y el flujo es valorable.  Gracias por tu esfuerzo es bastante... pero realmente no esta completo el código, falta que subas todas las modificaciones en clases colaterales... podrías intentar subir un diff de todo el mod  completo de tu pack y bueno ahí si que cada uno adapte... pero faltan muchas cosas, dudo que haya gente que lo haya echo funcionar con esto... 
    • I know people who have fully bypassed and reversed AAC. One day, they might even release the full source code, but for now, they’re still making money off it. I won’t name anyone, but it’s clear that there aren’t any truly solid anticheats for Lineage2. As I’ve said before, kernel level anticheats are the only real solution. Anything that runs as Internal and injects gets flagged, and your account ends up getting kicked or banned. That’s just how most games handle it nowadays. To TL;DR the whole thing cheating will always exist because there are people out there smart enough to bypass any protection and run private cheats. Public cheats are always detected eventually, so I don’t see any point in buying AAC, especially when they claim it blocks adr, which simply isn’t true.
    • 🌐 Website: https://l2adonis.com 📅 GRAND OPENING: July 18, 2025 – 20:00 (UTC+2) 💬 Discord: https://discord.com/invite/tZBj8JxAwx 🚫 No auto-farm • No auto-macro • No pay-to-win • No custom   Some Basic Info's (More detalied info's on website)  EXP/SP: x25  Adena: x15  Drop: x15  Spoil: x15  Seal Stones: x15  Raid Boss Drop: x10  Epic Boss Drop: x1  Manor: x10  Safe Enchant: +4  Max Enchant: +16  Normal Scroll Chance: 50%  Blessed Scroll Chance: 66% (If enchant fail item remain +4)  Buff Slots (30+4 extra with Divine Inspiration)  Dances/Songs Slots 14  Auto-learn skills  ⚔️ Real PvP • Real Progression • Retail-like experience JOIN NOW and relive the real L2 experience!
  • Topics

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