FeeLings Posted April 26, 2022 Posted April 26, 2022 When a Player attack me, the Character auto target it. Can it be disabled so it doesn't auto target it? What i want is it to work like with skills. When you use skills you don't auto target player, but if it is default physical attack you do. Is it a way to change it? Quote
0 Amenadiel Posted April 26, 2022 Posted April 26, 2022 if is java it should be either l2character or L2AttackableAI not sure if its l2off then its via the extender Quote
0 FeeLings Posted April 26, 2022 Author Posted April 26, 2022 41 minutes ago, Amenadiel said: if is java it should be either l2character or L2AttackableAI not sure if its l2off then its via the extender its java aCis What exactly i need to change or add? I tried to make some changes with setTarget but it doesn't work. Quote
0 Amenadiel Posted April 26, 2022 Posted April 26, 2022 Its not set, propably is get but give me contact details i can have a look Quote
0 Zake Posted April 27, 2022 Posted April 27, 2022 On 4/26/2022 at 6:41 PM, Amenadiel said: Its not set, propably is get but give me contact details i can have a look https://prnt.sc/_yUpIT8f69eP Quote
0 GsL Posted May 1, 2022 Posted May 1, 2022 I m interested also for this .. any idea ? I m looking for l2jmobius.. Any idea where exactly search? It's possible to be this by client side ? Quote
0 Zake Posted May 5, 2022 Posted May 5, 2022 On 5/1/2022 at 6:44 PM, GsL said: It's possible to be this by client side ? Yes Quote
0 arm4729 Posted May 5, 2022 Posted May 5, 2022 (edited) I'm not sure i did understand what you want to do , but i guess when you use a skill on a player and that player has no target , you want that player who is attacked to get and set the target to the player who is attacking him? search in creature for private void beginCast(L2Skill skill, boolean simultaneously, Creature target, WorldObject[] targets) ---- ---- if (this instanceof Playable) { // Send a system message USE_S1 to the L2Character if (this instanceof Player && skill.getId() != 1312) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.USE_S1); sm.addSkillName(skill); sendPacket(sm); } + if(this instanceof Player && this.getActingPlayer().getTarget() instanceof Player && this.getActingPlayer().getTarget().getActingPlayer().getTarget() == null) + this.getActingPlayer().getTarget().getActingPlayer().setTarget(this); you can also set some checks if classid = cardinal or same party to not set target Edited May 5, 2022 by arm4729 Quote
0 GsL Posted May 5, 2022 Posted May 5, 2022 3 hours ago, arm4729 said: I'm not sure i did understand what you want to do , but i guess when you use a skill on a player and that player has no target , you want that player who is attacked to get and set the target to the player who is attacking him? search in creature for private void beginCast(L2Skill skill, boolean simultaneously, Creature target, WorldObject[] targets) ---- ---- if (this instanceof Playable) { // Send a system message USE_S1 to the L2Character if (this instanceof Player && skill.getId() != 1312) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.USE_S1); sm.addSkillName(skill); sendPacket(sm); } + if(this instanceof Player && this.getActingPlayer().getTarget() instanceof Player && this.getActingPlayer().getTarget().getActingPlayer().getTarget() == null) + this.getActingPlayer().getTarget().getActingPlayer().setTarget(this); you can also set some checks if classid = cardinal or same party to not set target No .. he say like skills Currently when attacker attack at target .. target with target null .. he target attacker ... and we ask both the same .. Don't auto target attacker if target is null and if target the attacker don't remove the target each time that attacker attack ... Complicated example I know xd L2pride have such method but I can't adapt it for l2jmobius Quote
0 Amenadiel Posted May 5, 2022 Posted May 5, 2022 i helped gsl the method is on l2character but we need a way to set that to get a return or something , cause if you edit it , it works but the player makes no damage Quote
0 GsL Posted May 5, 2022 Posted May 5, 2022 20 minutes ago, arm4729 said: show your files maybe i can help you its l2jmobius https://bitbucket.org/MobiusDev/l2j_mobius/src/master/L2J_Mobius_05.5_EtinasFate/ Quote
0 arm4729 Posted May 5, 2022 Posted May 5, 2022 6 hours ago, Amenadiel said: i helped gsl the method is on l2character but we need a way to set that to get a return or something , cause if you edit it , it works but the player makes no damage i dont really understand what you want maybe you can make a video , or show the files in wich "works" but nomake dmg Quote
0 GsL Posted May 5, 2022 Posted May 5, 2022 Just the point is to remove auto target when attacker do auto attack and if target set target the attacker the next attack of attacker don't remove the target It's funny complicated Quote
0 Amenadiel Posted May 6, 2022 Posted May 6, 2022 4 hours ago, arm4729 said: i dont really understand what you want maybe you can make a video , or show the files in wich "works" but nomake dmg Check Creature.java onHitTarget, you will understand what it does Quote
0 arm4729 Posted May 6, 2022 Posted May 6, 2022 hey you just said some posts earlier you help him but you don't get dmg , show what you modified ? Quote
Question
FeeLings
When a Player attack me, the Character auto target it.
Can it be disabled so it doesn't auto target it?
What i want is it to work like with skills. When you use skills you don't auto target player, but if it is default physical attack you do.
Is it a way to change it?
26 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.