Page 1 of 1

ExShowScreenMessage mod

Posted: Tue Sep 21, 2010 11:36 am
by Naonah
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision Number:
L2JDP Revision Number:

Hi:)

I have such a code:

Code: Select all

sendPacket(new ExShowScreenMessage("You got reward for 5 successful PvP in a row :)", 5000));
It ofc dispaly a message to a player for 5 sec

I would like to modify this like this:

1.send this packet to all players
2. include players nick (exemple: "Player Pisior got reward for 5 successful PvP in a row)

Could you help me to make it working?

Thank you.
Best regards.

Re: ExShowScreenMessage mod

Posted: Tue Sep 21, 2010 2:09 pm
by jurchiks
well then broadcastPacket

Re: ExShowScreenMessage mod

Posted: Tue Sep 21, 2010 3:02 pm
by Naonah
jurchiks wrote:well then broadcastPacket
yes it can work but how to take someone's nick to this message? I mean how to make a query to DB.

Thank you.

Re: ExShowScreenMessage mod

Posted: Tue Sep 21, 2010 4:42 pm
by SolidSnake
You could create a new name to the player-killer as 'killer' or 'player1' and write + killer.getName() + in the script

Re: ExShowScreenMessage mod

Posted: Tue Sep 21, 2010 5:55 pm
by Naonah
Yeah, simple like f... :mrgreen:

Code: Select all

broadcastPacket(new ExShowScreenMessage(getName() + " got reward for 5 successful PvP in a row :)", 5000));
Thank you @jurchiks and @SolidSnake for helpfull clues :)