Applying a patch in Eclipse

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
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Applying a patch in Eclipse

Post by cheatax21 »

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

Code: Select all

 http://www.l2jserver.com/forum/viewtopic.php?f=73&t=17801
Hello, im interested in adding this voiced command, though im not sure on how to apply the two patches, so i will need some clarifications and assistance if possible:
I read the how_to_apply_a_patch guide from the wiki but still..
Can someone tell me what steps to do for applying this one with details i would really appreciate it..
thanks in advance for your time and assistance
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Applying a patch in Eclipse

Post by cheatax21 »

What is my main concern is how i can apply a patch for example the voiced command for toggle xp off/on, and then after compile how to put it on my server folder without loosing what i have modified so far.. im kinda lost on this one guys:/
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Applying a patch in Eclipse

Post by jurchiks »

http://www.l2jserver.com/wiki/How_to_Apply_a_Patch
+
http://www.l2jserver.com/wiki/Synchronization
is all you need. If you don't understand them, read them several times.
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.
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Applying a patch in Eclipse

Post by cheatax21 »

I read them both already:/

And from them i got these questions: for example:
My workspace path--> c:\workspace
my l2server path --> c:\l2server

lets say i have this patch.txt :

Code: Select all

Index: data/scripts/handlers/usercommandhandlers/InstanceZone.java===================================================================--- data/scripts/handlers/usercommandhandlers/InstanceZone.java (revision 7669)+++ data/scripts/handlers/usercommandhandlers/InstanceZone.java (working copy)@@ -72,13 +72,22 @@                        firstMessage = false;                        activeChar.sendPacket(new SystemMessage(SystemMessageId.INSTANCE_ZONE_TIME_LIMIT));                    }-                   int hours = (int) (remainingTime / 3600);-                   int minutes = (int) ((remainingTime%3600) / 60);-                   SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES);-                   sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId));-                   sm.addNumber(hours);-                   sm.addNumber(minutes);-                   activeChar.sendPacket(sm);+                   if (instanceId != 500000)+                   {+                       int hours = (int) (remainingTime / 3600);+                       int minutes = (int) ((remainingTime%3600) / 60);+                       SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES);+                       sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId));+                       sm.addNumber(hours);+                       sm.addNumber(minutes);+                       activeChar.sendPacket(sm);+                   }+                   else+                   {+                       int hours = (int) (remainingTime / 3600);+                       int minutes = (int) ((remainingTime%3600) / 60);+                       activeChar.sendMessage("Solo Instance will be available to re-use in " + hours + " hours and " + minutes + " minutes.");+                   }                }                else                    InstanceManager.getInstance().deleteInstanceTime(activeChar.getObjectId(), instanceId);Index: data/scripts.cfg===================================================================--- data/scripts.cfg    (revision 7669)+++ data/scripts.cfg    (working copy)@@ -207,6 +207,7 @@ village_master/orc_occupation_change_2/__init__.py  # Instance Dungeons Section+instances/Bloodshed/__init__.py instances/DarkCloudMansion/DarkCloudMansion.java instances/CrystalCaverns/CrystalCaverns.java instances/Kamaloka/Kamaloka.java
I open eclipse, right-click in the l2_server_BETA / team / apply patch / browse / i choose the patch.txt / next /
***Here i need to choose wether to apply the patch in the workspace root , or in a specified file/folder/project, and im not sure what i must choose there and what to to next***
#####
Regarding the synchronization with the repositories, i tried it but it says that i didnt change anything. and its true, all my changes are done in the c:\l2server, i havent touched workspace apart from taking the 2 .zip files to make the server folder.

could u assist here mate?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Applying a patch in Eclipse

Post by jurchiks »

You only change workspace, then compile it and paste the compiled code in c:\l2server. Make all your changes in workspace or you will have "lots of fun" making your changes stay when updating the server every time.
***Here i need to choose wether to apply the patch in the workspace root , or in a specified file/folder/project, and im not sure what i must choose there and what to to next***
When you choose the patch file, in the next step the correct project is already selected. Do not change anything, just click Next.
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.
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Applying a patch in Eclipse

Post by cheatax21 »

so every change i did for example in game\config and game\data where i added some htmls and quests i shouldnt do it there?Is there any chance to add me in skype for instanst msg? I wont bother you long just to figure this one out
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Applying a patch in Eclipse

Post by jurchiks »

You don't need my skype to do this. Just edit everything in workspace and synchronize with the SVN when you want to update the code.
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.
fars666
Posts: 105
Joined: Tue Apr 16, 2013 7:05 am

Re: Applying a patch in Eclipse

Post by fars666 »

jurchiks wrote:You only change workspace, then compile it and paste the compiled code in c:\l2server. Make all your changes in workspace or you will have "lots of fun" making your changes stay when updating the server every time.
***Here i need to choose wether to apply the patch in the workspace root , or in a specified file/folder/project, and im not sure what i must choose there and what to to next***
When you choose the patch file, in the next step the correct project is already selected. Do not change anything, just click Next.
Can you guide us on how to change projects in eclipse? I compiled with SVN eclipse then after the compling I got 2 zip files for data pack / login pack. I unzip it into C: drive .. and basically been use it for almost a week. Server runs good but I can't modify and .java or java core cuz it's not linked to my eclipse :(
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Applying a patch in Eclipse

Post by jurchiks »

You need to edit the sources and build again.
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.
Post Reply