Jump to content
  • 0

Character Auto Attacks Npc


Meikis

Question

9 answers to this question

Recommended Posts

  • 0

delete this player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

change the whole action from some other npc should be the best choice

Edited by Nightw0lf
Link to comment
Share on other sites

  • 0

the buffer works as it could?,whats the type of it?If its L2Monster then there is the problem,check it.

Edited by Lineage 2 Ramon
Link to comment
Share on other sites

  • 0

The problem occur only on this npc or you can attack any npc ?

Only for this...   IMO problem is in instance code, here: 

 

 @Override
    public void onAction(L2PcInstance player)
    {
      if (this != player.getTarget()) {
         player.setTarget(this);
         player.sendPacket(new MyTargetSelected(getObjectId(), player.getLevel() - getLevel()));
         player.sendPacket(new ValidateLocation(this));
      }
      else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false)) {
         player.setCurrentFolkNPC(this);
         showMessageWindow(player);
         player.sendPacket(ActionFailed.STATIC_PACKET);
      }
      else {
         player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);
         player.sendPacket(ActionFailed.STATIC_PACKET);
      }
    }
Edited by Meikis
Link to comment
Share on other sites

  • 0

lol :troll:

 

Why so much (useless) checks .. Intention attack, huehue.. Anyway, take a look at any other instance and c/p it if you are not sure what should you put :)

Link to comment
Share on other sites

  • 0

lol :troll:

 

Why so much (useless) checks .. Intention attack, huehue.. Anyway, take a look at any other instance and c/p it if you are not sure what should you put :)

 

What you mean saying useless checkS, if something is useless it is only - intention check

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...