[HELP] how to use this script???

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
Post Reply
ReaLm
Posts: 11
Joined: Tue Nov 02, 2010 4:22 pm

[HELP] how to use this script???

Post by ReaLm »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Latest:
L2JDP Revision Latest:
I found RequestRestartPoint.class and decompiled, but didnt know how to use this script? i have DJ Java decompiler. this file opens good no errors or something, i know how to archive jar.
This script needed replace for all codes in RequestRestartPoint.class or place near other code? Tell me please, where i can place this code, i've donated 1$ from paypal, srry can't more my paypal account is empty, when I will be sure to dedicate more money.

Sorry for my bad english

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;             }             
antons007
Posts: 149
Joined: Sat Sep 12, 2009 4:18 pm

Re: [HELP] how to use this script???

Post by antons007 »

ReaLm wrote:If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Latest:
L2JDP Revision Latest:
I found RequestRestartPoint.class and decompiled, but didnt know how to use this script? i have DJ Java decompiler. this file opens good no errors or something, i know how to archive jar.
This script needed replace for all codes in RequestRestartPoint.class or place near other code? Tell me please, where i can place this code, i've donated 1$ from paypal, srry can't more my paypal account is empty, when I will be sure to dedicate more money.

Sorry for my bad english

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;             }             
in file "java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java"
search for loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
replace it with loc = new Location(X, Y, Z);
ReaLm
Posts: 11
Joined: Tue Nov 02, 2010 4:22 pm

Re: [HELP] how to use this script???

Post by ReaLm »

antons007 wrote:
ReaLm wrote:If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Latest:
L2JDP Revision Latest:
I found RequestRestartPoint.class and decompiled, but didnt know how to use this script? i have DJ Java decompiler. this file opens good no errors or something, i know how to archive jar.
This script needed replace for all codes in RequestRestartPoint.class or place near other code? Tell me please, where i can place this code, i've donated 1$ from paypal, srry can't more my paypal account is empty, when I will be sure to dedicate more money.

Sorry for my bad english

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;             }             
in file "java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java"
search for loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
replace it with loc = new Location(X, Y, Z);
in l2jserver.jar is not any file with a .java ending, all files with .class ending, I will ask whether to save the new .java file with that script, can I delete the old file RequestRestartPoint.class? Or can .class script file, the old and the new script to combine together?
I tried to put RequestRespawnPoint.java in to clientpackets folder and compress the archive l2jserver.jar, I entered the coordinates of Giran, but players still gets up in other towns.
User avatar
ZaKaX
Posts: 357
Joined: Thu Nov 22, 2007 6:28 am
Location: Somewhere in Asia.

Re: [HELP] how to use this script???

Post by ZaKaX »

You gotta get the sources :roll: might want to take a look at the Wiki's and stuff there's around here.

There you go!
¿ Que dice los cojones de la nina ?
ReaLm
Posts: 11
Joined: Tue Nov 02, 2010 4:22 pm

Re: [HELP] how to use this script???

Post by ReaLm »

ZaKaX wrote:You gotta get the sources :roll: might want to take a look at the Wiki's and stuff there's around here.

There you go!
please stop write off-topic responses... Respond to my questions.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [HELP] how to use this script???

Post by janiii »

ReaLm wrote:
ZaKaX wrote:You gotta get the sources :roll: might want to take a look at the Wiki's and stuff there's around here.

There you go!
please stop write off-topic responses... Respond to my questions.
Zakax did not write off-topic. if you want to edit the code, you need the sources - the source files. then you can edit them and build and use your own l2jserver.jar with your changes included. check again the link Zakax gave you, read the guides and maybe you will understand.

if you understand how to work with source files and how to build them, then you will be able to understand what to do with a class file or how to replace it (be sure that your sources are from same version as the class files, change the code in the java file, build the changed source files, replace the old class file with your modified class file in the jar archive. still, there is no reason to replace only 1 class file when you have the sources of all java files and can build your own jar file of it, having after that the possibility to do the same with other changes - controlling what you have in the build).
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
ReaLm
Posts: 11
Joined: Tue Nov 02, 2010 4:22 pm

Re: [HELP] how to use this script???

Post by ReaLm »

janiii wrote:
ReaLm wrote:
ZaKaX wrote:You gotta get the sources :roll: might want to take a look at the Wiki's and stuff there's around here.

There you go!
please stop write off-topic responses... Respond to my questions.
Zakax did not write off-topic. if you want to edit the code, you need the sources - the source files. then you can edit them and build and use your own l2jserver.jar with your changes included. check again the link Zakax gave you, read the guides and maybe you will understand.

if you understand how to work with source files and how to build them, then you will be able to understand what to do with a class file or how to replace it (be sure that your sources are from same version as the class files, change the code in the java file, build the changed source files, replace the old class file with your modified class file in the jar archive. still, there is no reason to replace only 1 class file when you have the sources of all java files and can build your own jar file of it, having after that the possibility to do the same with other changes - controlling what you have in the build).
Why not some type of file, if I can pull them from l2jserver.jar all necessary and edit them? Not necessarily with Eclipse or DJ Java Decompiler, i have all source what i can have. So i downloaded ECLIPSE what next?
ReaLm
Posts: 11
Joined: Tue Nov 02, 2010 4:22 pm

Re: [HELP] how to use this script???

Post by ReaLm »

This is Default RequestRestartPoint.class script:

Code: Select all

package com.l2jserver.gameserver.network.clientpackets; import com.l2jserver.gameserver.ThreadPoolManager;import com.l2jserver.gameserver.instancemanager.CastleManager;import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;import com.l2jserver.gameserver.model.entity.*;import com.l2jserver.gameserver.network.L2GameClient;import java.util.logging.Logger; // Referenced classes of package com.l2jserver.gameserver.network.clientpackets://            L2GameClientPacket public final class RequestRestartPoint extends L2GameClientPacket{    /* member class not found */    class DeathTask {}      public RequestRestartPoint()    {    }     protected void readImpl()    {        _requestedPointType = readD();    }     protected void runImpl()    {        L2PcInstance activeChar = ((L2GameClient)getClient()).getActiveChar();        if(activeChar == null)            return;        if(TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(activeChar.getObjectId()))            return;        if(activeChar.isFakeDeath())        {            activeChar.stopFakeDeath(true);            return;        }        if(!activeChar.isDead())        {            _log.warning((new StringBuilder()).append("Living player [").append(activeChar.getName()).append("] called RestartPointPacket! Ban this player!").toString());            return;        }        Castle castle = CastleManager.getInstance().getCastle(activeChar.getX(), activeChar.getY(), activeChar.getZ());        if(castle != null && castle.getSiege().getIsInProgress() && activeChar.getClan() != null && castle.getSiege().checkIsAttacker(activeChar.getClan()))        {            ThreadPoolManager.getInstance().scheduleGeneral(new DeathTask(activeChar), castle.getSiege().getAttackerRespawnDelay());            if(castle.getSiege().getAttackerRespawnDelay() > 0)                activeChar.sendMessage((new StringBuilder()).append("You will be re-spawned in ").append(castle.getSiege().getAttackerRespawnDelay() / 1000).append(" seconds").toString());            return;        } else        {            (new DeathTask(activeChar)).run();            return;        }    }     public String getType()    {        return "[C] 6d RequestRestartPoint";    }     private static final String _C__6d_REQUESTRESTARTPOINT = "[C] 6d RequestRestartPoint";    private static Logger _log = Logger.getLogger(com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.getName());    protected int _requestedPointType;    protected boolean _continuation;  }
Post Reply