Jump to content
  • 0

How change spawn after death?


numl0ckas

Question

5 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

		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

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock