Page 1 of 1
Problem with setHero(true)
Posted: Sun Dec 16, 2012 4:31 pm
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.
Re: Problem with setHero(true)
Posted: Sun Dec 16, 2012 5:41 pm
by Zoey76
Code: Select all
player.broadcastUserInfo(); // After player.setHero(true);
Re: Problem with setHero(true)
Posted: Sun Dec 16, 2012 8:22 pm
by Gladicek
Zoey76 wrote:Code: Select all
player.bradcastUserInfo(); // After player.setHero(true);
player.broadcastUserInfo(); // fixed xD
Re: Problem with setHero(true)
Posted: Tue Dec 18, 2012 1:14 pm
by NogeR
Gladicek wrote:Zoey76 wrote:Code: Select all
player.bradcastUserInfo(); // After player.setHero(true);
player.broadcastUserInfo(); // fixed xD
I will try, thanks you!.
Re: Problem with setHero(true)
Posted: Wed Dec 19, 2012 1:10 am
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.
Re: Problem with setHero(true)
Posted: Wed Dec 19, 2012 2:40 am
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();
Re: Problem with setHero(true)
Posted: Wed Dec 19, 2012 2:25 pm
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.

Re: Problem with setHero(true)
Posted: Thu Dec 20, 2012 11:44 pm
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

Re: Problem with setHero(true)
Posted: Fri Dec 21, 2012 8:38 am
by djmouse
AFAIK, setHero() give you a hero statuts only until relogin
Re: Problem with setHero(true)
Posted: Sat Dec 22, 2012 1:02 pm
by NogeR
Done with this code:
Code: Select all
setHero(true);broadcastUserInfo();
i didn't know why not work before.
Thx you!
Re: Problem with setHero(true)
Posted: Sat Dec 22, 2012 5:00 pm
by Zoey76
You're welcome.