Jump to content
  • 0

Help to add codes. Newbie on java and eclipse.


Question

Posted

I'm starting on this.

I know enough to be able to make my website with php, html and css. I also know linux to maintain a server but I don't know anything about java and its compilation.

 

Can anyone help me learn how to add this type of code to a server? I'm using L2jMobius, but I have no idea or concept of how to start to add codes.
Do I need to add it before compiling? Can it be added once the datapack is compiled? How do I know where I should add it?

 

I would appreciate any kind of information, please!

 

I wanna to add some codes nex collection, like TvT events, etc:

 

 

See you guys and thanks for all the help are in the forum!

6 answers to this question

Recommended Posts

  • 0
Posted

First of all you need to understand that there is no ultimate guide "how to", server sources has some similar things but it also has some differences that you will be hard to adapt without skills. Saying skills I mean not only java skills, the most required ones is understanding lineage 2 core processes task-scheduling and client-server networking  communication.

 

You need to:

-learn some core information about Java language

-learn some lessons about java programming to understand what is java classes, packages, imports etc.

-learn how to edit java source code with some IDE (one of them eclipse)

-learn how to compile java source code (with ant for example)

 

Then for the best way you need to get most popular sources form thread above and try to integrate that scripts like for native, I mean as I can see that mostly provided scripts are for acis, so take acis sources and ty to integrate or find something directly for mobius etc.

 

Doing all this you will need to understand three things

First - How player communicates with server

What is action bypasses (when player clicks some link in HTML) and where your server handles it (find RequestBypassToServer packet and learn how its working)

What is user/voice/admin commands (when player writes some in chat with "." or "/" or "//") and where your server handles it (find VoiceCommandHandler and learn how its working)

 

Second - How server doing core logic

If addon has some logic that not depends on direct user action it will mostly required some scheduled task (some logic that will be runs periodically), so you need to  find some ThreadPoolManager and Runnable usages and understand how its working

Maybe you will need some data storage, so you will need to find how server working with database (try to find how server executes SQL requests, SELECT, INSERT, UPDATE)

 

Third - How server communicates back to player

You need to find how server sends packets to player, find some sendPacket() method and its usages, for example Say2 packet (its when server sends some chat message to client) etc

 

Unfortunately there is no easy way, some sources will be easier to adapt cuz of similarity between sources some will be harder

 

  • 0
Posted (edited)
2 hours ago, lvlkoo said:

First of all you need to understand that there is no ultimate guide "how to", server sources has some similar things but it also has some differences that you will be hard to adapt without skills. Saying skills I mean not only java skills, the most required ones is understanding lineage 2 core processes task-scheduling and client-server networking  communication.

 

You need to:

-learn some core information about Java language

-learn some lessons about java programming to understand what is java classes, packages, imports etc.

-learn how to edit java source code with some IDE (one of them eclipse)

-learn how to compile java source code (with ant for example)

 

Then for the best way you need to get most popular sources form thread above and try to integrate that scripts like for native, I mean as I can see that mostly provided scripts are for acis, so take acis sources and ty to integrate or find something directly for mobius etc.

 

Doing all this you will need to understand three things

First - How player communicates with server

What is action bypasses (when player clicks some link in HTML) and where your server handles it (find RequestBypassToServer packet and learn how its working)

What is user/voice/admin commands (when player writes some in chat with "." or "/" or "//") and where your server handles it (find VoiceCommandHandler and learn how its working)

 

Second - How server doing core logic

If addon has some logic that not depends on direct user action it will mostly required some scheduled task (some logic that will be runs periodically), so you need to  find some ThreadPoolManager and Runnable usages and understand how its working

Maybe you will need some data storage, so you will need to find how server working with database (try to find how server executes SQL requests, SELECT, INSERT, UPDATE)

 

Third - How server communicates back to player

You need to find how server sends packets to player, find some sendPacket() method and its usages, for example Say2 packet (its when server sends some chat message to client) etc

 

