Jump to content

[Share] How to make every player a hero


Recommended Posts

Well its kinda unique.. I never saw it in another server before,decided to make mine like this cuz olympiad is failure - feedings etc..So with this thingie you can make every logged player a hero + skills.

 

Works on all l2j's ^^

 

java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java

Find this :

		// Set Hero status if it applies
	if (Hero.getInstance().getHeroes() != null && Hero.getInstance().getHeroes().containsKey(activeChar.getObjectId()))
		activeChar.setHero(true);

Delete it and on the deleted lines paste this :

		// All chars are hero's
	if(!activeChar.isHero())
		activeChar.setHero(true);

 

PLS dont post things like USELESS ..

P.S. Thanks to Horus and Stefoulis15 for helping me ;d

Link to comment
Share on other sites

Horus is the best^^ he doesnt give u a code to paste, he just tell u how to do it and u have to search it by yourself.

I love when he do that :P

Link to comment
Share on other sites

The only problem is i think if you gain hero status you lost it because of the check.

 

anyway everybody who start to learn java is welcome :)

Link to comment
Share on other sites

The only problem is i think if you gain hero status you lost it because of the check.

LOOL are you crazy ?

Jeez Intrepid are you on drugs and suddenly forgot Java ?

In english the check works like this:

IF the character is NOT a hero, then make him. ELSE if he IS a hero DO NOTHING.

^^

Link to comment
Share on other sites

LOOL are you crazy ?

Jeez Intrepid are you on drugs and suddenly forgot Java ?

In english the check works like this:

IF the character is NOT a hero, then make him. ELSE if he IS a hero DO NOTHING.

^^

 

ahh lol sry nahh im not on drugs(or maybe :D )

that happens when i write something 10min after i get up :D

Link to comment
Share on other sites

I don't think so ;d This is the most simple thing ever :/

WeLL u must know that all the top devs started from teh most simple things and now here they are... ;)

Link to comment
Share on other sites

Interpid you're wrong.. From PHP i know that when u do a if(!activeChar.isHero()) ! means that if(false) etc etc.They are so close languages ;d Almost same!(yea sure..;x).Okay okay not the same cuz i write php but i can't java this is another shit ^^ I`ll make it on a config too.(mabey:D)

 

Link to comment
Share on other sites

as a config. it's  not sth difficult. just

 

Enterworld.java

	// All chars are hero's
if (Config.NEW_CHAR_SET_HERO)
{
	if(!activeChar.isHero())
		activeChar.setHero(true);
}

 

Config.java

+ public static boolean NEW_CHAR_SET_HERO;
+ NEW_CHAR_SET_HERO = Boolean.parseBoolean(L2JModSettings.getProperty("NewCharSetHero", "True"));

 

L2JMod.properties

#Set Hero Every New Character On It's Login?
NewCharSetHero = True

 

sth like this.

 

NOTE: Im not on my eclipse , so there might be some mistakes.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock