Start Learning java

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
xban1x
L2j Veteran
L2j Veteran
Posts: 1228
Joined: Thu Jan 17, 2013 9:46 am

Re: Start Learning java

Post by xban1x »

Sdw wrote:
xban1x wrote:
Sdw wrote:Broadcast something maybe ?
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.
My players expect it asap. A broadcasttitleinfo wont do any harm once in a while.
Once in a while. But what if i add a bot and spam it? :D
User avatar
St3eT
Posts: 961
Joined: Sun Mar 07, 2010 6:50 pm

Re: Start Learning java

Post by St3eT »

"For change your title pls restart"
If i should be black sheep for sure no as punishment
Image
Sdw
L2j Veteran
L2j Veteran
Posts: 855
Joined: Mon May 03, 2010 8:38 am
Location: France

Re: Start Learning java

Post by Sdw »

I wouldnt worry at all as there is action which trigger more heavier packet which can be spammed: )
Sdw
L2j Veteran
L2j Veteran
Posts: 855
Joined: Mon May 03, 2010 8:38 am
Location: France

Re: Start Learning java

Post by Sdw »

Gries wrote:
xban1x wrote:
Sdw wrote:The title is sent through params
Exactly, other then that Gries it is perfectly fine.
What you mean?
The command in game works like this :

.title My Supa Title

So the command takes one parameter, which you aren't using currently.
User avatar
Tryskell
Posts: 256
Joined: Wed Nov 25, 2009 5:57 pm
Location: France :)

Re: Start Learning java

Post by Tryskell »

If you got the luck to get some logic, you can directly read sources and "guess". 99% of the source got legit method names, and sources got more and more javadoc with time. The only points are then :

- know what does what.
- know where you have to search.
- know Java syntax.

80% of what you need to code already exist and don't need to be written.

About easy steps in, I would suggest to pass customs codes, try to guess what each line does, and then edit the custom to fit with your desire. Extensively, fix issues, try to guess how to improve it (reusing existing parts of code, or recode it to shorter the code / improve performance). Finally, write your own customs (voicehandler in your case).

L2J is nothing more than knowing how the source is organized. When you know where to search, even a perfect programming noob can understand and code.

Some reminders :
  • all already exists, perhaps on a different format, but it exists. At least you shouldn't have issues to find, and at very worst Google is your friend.
  • Instances can inheritate from "mother" instances. It's heavily used for all types of NPCs notably.
Post Reply