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.


  • Posts

    • MoMoProxy Offers $850 for 1TB Plan. anyone interested in can view details as follow: https://momoproxy.com/residential-proxies
    • Yes there are many problems. Im trying to fix there slowly, cause i i put already a lot of work in this files. I think it will not be easy to move the project to other builds
    • You probably wanted to write l2jmobius. I would recommend that you change the build because it has a lot of problems with the movement of npcs and players. Even if you find bots you will have to correct the movement or the bots will get stuck, fly, teleport
    • Complete Server Pack + Source Files: C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 100EUR --------------------------------------------------------------------------------------------------------------------------------------------- C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 150EUR -------------------------------------------------------------------------------------------------------------------------------------------- C6 Interlude: P756 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 150EUR The same as C4 but in C6 Client  ----------------------------------------------------------------------------------------------------------------------------------------------   C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 150EUR   https://imgur.com/a/pts-l2gold-interlude-p746-9kB3oA9#MbP2aJh -------------------------------------------------------------------------------------------------------------------------------------------------   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 350EUR   https://imgur.com/a/pts-l2off-p110-classic-interlude-athena-x45-Z2kZxuv#YlZU9hF -------------------------------------------------------------------------------------------------------------------------------------------------   DISCORD - MMOPROMOOO TELEGRAM - MMOPROMO 
    • Wts adena scryde x50 Baium 12 Valakas 12 good price Top weapons +16
  • Topics

×
×
  • Create New...