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
  On 3/17/2017 at 3:11 PM, nortim said:

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)
  On 3/17/2017 at 2:48 PM, Solomun said:

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)
  On 3/17/2017 at 2:49 PM, nortim said:

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
  On 3/17/2017 at 2:59 PM, tazerman2 said:

 

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
  On 3/17/2017 at 3:00 PM, tazerman2 said:

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
  On 3/17/2017 at 3:00 PM, tazerman2 said:

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
  On 3/17/2017 at 3:04 PM, nortim said:

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
  On 3/17/2017 at 3:05 PM, nortim said:

 

 
Could you tell me a baseline?

 

What FlagZone code are you using?

  • 0
Posted
  On 3/17/2017 at 3:06 PM, Solomun said:

What FlagZone code are you using?

 

  Reveal hidden contents

Guest
This topic is now closed to further replies.


×
×
  • Create New...