nortim Posted March 17, 2017 Posted March 17, 2017 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
0 tazerman2 Posted March 17, 2017 Posted March 17, 2017 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 nortim Posted March 17, 2017 Author Posted March 17, 2017 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 Reborn12 Posted March 17, 2017 Posted March 17, 2017 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 Solomun Posted March 17, 2017 Posted March 17, 2017 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 nortim Posted March 17, 2017 Author Posted March 17, 2017 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.
0 nortim Posted March 17, 2017 Author Posted March 17, 2017 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 Solomun Posted March 17, 2017 Posted March 17, 2017 The error persists .. how can I fix it? Sorry for the nudity, I'm performing now. 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 nortim Posted March 17, 2017 Author Posted March 17, 2017 I wanted to thank all of you, resolved my question very quickly and gave me support! Many thanks, maxcheaters is the best!
0 Solomun Posted March 17, 2017 Posted March 17, 2017 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 pirama Posted March 17, 2017 Posted March 17, 2017 (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 March 17, 2017 by pirama
0 nortim Posted March 17, 2017 Author Posted March 17, 2017 (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 March 17, 2017 by nortim
Question
nortim
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
27 answers to this question
Recommended Posts