After death teleport to only one town.

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Locked
hiroshima
Posts: 107
Joined: Tue Nov 03, 2009 1:28 pm

After death teleport to only one town.

Post by hiroshima »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision : Latest
L2JDP Revision : Latest

hey guys i am wondering how to change "After death" teleport to one town. I searched... prolly its already there but i not found, u must to forgive me :) What i mean? example: I die in Ketra, i click on "Go to village" and i am in Giran. Simple :P i think code is simple too. Thanks.
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: After death teleport to only one town.

Post by hope »

Zone.xml
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: After death teleport to only one town.

Post by SolidSnake »

Code: Select all

Index: java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java===================================================================--- java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java    (revision 4422)+++ java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java    (working copy)@@ -178,7 +178,8 @@                    break;                                    default:-                   loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);+                   loc = new Location(X, Y, Z);                    break;            }             
Image
ReaLm
Posts: 11
Joined: Tue Nov 02, 2010 4:22 pm

Re: After death teleport to only one town.

Post by ReaLm »

Ok, i found this RequestRestartPoint.class, and decompiled it. but now how to use this script?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: After death teleport to only one town.

Post by jurchiks »

omfg...
you need to modify THE SOURCE CODE, not decompile nightlies!!
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Re: After death teleport to only one town.

Post by Naonah »

jurchiks wrote:omfg...
you need to modify THE SOURCE CODE, not decompile nightlies!!
:mrgreen:
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
ReaLm
Posts: 11
Joined: Tue Nov 02, 2010 4:22 pm

Re: After death teleport to only one town.

Post by ReaLm »

jurchiks wrote:omfg...
you need to modify THE SOURCE CODE, not decompile nightlies!!
HOW TO MODIFY THE SOURCE CODE? WHAT IS A FILE? I'm didnt see this code:

Code: Select all

default:# -                   loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
in to RequestRestartPoint.class, for change code..
ReaLm
Posts: 11
Joined: Tue Nov 02, 2010 4:22 pm

Re: After death teleport to only one town.

Post by ReaLm »

I've found similar code from RequestRestartPoint$DeathTask.class :

Code: Select all

        case 27: // '\033'            if(!activeChar.isInJail())                return;            loc = new Location(0xfffe414c, 0xfffc30d3, -2984);            break;         default:            loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, com.l2jserver.gameserver.datatables.pe.Town);            break;        }        activeChar.setInstanceId(instanceId);        activeChar.setIsIn7sDungeon(false);        activeChar.setIsPendingRevive(true);        activeChar.teleToLocation(loc, true);    }
Tryed to change code this:

Code: Select all

 -                   loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town); +                   loc = new Location(my, location, zone);                     break;             }
saved the file to .class extension, and overwrited to original RequestRestartPoint$DeathTask.class, then I zipped all files to l2jserver.zip and renamed in to l2jserver.jar...
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: After death teleport to only one town.

Post by janiii »

at first, please read something about basic java. thanks. topic closed until you return here with basic java knowledge.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Locked