iAlreadyExist Posted June 29, 2016 Posted June 29, 2016 Hey guys can someone good man tell me how to make all npc on acis not attackable by players?
0 SweeTs Posted July 1, 2016 Posted July 1, 2016 (edited) Nop.. You simply have to add Overriden isAttackable() to L2NpcInstance :P If you want to block hitting inside town, then @Override public boolean isAttackable() { if (isInsideZone(ZoneId.TOWN)) return false; return true; } Obviously, Ctrl + Shift + O to fix imports. Edited July 1, 2016 by SweeTs
0 ElTyto Posted July 1, 2016 Posted July 1, 2016 its usually implemented in configs(most server packs atleast), could tell you more if i wouldnt have stopped on my project
0 iAlreadyExist Posted July 1, 2016 Author Posted July 1, 2016 its usually implemented in configs(most server packs atleast), could tell you more if i wouldnt have stopped on my project im using l2j acis and its not have it
0 Tessa Posted July 1, 2016 Posted July 1, 2016 Check in L2Character.java the doAttack() method. If the target is of type L2NpcInstance, send ActionFailed packet and return.
0 AbsolutePower Posted July 1, 2016 Posted July 1, 2016 (edited) Nop.. You simply have to add Overriden isAttackable() to L2NpcInstance :P If you want to block hitting inside town, then @Override public boolean isAttackable() { if (isInsideZone(ZoneId.TOWN)) return false; return true; } Obviously, Ctrl + Shift + O to fix imports. for town or for every npc everywhere? :P i mean what he is asking? Edited July 1, 2016 by AbSoLuTePoWeR
0 SweeTs Posted July 1, 2016 Posted July 1, 2016 Who knows. Blocking everywhere is just stupid and doesn't make any sense, that's why I mentioned / provided town hit block :D
0 AbsolutePower Posted July 1, 2016 Posted July 1, 2016 (edited) Who knows. Blocking everywhere is just stupid and doesn't make any sense, that's why I mentioned / provided town hit block :D in normal situation (normal char) can't hit npc inside towns(at least in acis -->doAttack if (isInsidePeaceZone(this, target)))..... so he probably want it for "outside". ;P so if your code is working you should make it : @Override public boolean isAttackable() { return false; } Edited July 1, 2016 by AbSoLuTePoWeR
0 Tessa Posted July 1, 2016 Posted July 1, 2016 Nop.. You simply have to add Overriden isAttackable() to L2NpcInstance :P If you want to block hitting inside town, then @Override public boolean isAttackable() { if (isInsideZone(ZoneId.TOWN)) return false; return true; } Obviously, Ctrl + Shift + O to fix imports. Lol, ok. :lol: Where is it used actually? I deleted eclipse, so I can't check... :D
0 SweeTs Posted July 1, 2016 Posted July 1, 2016 (edited) in normal situation (normal char) can't hit npc inside towns(at least in acis -->doAttackSay what, you can normally hit em. If he simply make it false, all npc' will be untouchable :D Edited July 1, 2016 by SweeTs
Question
iAlreadyExist
Hey guys can someone good man tell me how to make all npc on acis not attackable by players?
11 answers to this question
Recommended Posts