Page 1 of 1
[SOLVED] Manual stop of autoattack.
Posted: Thu Sep 03, 2009 8:50 am
by XavierElf
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
Number: 3448
L2JDP Revision
Number: 6554
Hi all!
I have a little problem with blow skills. When character does blow he
always does a simple hit after that, for example, the such doesn't happen for pdam skills. To explain more visually:
1) I try to make blow and immediately stop attack after that(simply click somewhere near the target). But attack doesn't stops and character do autoattack on target.
2) I try to use pdam type skill and immediately stop attack after that(simply click somewhere near the target). And i's ok. Character stops at once the further attack.
So, the question is: how to fix that? I've tried to set CtrlEvent.EVT_READY_TO_ACT immediately after skill use in onMagicFinalizer method, but it doesn't helps. Can anybody help me?
PS. Sorry for bad English...

Re: Manual stop of autoattack.
Posted: Thu Sep 03, 2009 10:07 am
by XavierElf
Upd.
I've trying to check next intention in onMagicFinalizer method for 2 states: when i do nothing after skill (just allow character to autoattack target) and when i click somewhere near target during skil use.
Results are:
Trying PDAM type skill (Sting):
1) NextIntention: null (ok)
2) NextIntention: AI_INTENTION_MOVE_TO (ok)
Trying BLOW type skill (Lethal Blow):
1) NextIntention: null (ok)
2) NextIntention: null (not ok)
So, it seems that at use of blow skills next intention doesn't remain...
Anybody knows how to fix that?
Thanks in advance.
Re: Manual stop of autoattack.
Posted: Thu Sep 03, 2009 7:01 pm
by XavierElf
Nobody faced with that problem? Or nobody knows the solution?
Re: Manual stop of autoattack.
Posted: Thu Sep 03, 2009 10:22 pm
by XavierElf
It seems, I've found the solution.
File: L2Character.java, onMagicFinalizer method.
Code: Select all
[color=#FF0000]-[/color] if (getAI().getNextIntention() == null && skill.getSkillType() == L2SkillType.PDAM || skill.getSkillType() == L2SkillType.BLOW || skill.getSkillType() == L2SkillType.DRAIN_SOUL || skill.getSkillType() == L2SkillType.SOW || skill.getSkillType() == L2SkillType.CHARGEDAM[color=#FF0000]-[/color] || skill.getSkillType() == L2SkillType.SPOIL) { if (getTarget() instanceof L2Character && getTarget() != this && target == getTarget()) getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, getTarget()); } [color=#00FF00]+[/color] if (getAI().getNextIntention() == null && (skill.getSkillType() == L2SkillType.PDAM || skill.getSkillType() == L2SkillType.BLOW || skill.getSkillType() == L2SkillType.DRAIN_SOUL || skill.getSkillType() == L2SkillType.SOW || skill.getSkillType() == L2SkillType.CHARGEDAM[color=#00FF00]+[/color] || skill.getSkillType() == L2SkillType.SPOIL)) { if (getTarget() instanceof L2Character && getTarget() != this && target == getTarget()) getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, getTarget()); }
Re: [SOLVED] Manual stop of autoattack.
Posted: Fri Sep 04, 2009 4:41 am
by _DS_
Bad solution, actually

We need boolean "autoAttack" for skills, not hardcode on skilltypes. Anyone can create list of skills, which should not autoattack ?
Re: [SOLVED] Manual stop of autoattack.
Posted: Fri Sep 04, 2009 4:55 pm
by XavierElf
I've just add missing brackets.
PS. As far as I can remember, previously it was a parameter in skill definition, that set next action. Now almost all (may be all) physical skills have next action "Attack" not depends on skill definition.
Re: [SOLVED] Manual stop of autoattack.
Posted: Fri Sep 04, 2009 7:11 pm
by _DS_
Thanks, committed.
Re: [SOLVED] Manual stop of autoattack.
Posted: Fri Sep 04, 2009 9:21 pm
by momo61
committed in [3451]
can be moved to committed user contributions