Start Learning java
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Gries
- Posts: 307
- Joined: Fri Jun 17, 2011 9:45 am
Start Learning java
Hello, from what i could start to learn java language? I heard creating voice commands or so.
P.S Never studied it before or anything like, i have totally no experience with it.
P.S Never studied it before or anything like, i have totally no experience with it.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: Start Learning java
Read core code, try to understand it.
Watch some java intro videos like this for some explanations, google other stuff: http://www.youtube.com/watch?v=Cfd9DOnuF9w
Watch some java intro videos like this for some explanations, google other stuff: http://www.youtube.com/watch?v=Cfd9DOnuF9w
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
- DrHouse
- L2j Inner Circle
- Posts: 912
- Joined: Mon Jan 22, 2007 12:14 am
- Location: Spain
Re: Start Learning java
Yes, voice commands it is a good start, but assuming you don't have any experience on coding you should spend some time previously on understanding how object-oriented programming languages work and getting familiar to java sintaxis. I would recommend following official java tutorial, it is quite enough for the beginning. You can also get almost any java book and read those chapters about java essentials.Gries wrote:Hello, from what i could start to learn java language? I heard creating voice commands or so.
P.S Never studied it before or anything like, i have totally no experience with it.
Following this path you will get the required knowledge to understand the basic stuff of our sources, plus you will be able to tweak and modify what is written and also to create some scripts based on what you have seen: command handlers in the beginning, SQL queries, npc and skill/effect handlers later on.
After mastering the basics, your next logical step would be to start reading about more advanced stuff belonging to the high level programming layer typical features, like threading and I/O (specially networking). You will then understand a rather considerable percentage of our source and you will have also a decent understanding of the java language itself. I would recommend Dough Lea's book on threading ("Concurrent programming in Java") and almost any paper on basic and advanced networking patterns.
Leadership and management are not talk and talk, but talk and do
Proud of being a part of this project
- Gries
- Posts: 307
- Joined: Fri Jun 17, 2011 9:45 am
Re: Start Learning java
Thx all, started making something:
Any error/or another way to do it better?
Also have tried to search something while player is flagged, but couldn't find anything
Code: Select all
else if (player.isInOlympiadMode()) { mpRegenMultiplier *= 1.5; // Olympiad Mode } else if (player.isInCombat()) { mpRegenMultiplier *= 2.5; // Combat Mode }
Also have tried to search something while player is flagged, but couldn't find anything
- St3eT
- Posts: 961
- Joined: Sun Mar 07, 2010 6:50 pm
Re: Start Learning java
For check flag you can use:
Code: Select all
if (player.getPvpFlag() != 0) { player.sendMessage("Ugly and bad boy! you are flagged :( again kill any newbie, eh? NOOOOB!"); }
-
- L2j Veteran
- Posts: 1228
- Joined: Thu Jan 17, 2013 9:46 am
Re: Start Learning java
Maybe try simpler voice commands like: ".title <STRING>"
- Gries
- Posts: 307
- Joined: Fri Jun 17, 2011 9:45 am
Re: Start Learning java
Like this?xban1x wrote:Maybe try simpler voice commands like: ".title <STRING>"
http://pastebin.com/AQ9PTLtJ
-
- L2j Veteran
- Posts: 855
- Joined: Mon May 03, 2010 8:38 am
- Location: France
Re: Start Learning java
The title is sent through params
-
- L2j Veteran
- Posts: 1228
- Joined: Thu Jan 17, 2013 9:46 am
Re: Start Learning java
Exactly, other then that Gries it is perfectly fine.Sdw wrote:The title is sent through params
-
- L2j Veteran
- Posts: 855
- Joined: Mon May 03, 2010 8:38 am
- Location: France
Re: Start Learning java
No, Its still missing a little something
-
- L2j Veteran
- Posts: 1228
- Joined: Thu Jan 17, 2013 9:46 am
Re: Start Learning java
He didn't register it in MasterHandler.java yes. But other then that command itself works fine.Sdw wrote:No, Its still missing a little something
-
- L2j Veteran
- Posts: 855
- Joined: Mon May 03, 2010 8:38 am
- Location: France
Re: Start Learning java
Broadcast something maybe ?
-
- L2j Veteran
- Posts: 1228
- Joined: Thu Jan 17, 2013 9:46 am
Re: Start Learning java
I usually don't add broadcast for things like this. It will be updated when he relogs or at some other occassion. No need for spamming.Sdw wrote:Broadcast something maybe ?
- Gries
- Posts: 307
- Joined: Fri Jun 17, 2011 9:45 am
Re: Start Learning java
What you mean?xban1x wrote:Exactly, other then that Gries it is perfectly fine.Sdw wrote:The title is sent through params
-
- L2j Veteran
- Posts: 855
- Joined: Mon May 03, 2010 8:38 am
- Location: France
Re: Start Learning java
My players expect it asap. A broadcasttitleinfo wont do any harm once in a while.xban1x wrote:I usually don't add broadcast for things like this. It will be updated when he relogs or at some other occassion. No need for spamming.Sdw wrote:Broadcast something maybe ?