Jump to content
  • 0

Who Can Do Attack The L2Decoy


BlackDevilDev

Question

final L2DecoyInstance decoy = new L2DecoyInstance(npcTemplate, player, _despawnDelay);
				decoy.setCurrentHp(decoy.getMaxHp());
				decoy.setCurrentMp(decoy.getMaxMp());
				decoy.setHeading(player.getHeading());
				decoy.setInstanceId(player.getInstanceId());
				decoy.setSummoner(player);
				decoy.spawnMe(player.getX(), player.getY(), player.getZ());
				player.setDecoy(decoy);
				break;

This is part of code for npc type = L2Decoy . 

 

I want do that when player summon this type npc , attack the target (take target from player).

 

Any idea who can do that ? 

 

Thank you very much

Link to comment
Share on other sites

Recommended Posts

  • 0

i try that all but dont attack . I use  "decoy.doAttack();" he do damage but not show the animation of movent stay to spawn and just do damage to object. I use a "while" in script ... Any idea how can movent work ?

 

tha npc don't remove stuck to world.

Edited by BlackDevilDev
Link to comment
Share on other sites

  • 0

Cause it shouldn't be a L2Decoy. Crappy L2J way to handle AI is at fault.

 

Where i can focus ? For i make a npc , attack when a char have a target and when no target just follow ...

 

AbstractNpcAI is good idea?

Edited by BlackDevilDev
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.
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...