Ok here it is, thanks to janii from l2jserver forums.
HeroItem.java
The only problem is that when you use the gold dragon it doesnt dissapear from inventory it.
Also how can it sends a message to the player "You will remain hero until restart" and how to set some effect like white light on your character, like other servers.