Jump to content
  • 0

How change spawn after death?


Question

5 answers to this question

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

		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

  • 0
Posted

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;
			}

Guest
This topic is now closed to further replies.


×
×
  • 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..