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


maybe now is better with the solomum code

 

in heal.java

 

final int[] supporters =

{

15,

16,

29,

30,

42,

43,

97,

105,

112,

115,

136,

116

}; // support classes ID's

for (int act : supporters)

{

if (activeChar.getActingPlayer().getClassId().getId() == act && ((L2PcInstance) target).isInsideZone(123123))

{

activeChar.getActingPlayer().sendMessage("You can't heal in this zone..");

continue;

}

}

  • 0
Posted
maybe now is better with the solomum code

in heal.java

			final int[] supporters =
			{
				15,
				16,
				29,
				30,
				42,
				43,
				97,
				105,
				112,
				115,
				136,
				116
			}; // support classes ID's
			for (int act : supporters)
			{
				if (activeChar.getActingPlayer().getClassId().getId() == act && ((L2PcInstance) target).isInsideZone(123123))
				{
					activeChar.getActingPlayer().sendMessage("You can't heal in this zone..");
					continue;
				}
			}

Where do I put it so they do not get into certain arenas?

  • 0
Posted

Where do I put it so they do not get into certain arenas?

just in the code you added change _player to  ((L2PcInstance)character)

  • 0
Posted

Where do I put it so they do not get into certain arenas?

 

I wouldn't suggest tazerman's code. It is only activated when a player casts a heal. In case a player dont cast a heal, he can stay in zone and use cleanse, recharge and stuff like this. I think my way is long way better.

  • 0
Posted

 

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

I wouldn't suggest tazerman's code. It is only activated when a player casts a heal. In case a player dont cast a heal, he can stay in zone and use cleanse, recharge and stuff like this. I think my way is long way better.

 

+}

 

The error persists .. how can I fix it? Sorry for the nudity, I'm performing now.2chb9ub.png

  • 0
Posted

just in the code you added change _player to  ((L2PcInstance)character)

would it be this? 

 

     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

The error persists .. how can I fix it? Sorry for the nudity, I'm performing now.2chb9ub.png

I failed again, lol, cant you just fix it by yourself?

 

replace:

_player = (L2PcInstance)character;

 

with:

L2PcInstance _player = (L2PcInstance) character;

 

Sorry for this, i was not concentrated, but you could fix it easy by yourself.

  • 0
Posted

I wanted to thank all of you, resolved my question very quickly and gave me support! Many thanks, maxcheaters is the best!

No problem, we are glad to help you! You can ask our help whenever you want. Also feel free to mark my answer as a solution to this thread so other members can find it too :)

  • 0
Posted (edited)

 

would it be this? 

 

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

 

 

I failed again, lol, cant you just fix it by yourself?

 

replace:

_player = (L2PcInstance)character;

 

with:

L2PcInstance _player = (L2PcInstance) character;

 

Sorry for this, i was not concentrated, but you could fix it easy by yourself.

i think you fail again :)

 

you need to add return; or else for all other

Edited by pirama
  • 0
Posted (edited)

No problem, we are glad to help you! You can ask our help whenever you want. Also feel free to mark my answer as a solution to this thread so other members can find it too :)

 

Ready buddy! Thank you very much! I am very happy. I added the mod and it was certim in the areas NPoly and Cuboid, but in the Cylinder he buga and the char goes to the top of the city .. would like to make me pagans temple like NPoly? So I can edit the respawns without bugar the char when I get back to the city ..?

Edited by nortim
Guest
This topic is now closed to further replies.


×
×
  • Create New...