Jump to content
  • 0

Tvt Players Attack/cast Without Pressing Ctrl


zilbe333

Question

Hello,

I've came across this issue: TvT  players that are clan members to ttack/cast, if the opposite event team player is a clan memmber, they have to  be pressing CTRL to attack, if you're not a clan memmber all works fine. How to fix it?

[L2jFrozen]

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

isAttackable / isAutoAttackable

I've found about it in actor/instance/L2PcInstance.java, is it the correct file?

I hope I was looking up to the right bit, If so where to set it correct for tvt/dm/cft?

else
{

player.sendPacket(new ValidateLocation(this));

// Check if the player is attackable (without a forced attack) and isn't dead
if (isAutoAttackable(player) && !isAlikeDead())
{
// Check the height difference
if (Math.abs(player.getZ() - getZ()) < 400) // this max heigth difference might need some tweaking
{
// Set the L2PcInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);
// player.startAttack(this);
}
else
{
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}
}
else if (!isAutoAttackable(player))
{
// Calculate the distance between the L2PcInstance and the L2NpcInstance
if (!canInteract(player))
{
// Notify the L2PcInstance AI with AI_INTENTION_INTERACT
player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
}
else
{
// Like L2OFF if char is dead, is sitting, is in trade or is in fakedeath can't interact with npc
if (player.isSitting() || player.isDead() || player.isFakeDeath() || player.getActiveTradeList() != null)
return;



I hope it's the right bit..

or somewhere among here?

public boolean isAutoAttackable(final L2Character attacker)
{
return false;
}

/**
* Return the Identifier of the item in the left hand of this L2NpcInstance contained in the L2NpcTemplate.<BR>
* <BR>
* @return the left hand item
*/
public int getLeftHandItem()
{
return _currentLHandId;
}

/**
Edited by zilbe333
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...