Jump to content
  • 0

Block Bs In Flagzone


nortim

Question

Recommended Posts

  • 0

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);
+	}
+}
Link to comment
Share on other sites

  • 0

What the "bs" standing for?

 

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

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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;
}
Link to comment
Share on other sites

  • 0

 

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?

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

OMG! THX , YOU IS GOOOD !

Do I add these codes in flagzone.java?

Do I add these codes in flagzone.java?

 

Yes...onEnter method.

Link to comment
Share on other sites

  • 0

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;
}
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you. BREAK UP A RELATIONSHIP The perfect service to break up a relationship you don’t think legitimate. Your lover has gone with someone else Don’t hesitate to break them up as this ritual and prayer is very powerful and will Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you.
    • Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you. BREAK UP A RELATIONSHIP The perfect service to break up a relationship you don’t think legitimate. Your lover has gone with someone else Don’t hesitate to break them up as this ritual and prayer is very powerful and will Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you.
    • Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you. BREAK UP A RELATIONSHIP The perfect service to break up a relationship you don’t think legitimate. Your lover has gone with someone else Don’t hesitate to break them up as this ritual and prayer is very powerful and will Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you.
    • Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you. BREAK UP A RELATIONSHIP The perfect service to break up a relationship you don’t think legitimate. Your lover has gone with someone else Don’t hesitate to break them up as this ritual and prayer is very powerful and will Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you.
    • Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you. BREAK UP A RELATIONSHIP The perfect service to break up a relationship you don’t think legitimate. Your lover has gone with someone else Don’t hesitate to break them up as this ritual and prayer is very powerful and will Psychic Readings | Astrology | Love Spells | Black Magic spells | Witchcraft Spells | Spell Caster | Voodoo spells | Marriage spells | Divorce spells | Attraction spells | Bring back lost lover spells REUNITE WITH AN EX LOVER IN 72 HOURS If your lover is gone, don’t be desperate anymore! You are a few clicks away from a prompt resolution of your problem: We will our spiritual powers to bring him/her back Let us show you our method with zero chances of rejection. Don’t waste your precious time; get your lover back NOW! MAKE HIM/HER LOVE ME Don’t wait for the deluge and make him or her love you now. This service will create a great alchemy between this person and you. In just a few weeks, you can make the person you dream of falling in love with you. We recommend you to combine this service with a Marriage ritual if you want this person to commit you.
  • Topics

×
×
  • Create New...