Jump to content
  • 0

[REQUEST] L2Monster return to spawn point like L2Raid


Question

Posted

Kalimera mages

 

 

Kserei kaneis ti prepei na kanw wste na girizei piso sto spawn point ena L2Monster

otan pernaei ena X distance apo to spawn point tou?

 

 

 

To pack m einai l2jfrozen last revision

to pack exei ena config alla den work ...

 

dokimasa auto to code alla tipota

 

/**
 * Return home.
 */
public void returnHome()
 {
  ThreadPoolManager.getInstance().scheduleAi(new Runnable() {
   @Override
   public void run()
   {
    L2Spawn mobSpawn = getSpawn();
    if(!isInCombat() && !isAlikeDead() && !isDead() && mobSpawn != null && !isInsideRadius(mobSpawn.getLocx(), mobSpawn.getLocy(), Config.MAX_DRIFT_RANGE, false))
    {
     teleToLocation(mobSpawn.getLocx(), mobSpawn.getLocy(), mobSpawn.getLocz(), false);
    }
    mobSpawn = null;
   }
   
  }, 1000);
 }
protected void startMaintenanceTask()
{
	ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable() {
		@Override
		public void run()
		{
			checkAndReturnToSpawn();
		}
	}, 3000, getMaintenanceInterval()+Rnd.get(5000));
}
protected void checkAndReturnToSpawn()
{
	if (isDead() || isMovementDisabled())
		return;

	final L2Spawn spawn = getSpawn();
	if (spawn == null)
		return;

	final int spawnX = spawn.getLocx();
	final int spawnY = spawn.getLocy();
	final int spawnZ = spawn.getLocz();

	if (!isInCombat() && !isMovementDisabled())
	{
		if (!isInsideRadius(spawnX, spawnY, spawnZ, Math.max(1000, 200), true, false))
			teleToLocation(spawnX, spawnY, spawnZ);
	}
}

4 answers to this question

Recommended Posts

  • 0
Posted

Bump

 

 

kaneis den vgazi akri me auto to pragma enw fenete 1 minite code @@ ekei na me akolouthane opou paw ta monster alla ti na peis monster einai auta :@

Guest
This topic is now closed to further replies.


  • Posts

    • Hello everyone,   A quick update from the Emerge team. The official launch of Emerge Eclipse x10 is just around the corner and we are currently finishing the final preparations to ensure a smooth and stable opening for all players. Our team has been working on performance improvements, network optimizations, and additional infrastructure to provide the best possible experience from day one.   🚀 Launch Date: 7 June 2026 🕕 Launch Time: 18:00 CET We would like to invite everyone to join our Discord community where all announcements, updates, events, and support information are posted first. 🌐 Website: https://l2emerge.com 💬 Discord: https://discord.gg/l2emerge Thank you for all the support and feedback during the preparation phase. We look forward to seeing both new and veteran Lineage II players on launch day. See you soon on Emerge!
    • Added an enchant NPC ( more infos on test server)     - remade autofarm system, more clever , more humanlike steps, catacomb mode in route farm and rewrite of route farming   - Updated Antibot to defend even more from more advanced adrenaline users ( not gonna write how 😂 )   - now dll of antibot will not be flagged from antivirus or defenders   - Updated some more the AI based Agent     Our discord https://discord.gg/acvqx9rbhy   L2R Off files / monthly subscription
    • Interlude will never be the same again. To celebrate our first 3 months online, L2 Detona proudly presents League of Lineage.   A brand-new game mode inspired by the world's biggest MOBAs, bringing lane battles, minions, towers, strategic objectives, and epic team fights into the world of Lineage 2. All of this while preserving the essence that made Interlude one of the most beloved chronicles in Lineage 2 history.   ⚔️ Destroy enemy towers. 🛡️ Defend your base. 👑 Lead your team to victory.   📅 Officially launching on June 12, 2026. 🔥 Jump into the action right now through System_Test and become one of the first players to experience League of Lineage. Server Rates XP: 500x SP: 500x Adena: 200x Server Features Full Official Interlude gameplay with custom modifications Exclusive MOBA Arena 3 Hour Buffs for comfortable gameplay No Class Change Quests Website: https://www.l2detona.com Images of project: https://imgur.com/a/Lajn9Ag
    • Remove google ads from site , will be perfect without this.. we do a vote and we get 2-3 google ads, its nervus. i just give feedback you do ofc what you want 🙂
  • 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..