Unfortunately there is no easy way, some sources will be easier to adapt cuz of similarity between sources some will be harder

 

 

First of all thank you for your answer!

 

I understand a little about programming. Enough to create dynamic websites with PHP, bash, etc. That is, I know the general programming syntax.

It's been several hours and I think I'm understanding a little more how java would work.

So far I have understood that in the different codes that are published I have to add/modify the code in the "index" files that are indicated. All this in eclipse before compiling, on java directory.

I'm trying to add one of these:

https://maxcheaters.com/topic/216955-tvt-ctf-and-dm-for-acis/
https://maxcheaters.com/topic/206016-tvt-event-reworked-tvtjoin-tvtleave-tvtstatus/


Now I find small difficulties:

 

- In L2jMobius there are no "net.sf.l2j.*" files because they are "org.l2jmobius". When I add an import what I do is modify that part of the line and eclipse indicates that it is correct. The problem comes from the fact that there are files that do not come on Mobius. For example *.gameserver.model.actor.instance.L2PcInstance.java.

I downloaded from https://bitbucket.org/MobiusDev/l2j_mobius.git

 

- Due to the above I have decided to use L2jAcis (I have read that it has many errors for not pvp server). Specifically this: https://gitlab.com/Tryskell/acis_public .The problem is that it also doesn't have the java files called L2*, like L2PcInstance.

 

