Jump to content

Question

Posted
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

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted (edited)

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
  • 0
Posted

It has to use skills as well from time to time.

 

dd066-clip-329kb.jpg?nocache=1

 

Your best bet on mobius, I would say make a new Npc instance and write some AI there to do what you said.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
    • THEY DON’T COME BACK FOR NO REASON. HERE’S WHY Our clients come from different countries and with very different tasks. But the strongest indicator of quality is simple — when a client comes back **for a second time**. This case is exactly that. The client returned with a request for a **German ID**. The requirement was clear: a document **in a male hand**, with a natural live scene and correct geographic context. What we did: ▪ accepted source files and data without unnecessary bureaucracy ▪ selected a **real street**, not a generic background ▪ built a print-ready mockup with correct scene logic ▪ sent it for approval ▪ after confirmation, delivered the **final file for printing** No templates. No “good enough”. Only solutions tailored to a specific task. Result: ▪ mockup approved on the first try ▪ client fully satisfied ▪ stays in touch We work **worldwide** — and that’s exactly why clients return. Contact us › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +6RAKokIn5ItmYjEx ) *All data is published with the client’s consent.* #redraw #verification #documents #case #ID
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..