Skip to content

How change spawn after death?

Featured Replies

Hello, how change spawn after death then use To Village? Using: aCis, Thanks!

Index: java/net/l2jalpha/gameserver/network/clientpackets/RequestRestartPoint.java
===================================================================
--- java/net/l2jalpha/gameserver/network/clientpackets/RequestRestartPoint.java	(revision 26)
+++ java/net/l2jalpha/gameserver/network/clientpackets/RequestRestartPoint.java	(working copy)
@@ -18,7 +18,6 @@
  */
package net.l2jalpha.gameserver.network.clientpackets;

-import net.l2jalpha.gameserver.ThreadPoolManager;
import net.l2jalpha.gameserver.datatables.sql.MapRegionTable;
import net.l2jalpha.gameserver.instancemanager.CastleManager;
import net.l2jalpha.gameserver.instancemanager.ClanHallManager;
@@ -176,8 +175,13 @@
			_log.warning("Living player ["+activeChar.getName()+"] called RestartPointPacket! Ban this player!");
			return;
		}
+		
+		activeChar.teleToLocation(0, 0, 0, true);
+		activeChar.doRevive();
+		activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
+		activeChar.setCurrentCp(activeChar.getMaxCp());

-		Castle castle = CastleManager.getInstance().getCastle(activeChar.getX(), activeChar.getY(), activeChar.getZ());
+		/*Castle castle = CastleManager.getInstance().getCastle(activeChar.getX(), activeChar.getY(), activeChar.getZ());
		if (castle != null && castle.getSiege().getIsInProgress())
		{
			if (activeChar.getClan() != null && castle.getSiege().checkIsAttacker(activeChar.getClan()))
@@ -191,7 +195,7 @@
			}
		}

-		ThreadPoolManager.getInstance().scheduleGeneral(new DeathTask(activeChar), 1);
+		ThreadPoolManager.getInstance().scheduleGeneral(new DeathTask(activeChar), 1);*/
	}


 

Where 0, 0, 0 add your x, y, z coords.

 

WARNING: That will modify the respawn location even if player is in siege etc.

  • Author

		if (!activeChar.isDead())
	{
		_log.warning("Living player [" + activeChar.getName() + "] called RequestRestartPoint packet.");
		return;
	}

	Castle castle = CastleManager.getInstance().getCastle(activeChar.getX(), activeChar.getY(), activeChar.getZ());
	if (castle != null && castle.getSiege().getIsInProgress())
	{
		if (activeChar.getClan() != null && castle.getSiege().checkIsAttacker(activeChar.getClan()))
		{
			// Schedule respawn delay for attacker
			ThreadPoolManager.getInstance().scheduleGeneral(new DeathTask(activeChar), Siege.getAttackerRespawnDelay());

			if (Siege.getAttackerRespawnDelay() > 0)
				activeChar.sendMessage("You will be teleported in " + Siege.getAttackerRespawnDelay() / 1000 + " seconds.");

			return;
		}
	}

	// run immediately (no need to schedule)
	new DeathTask(activeChar).run();
}
}

 

how adapt? because i get errors

An4rchy ? :o

 

If you mean custom spawn point when you click 'To Village', here it is.

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java	(revision 8)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java	(working copy)
@@ -138,7 +138,7 @@
					break;

				default:
-					loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
+					loc = new Location(45786,49070 ,-3095); // x,y,z your coords
					break;
			}

thanks!

I suppose you don't have any more questions about it,locked.

If you need to ask something more pm me to unlock it.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.