Skip to content

Spawn after death(help)

Featured Replies

I want to make when player die, and when he press "to vilage" he teleport to mine desired spot. I use l2j.server but in config I dont found "spawn after death" then it must be in java : 

 

But when i change in java MapRegionTable this : it nothink happens, help :)

 

// Checking if in an instance

if (player.getInstanceId() > 0)

{

Instance inst = InstanceManager.getInstance().getInstance(player.getInstanceId());

if (inst != null)

{

coord = inst.getSpawnLoc();

if (coord[0] != 0 && coord[1] != 0 && coord[2] != 0)

return new Location(82752 + Rnd.get( -100,100), 53583 + Rnd.get( -100,100), -1499);

 

go to gameserver/network/clientpackets/RequestRestartPoint.java

 

find

loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);

 

change to

 

loc = new Location(81236, 148638, -3469);

 

  • Author

just one question there are two :

 

loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);

 

first or teh last ?

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.