I have found this dapatack that does have the L2* (https://github.com/exvo23/l2jacis400). I find it strange that the Tryskell (Acis official) doesn't have L2* files and exvo23 does.

 

I dont understand this with Acis.

 

Basically I want to build a server compiled by me and not pre-built by other people. I want TvT and little else. The idea is a server x20 not retail but without pvp style and without buffer/gmshop.


Thank you very much again for your answer! I will try to continue learning, although I am somewhat lost with so many dapatack and codes for each one.

 

 

 

 

 

Edited by gripao
  • 0
Posted
54 minutes ago, gripao said:

he problem comes from the fact that there are files that do not come on Mobius. For example *.gameserver.model.actor.instance.L2PcInstance.java.

 

This is one of kind of differences that I described in first reply.

L2PcInstance in acis and Player in mobius

https://bitbucket.org/MobiusDev/l2j_mobius/src/master/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java

There could be a lot such diffs like class names, method names, variable names. This names could be very similar like sendClientPacket() in one sources and sendPacketToClient() in another, only understanding in lineage core logic and logical thinking could help to indicate how to adapt scripts between sources. Also don't forget to use IDE features like search, code analysis etc. this could help to understand which class method should be user to replace 

  • 0
Posted
21 hours ago, lvlkoo said:

 

This is one of kind of differences that I described in first reply.

L2PcInstance in acis and Player in mobius

https://bitbucket.org/MobiusDev/l2j_mobius/src/master/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/actor/Player.java

There could be a lot such diffs like class names, method names, variable names. This names could be very similar like sendClientPacket() in one sources and sendPacketToClient() in another, only understanding in lineage core logic and logical thinking could help to indicate how to adapt scripts between sources. Also don't forget to use IDE features like search, code analysis etc. this could help to understand which class method should be user to replace 

 

Hello! Thanks again!

 

Once I have decided to use Acis, I find that the version 401 that is published in gitlab does not have the L2PcInstance file either.

Do you know what it is? How could I get the original source code of the latest version of acis that does use L2PcInstance?

 

I download 401 from there: https://gitlab.com/Tryskell/acis_public

I downloaded 382 from there, too, and dont have L2PcInstance: https://gitlab.com/Tryskell/acis_public/-/tree/452cd109c3bce48416f74bba4daa8c3cf5dfc0a0

Same for 370 from 2019: https://gitlab.com/Tryskell/acis_public/-/tree/0f463e0ddc735955aea1c45d3faf3f0c2cea8aa9/aCis_gameserver

 

I am doing something wrong?

 

Why this have L2PcInstance? https://github.com/exvo23/l2jacis400

I tried to used but give me 2s total time when building aCis_datapack. aCis_gameserver build succesful.

 

Sorry for asking too much!! Thanks 😄

  • 0
Posted
2 hours ago, gripao said:

 

Hello! Thanks again!

 

Once I have decided to use Acis, I find that the version 401 that is published in gitlab does not have the L2PcInstance file either.

Do you know what it is? How could I get the original source code of the latest version of acis that does use L2PcInstance?

 

I download 401 from there: https://gitlab.com/Tryskell/acis_public

I downloaded 382 from there, too, and dont have L2PcInstance: https://gitlab.com/Tryskell/acis_public/-/tree/452cd109c3bce48416f74bba4daa8c3cf5dfc0a0

Same for 370 from 2019: https://gitlab.com/Tryskell/acis_public/-/tree/0f463e0ddc735955aea1c45d3faf3f0c2cea8aa9/aCis_gameserver

 

I am doing something wrong?

 

Why this have L2PcInstance? https://github.com/exvo23/l2jacis400

I tried to used but give me 2s total time when building aCis_datapack. aCis_gameserver build succesful.

 

Sorry for asking too much!! Thanks 😄

In acis L2PcInstance = Player

And many other things are just renamed.

Just check other similar files and compare what changed.

 

 

 

  • 0
Posted (edited)

If you see L2PcInstance on aCis, you shouldn't touch that with a stick. It can't be rev 400, it is before rev 367.

 

https://acis.i-live.eu/index.php?topic=30.msg49015;topicseen#msg49015

 

Many cleanups were done on aCis cycle 36 (360-369) to standardize names and make it friendlier/clearer. About that particular case of model.actor.instance, you got the complete explanation of changes in the dedicated changeset.

 

I made a lot of cleanup, which goes from classes to methods rename. Nowadays, those changes are listed under "Organization", in the changesets. That cleanup stabilized few years ago, and nowadays I got limited ideas of re-organization, meaning the pack structure will stay almost the same, now.

 

If you check aCis Creature class (L2Character on other packs), you will see it is roughly 2 times shorter than other packs. It's another type of cleaning, splitting the class in more little, dedicated classes (in that exemple, the move, attack and cast logics were moved to dedicated classes).

 

So, shortly said, I did numerous re-organizations, consisting to :

  • give proper naming convention to standardize method/class naming.
  • generate package to gather stuff (eg. the enums got their own package).
  • split complex classes in less complex classes (and generate package related to it)

Unfortunately, it means you have to adapt your customs if they were shared from another pack - which isn't a real problem, since anyway, 90% of shared diff patches aren't able to be applied directly.

 

If your diff patch can be applied directly, it means (pick 1) :

  • You were extremely lucky and the dude did the patch based on the exact same revision than you use (which is uncommon, moreover if the share is old)
  • You use a dead pack - shortly said, no editions were made during a big amount of time on extremely common classes, such as Player/L2PcInstance.

 

Edit : it got the old knownlist system too, which was deleted in rev 362 - so it's extremely old. In general, don't pick a pack from another source, you got no guarantee it's safe to be used (addition of keylogger/miner/virus/backdoors).

 

In a general matter, don't pick anything coded by a BR/RU. BR are scam masters (I couldn't meet 1 correct BR in 12y of coding), RU got 0 accuracy and 0 code description (but everything will "work").

