Jump to content
  • 0

Where is the "CTRL to hit player" (etc) line?


Question

Posted

I can't seem to find where on L2j is the condition that you need to press CTRL to attack players or buff mobs etc.

 

Is it like ultra hardcoded or am i just blind?

8 answers to this question

Recommended Posts

  • 0
Posted

onForcedAttack - method in L2Character that is running while attacking with ctrl

doAttack - attack without ctrl

  • 0
Posted

Yeap it didn't help after all. I'm trying to find where it says you have to press Ctrl to use buffs on mobs. This was simply the action without conditions.

  • 0
Posted

From what i see there it simply states that if you are at war you dont have to press Ctrl to attack an unflagged player.

I had already come across this line before and (correct me if im wrong) it didnt seem to help either.

Basically i need to find where it says you HAVE to press ctrl.

Usually if you find the one you find the other, but this thing is just invisible.

Thanx for helping however! I'll look for it some more tommorow probably.

  • 0
Posted

thats deeper, look at classes like: RequestActionUse, RequestExMagicSkillUseGround, RequestMagicSkillUse, UseItem. You have got _ctrlPressed that handle this thing :)

  • 0
Posted

The isAutoAttackable() method handles it all. If you add this:

 

@Override

public boolean isAutoAttackable()

{

        return true;

}

 

in L2PcInstance, then anyone can hit players without ctrl.

  • 0
Posted

Hmmm An4rchy may have helped...but i do need CTRL for players. And mobs ofcourse are already autoattackable. Again however i dont understand where it says you have to press Ctrl to buff/heal a mob..

To better explain what im doin: I made it so if you try to heal a flagged player (thats not in your party or clan) or a mob, it will heal yourself instead (so that you dont have to target your self to use a TARGET_ONE heal). However to do that on mobs you still have to press Ctrl for the player to cast the skill.

I hope i made some sense.

Thanx again for the help everyone.

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...