Jump to content

Recommended Posts

Posted

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

Posted
  On 7/15/2009 at 9:57 AM, MαsтєЯĐιsαsтєя™ said:

Good one mate..Keep sharing such codes and soon u gonna be top dev :D

 

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

Posted

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 :)

Posted
  On 7/15/2009 at 6:45 PM, Intrepid said:

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.

^^

Posted
  On 7/15/2009 at 7:45 PM, Horus said:

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

Posted
  On 7/15/2009 at 4:25 PM, Leeroy said:

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... ;)

Posted

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)

 

Posted

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.

 

 

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