Edited by Tryskell

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • General Trackers :   IPTorrents invite IPTorrents account 1 tb TorrentLeech invite Torrentleech account 1 tb buffer  InTheShaDow ( ITS ) account Acid-lounge invite Torrentday invite Crnaberza account Abn.Lol account Limit-of-eden account Norbits account Xspeeds account Xspeeds invite Bemaniso invite Wigornot account Bithumen invite Filelist account Funfile invite AvistaZ invite Potuk.net invite ResurrectThe.Net invite GrabThe.Info invite Greek-Team invite LinkoManija invite Fano.in account tracker.czech-server.com Speed.cd invite Arab-torrents.net account Arabscene.me account Scenetime account 4thd.xyz invite Btarg.com.ar account Dedbit invite Estone.cc account Speedapp invite Finvip invite Fluxzone account GigaTorrents account Gimmepeers account Haidan.video invite Mojblink account Mycarpathians invite Newinsane.info account Oscarworld.xyz account Peers.FM invite Pt.msg.vg account Ransackedcrew account Redemption invite Scene-rush account Seedfile.io invite Teracod invite Torrent.ai account Torrentmasters invite Ttsweb invite X-files invite X-ite invite Ncore account TorrentHR account Rptorrents account BwTorrents account Superbits invite Krazyzone account Immortalseed account Tntracker invite Pt.eastgame.org account Bitturk account Rstorrent account Tracker.btnext invite Torrent-turk.de account BeiTai.PT account Pt.keepfrds account 52pt.site account Pthome account Torrentseeds account Aystorrent account Blues-brothers.biz invite Divteam account Thesceneplace invite CinemaMovies.pl account Brasiltracker account Patiodebutacas account Newheaven.nl account  Swarmazon.club invite Bc-reloaded account Crazyspirits account Silentground invite Omg.wtftrackr invite Milkie.cc invite Breathetheword invite Madsrevolution account Chilebt account Yubraca account Uniongang.tv account Frboard account Exvagos account Diablotorrent account Microbit account Carp-hunter.hu account Majomparade.eu account Theshinning.me account Youiv.info account Dragonworld-reloaded account Sharewood.tv account Partis.si account Digitalcore.club invite Fuzer.me account R3vuk.wtf invite Ztracker account 1 tb buffer 3changtrai account Best-core.info account Bitsite.us account Eliteunitedcrew invite Exitorrent.org account Tophos invite Torrent.lt account Sktorrent.eu account Oshen account Blackhattorrent account Pirata.digital account Esharenet account Ohmenarikgi.la Pirate-share account Immortuos account Kiesbits account Cliente.amigos-share.club account Broadcity invite Ilovetorzz account Torrentbytes account Polishsource account Portugas invite Shareisland account ArabaFenice account Hudbt.hust.edu.cn account Audiences account Nanyangpt account Pt.sjtu.edu.cn account Pt.zhixing.bjtu.edu.cn account Byr.pt invite Ptfiles invite Red-bits account Pt.hdpost.top account Irrenhaus.dyndns.dk (NewPropaganda) account Mnvv2.info (MaxNewVision V2) account 1ptba.com account Spidertk.top account Film-paleis account Generation-free account Aftershock-tracker account Twilightsdreams account Back-ups.me invite Sor-next.tk ( Spirit Of Revolution ) account Tfa.tf ( The Falling Angels ) account Hdmayi account S-f-p.dyndns.dk ( Share Friends Projekt ) account Unlimitz.biz account Pttime account St-tracker.eu account New-retro.eu account Zbbit account Tigers-dl.net account Jptvts.us account Lat-team account Club.hares.top account Falkonvision-team account Concen account Drugari account T.ceskeforum account Peeratiko.org account Zamunda.se account Central-torrent.eu account h-o-d.org account Torrentleech.pl account Demonoid invite Lst.gg account Fakedoor.store account LaidBackManor account Vrbsharezone.co.uk invite Torrenteros account Arenaelite account Datascene account Tracker.0day.community Tapochek.net invite Ptchina invite Lesaloon account Exyusubs account Therebels.tv account Ubits.club invite Zmpt.cc account Turktorrent.us account Dasunerwarte account Hawke.uno account Monikadesign account Fearnopeer account Alpharatio account Wukongwendao.top account Chinapyg account Azusa.wiki account Yggtorrent.top account Torrentdd account Cyanbug.net invite Hhanclub.top account Wintersakura.net account Xthor account Tctg.pm account Finelite invite Agsvpt.com account Pt.0ff.cc invite Qingwapt.com account Xingtan.one account Ptcafe.club invite W-o-t.pro account Coastal-crew.bounceme.net account Darkpeers.org account Pianyuan.org account Seedpool.org  account Tempelbox account Pt.itzmx.com account Capybarabr.com account Itatorrents.xyz  account Letseed.org account The-new-fun.com  account Malayabits.cc account Trellas.me account Yu-scene.net account Futuretorrent.org account Bitpt.cn account Tocashare.biz  account Videoteka.org  account White-angel.hu account Xbytesv2.li account   Movies Trackers :   Anthelion account Pixelhd account Cinemageddon account DVDSeed account Cinemageddon account Cinemaz account Retroflix account Classix-unlimited - invite Movie-Torrentz (m2g.link) invite Punck-tracker.net account Tmghub account Tb-asian account Cathode-ray.tube account Greatposterwall account Telly account Arabicsource.net account Upload.cx account Crabpt.vip invite Onlyencodes.cc account Exyusubs account Hellashut.net invite Nordichd.sytes.net invite Locadora.cc account   HD Trackers :   Blutopia buffered account Hd-olimpo buffered account Hdf.world account Torrentland.li account HdSky account Hdchina account Chdbits account Totheglory account Hdroute account Hdhome account TorrentCCF aka et8.org account 3DTorrents invite HD-Torrents account Bit-HDTV account HDME.eu invite Hdarea.co account Asiancinema.me account JoyHD invite HDSpace invite CrazyHD invite Bluebird-hd invite Htpt.cc account Hdtime invite Ourbits.club account Hd4fans account Siambit account Privatehd account Springsunday account Tjupt account Hdcity.leniter invite Ccfbits account Discfan account Pt.btschool.club account Ptsbao.club invite Hdzone.me invite Danishbytes account Zonaq.pw account Tracker.tekno3d account Arabp2p account Hd-united account Reelflix.xyz account Hdatmos.club account Anasch.cc invite Tigris-t account Nethd.org account Hd.ai invite Hitpt.com account Hdmonkey account Dragonhd.xyz account Hdclub.eu account Forum.bluraycd.com account Carpt account Hdfun.me invite Pt.hdupt invite Puntotorrent account Ultrahd account Rousi.zip account Bearbit account Hdturk.club account Asiandvdclub account Star-space.net account Nordicq.org account Hdkyl.in account Utp.to account Hdzero account   Music Trackers :   Dicmusic account Music-Vid account Open.cd account LzTr account ProAudioTorrents invite Jpopsuki invite TranceTraffic invite Audionews invite Kraytracker invite Libble.me invite Losslessclub invite Indietorrents.com invite Dimeadozen account Funkytorrents invite Karaokedl account zombtracker.the-zomb account Concertos account Sugoimusic account Satclubbing.club invite Metal.iplay invite Psyreactor invite Panda.cd account Adamsfile account Freehardmusic account Tracker.hqmusic.vn accouunt Twilightzoom account 3 tb buffer Hiresmusic account Metalguru account Musictorrents.org account Musebootlegs.com invite Zappateers.com account Jungleland.dnsalias.com account Naftamusic account   E-Learning Trackers :   Thevault account BitSpyder invite Brsociety account Learnbits invite Myanonamouse account Libranet account 420Project account Learnflakes account Pt.soulvoice.club account P2pelite account Aaaaarg.fail invite Ebooks-shares.org account Abtorrents account Pt.tu88.men invite Docspedia.world invite   TV-Trackers :   Skipthecommericals Cryptichaven account TV-Vault invite Shazbat.TV account Myspleen account Tasmanit.es invite Tvstore.me account Tvchaosuk account Jptv.club account Tvroad.info   XXX - Porn Trackers :   FemdomCult account Pornbay account Pussytorrents account Adult-cinema-network account Bootytape account 1 Tb buffer Exoticaz account Bitporn account Kufirc account Gaytorrent.ru invite Nicept account Gay-torrents.org invite Ourgtn account Pt.hdbd.us account BitSexy account Happyfappy.org account Kamept.com account Lesbians4u.org account   Gaming Trackers :   Mteam.fr account BitGamer invite Retrowithin invite Gamegamept account   Cartoon/Anime/Comic Trackers :   Animeworld account Oldtoons.world account U2.dmhy account CartoonChaos invite Animetorrents account Mononoke account Totallykids.tv account Bakabt.me invite Revanime account Ansktracker account Tracker.shakaw.com.br invite Bt.mdan.org account Skyey2.com account Animetracker.cc Adbt.it.cx invite Tracker.uniotaku.com account Mousebits.com account   Sports Trackers :   MMA-Tracker invite T3nnis.tv invite AcrossTheTasman account RacingForMe invite Sportscult invite Ultimatewrestlingtorrents account Worldboxingvideoarchive invite CyclingTorrents account Xtremewrestlingtorrents account Tc-boxing invite Mma-torrents account Aussierul invite Xwt-classics account Racing4everyone account Talk.tenyardtracker account Stalker.societyglitch invite Extremebits invite Rgfootball.net account F1carreras.xyz account   Software/Apps Trackers :   Brokenstones account Appzuniverse invite Teamos.xyz account Macbb.org account   Graphics Trackers:   Forum.Cgpersia account Gfxpeers account Forum.gfxdomain account   Documentary Trackers:   Forums.mvgroup account   Others   Fora.snahp.eu account Board4all.biz account Filewarez.tv account Makingoff.org/forum account Xrel.to account Undergunz.su account Corebay account Endoftheinter.net ( EOTI ) account Thismight.be invite Skull.facefromouter.space account Avxhm.se (AvaxHome) account Ssdforum account Notfake.vip account Intotheinter.net account Tildes.net invite Thetoonz account Usinavirtual account Hdclasico invite HispaShare account Valentine.wtf account Adit-hd account Forum-andr.net account Warezforums account Justanothermusic.site account Forbiddenlibrary.moe account Senturion.to account Movieparadise account Militaryzone account Dcdnet.ru account Sftdevils.net account Heavy-r.com account New-team.org account Ddl.tv account Filewarez.club account Hispamula.org account Hubwarez.tv account   NZB :   Ninjacentral.co.za account Tabula-rasa.pw account Drunkenslug account Drunkenslug invite Usenet-4all account Brothers-of-Usenet account Dognzb.cr invite Kleverig account Nzb.cat account Nzbplanet.net invite Ng4you.com account Nzbsa.co.za account Bd25.eu account NZB.to account Samuraiplace account Abhdtv.net account Abook.link account Comix.pw account House-of-usenet Secretbinaries.net account Vnext.to account Stockboxx.top account Sky-of-use.net account Prices start from 3 $ to 100 $   Payment methods: Crypto, Neteller, Webmoney, Revolut   If you want to buy something send me a pm or contact me on:   Email: morrison2102@gmail.com   Discord: LFC4LIFE#4173   Telegram: https://t.me/LFC4LIFE4173   Skype: morrison2102@hotmail.com
    • It removes the AA (Anti-Cheat) protection from the files, converting them from binary/encrypted formats into readable and editable ones. This is the first step for any client modification.
    • you need to move the contents of the staticmeshes/maps/textures folders of the respective screens and replace your existing files. If you are using interlude, you need to rename the .unr file to lobby.unr first. Or conversely if the file is already named lobby.unr and you wanna use it on h5, you rename it to lobby01.unr. Some might work, some might not, it's trial and error. Make backups of your client.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..