Page 1 of 1

[HELP] how to use this script???

Posted: Tue Nov 02, 2010 9:54 pm
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;             }             

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

Posted: Tue Nov 02, 2010 10:38 pm
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);

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

Posted: Tue Nov 02, 2010 11:45 pm
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.

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

Posted: Wed Nov 03, 2010 2:01 am
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!

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

Posted: Wed Nov 03, 2010 8:21 am
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.

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

Posted: Wed Nov 03, 2010 8:28 am
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).

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

Posted: Wed Nov 03, 2010 8:45 am
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?

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

Posted: Wed Nov 03, 2010 11:17 am
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;  }