Problem with setHero(true)

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Locked
NogeR
Posts: 13
Joined: Thu Oct 11, 2012 5:33 pm

Problem with setHero(true)

Post by NogeR »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 5711M
L2JDP Revision Number: 5711M

Hi, i added in my server the "pvp reward"or something like that, for "X" pvp in a row i give hero aura. But, this aura not show inmediatly, only the player winner can view the aura. The others players must relog for view the hero aura.

How can i make to view the hero aura without relog?.

Thx and sorry for my bad english.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: Problem with setHero(true)

Post by Zoey76 »

Code: Select all

player.broadcastUserInfo(); // After player.setHero(true);
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
User avatar
Gladicek
Posts: 634
Joined: Wed Jan 19, 2011 6:25 pm
Location: Czech Republic

Re: Problem with setHero(true)

Post by Gladicek »

Zoey76 wrote:

Code: Select all

player.bradcastUserInfo(); // After player.setHero(true);

player.broadcastUserInfo(); // fixed xD
Image
L2J retired
NogeR
Posts: 13
Joined: Thu Oct 11, 2012 5:33 pm

Re: Problem with setHero(true)

Post by NogeR »

Gladicek wrote:
Zoey76 wrote:

Code: Select all

player.bradcastUserInfo(); // After player.setHero(true);

player.broadcastUserInfo(); // fixed xD
I will try, thanks you!.
NogeR
Posts: 13
Joined: Thu Oct 11, 2012 5:33 pm

Re: Problem with setHero(true)

Post by NogeR »

This didn't work. Now I can't see the aura even relog.
I had to change to "this.broadcastUserInfo(); // After player.setHero(true);", because "player.broadcastUserInfo(); // After player.setHero(true);", gave me error.

I hope you can help me.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Problem with setHero(true)

Post by UnAfraid »

NogeR wrote:This didn't work. Now I can't see the aura even relog.
I had to change to "this.broadcastUserInfo(); // After player.setHero(true);", because "player.broadcastUserInfo(); // After player.setHero(true);", gave me error.

I hope you can help me.
lol he mean:

Code: Select all

player.setHero(true);player.broadcastUserInfo();
If your code is in L2PcInstance itself then simply:

Code: Select all

setHero(true);broadcastUserInfo();
Image
NogeR
Posts: 13
Joined: Thu Oct 11, 2012 5:33 pm

Re: Problem with setHero(true)

Post by NogeR »

The code is in L2PcInstance, I will try with this:

Code: Select all

 if (quakeS == 15){     Announcements.getInstance().announceToAll("Player " + this.getName() + " won hero status for 15 consecutive Kills!");     setHero(true);     broadcastUserInfo();} 
I will try again. I'm learning, sorry i'm noob. :(
NogeR
Posts: 13
Joined: Thu Oct 11, 2012 5:33 pm

Re: Problem with setHero(true)

Post by NogeR »

Too bad, not work, i cant see the aura even relog.

This is my code:

Code: Select all

 if (quakeS == 15){     Announcements.getInstance().announceToAll("Player " + this.getName() + " won hero status for 15 consecutive Kills!");     setHero(true);     broadcastUserInfo();} 
Help :(
djmouse
Posts: 135
Joined: Tue Feb 07, 2012 4:48 am

Re: Problem with setHero(true)

Post by djmouse »

AFAIK, setHero() give you a hero statuts only until relogin
NogeR
Posts: 13
Joined: Thu Oct 11, 2012 5:33 pm

Re: Problem with setHero(true)

Post by NogeR »

Done with this code:

Code: Select all

 setHero(true);broadcastUserInfo(); 
i didn't know why not work before.

Thx you!
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: Problem with setHero(true)

Post by Zoey76 »

You're welcome.
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
Locked