Jump to content
  • 0

[Help] Screen Message on TvT


Question

Posted

Hi people, i need some help here.

I want to change the systemMessage who tells you how much time last on the TvT to finish for a screenMessage.

So here is the code:

 

TvTEvent.sysMsgToAllParticipants("TvT Event: " + (time / 60) + " minute(s) until the event is finished!");

 

I must change to:

 

TvTEvent.scrMsgToAllParticipants("TvT Event: " + (time / 60) + " minute(s) until the event is finished!");

 

But if i put scr the code is worng :S

So what i have to do?

3 answers to this question

Recommended Posts

  • 0
Posted

Such method doesn't exist :). In order to make it working like that, add this method in TvTEvent, around where is the actual method sysMsgToAllParticipants( :

 

/**
 * Send a ShowScreenMessage to all participated players<br>
 * 1. Send the message to all players of team number one<br>
 * 2. Send the message to all players of team number two<br><br>
 *
 * @param message as String<br>
 */
public static void scrMsgToAllParticipants(String message, int time)
{
	for (L2PcInstance playerInstance : _teams[0].getParticipatedPlayers().values())
	{
		if (playerInstance != null)
			playerInstance.sendPacket(new ExShowScreenMessage(message, time));
	}

	for (L2PcInstance playerInstance : _teams[1].getParticipatedPlayers().values())
	{
		if (playerInstance != null)
			playerInstance.sendPacket(new ExShowScreenMessage(message, time));
	}
}:

 

Use of this method is something like : TvTEvent.scrMsgToAllParticipants((time / 60) + " minute(s) until TvT event's end !", 20000);, where 20000 = 20 seconds.

 


 

PS : you have to import ShowScreenMessage serverpacket.

  • 0
Posted

Such method doesn't exist :). In order to make it working like that, add this method in TvTEvent, around where is the actual method sysMsgToAllParticipants( :

 

/**
 * Send a ShowScreenMessage to all participated players<br>
 * 1. Send the message to all players of team number one<br>
 * 2. Send the message to all players of team number two<br><br>
 *
 * @param message as String<br>
 */
public static void scrMsgToAllParticipants(String message, int time)
{
	for (L2PcInstance playerInstance : _teams[0].getParticipatedPlayers().values())
	{
		if (playerInstance != null)
			playerInstance.sendPacket(new ExShowScreenMessage(message, time));
	}

	for (L2PcInstance playerInstance : _teams[1].getParticipatedPlayers().values())
	{
		if (playerInstance != null)
			playerInstance.sendPacket(new ExShowScreenMessage(message, time));
	}
}:

 

Use of this method is something like : TvTEvent.scrMsgToAllParticipants((time / 60) + " minute(s) until TvT event's end !", 20000);, where 20000 = 20 seconds.

 


 

PS : you have to import ShowScreenMessage serverpacket.

 

You are the best men, you have my respect.

 


 

Edit:

An image of the code working:

 

Shot00060.jpg

 

Thanx again Tryskell.

Topic Solved. Close it please :)

Guest
This topic is now closed to further replies.


  • Posts

    • [New Server] L2Aquila — Gracia Final x9300 No Wipe | Custom Farming Zones Hi all, Rolling a fresh Gracia Final x9300 server — stable core, dedicated box, no wipe, no close, 24/7. WHAT TO EXPECT • 9300x EXP / 3000x SP / 5500x Adena / Safe +3 / Max +25 • Custom Shop + Custom Farming Zones • Free Starter Pack with 20 Custom Coins • Accounts auto-created on first login — no registration • Olympiads, TvT, CTF, offline trading, buff shop LINKS • Website & downloads: https://l2aquila.com/downloads/ • Forum: https://l2aquila.com/forum/ • Discord: https://discord.gg/5ZyBRvG4k • Gameplay tour: https://youtu.be/5QS8qpDG_wc • Install guide: https://youtu.be/F_BfBeiof-s Happy to answer any questions here. Feedback welcome!
    • [New Server] L2Aquila — Gracia Final x9300 No Wipe | Custom Farming Zones Hi all, Rolling a fresh Gracia Final x9300 server — stable core, dedicated box, no wipe, no close, 24/7. WHAT TO EXPECT • 9300x EXP / 3000x SP / 5500x Adena / Safe +3 / Max +25 • Custom Shop + Custom Farming Zones • Free Starter Pack with 20 Custom Coins • Accounts auto-created on first login — no registration • Olympiads, TvT, CTF, offline trading, buff shop LINKS • Website & downloads: https://l2aquila.com/downloads/ • Forum: https://l2aquila.com/forum/ • Discord: https://discord.gg/5ZyBRvG4k • Gameplay tour: https://youtu.be/5QS8qpDG_wc • Install guide: https://youtu.be/F_BfBeiof-s Happy to answer any questions here. Feedback welcome!
    • Hey everyone! A few of us are currently brainstorming and designing a new Lineage 2 private server. Our goal is to capture that classic L2 atmosphere we all fell in love with back in the day, but with a modern, refined feel. We’re aiming for a community-driven, dynamic server where good PvP, meaningful progression, clan life, and that nostalgic L2 vibe take center stage—a place where it just feels good to log in and play. Instead of deciding everything on our own behind closed doors, we want to build something the community actually wants to play on. We’ve put together a short survey to gather your thoughts: What did you love most about older/classic servers? What burnout factors or mechanics are you tired of? What systems or QoL (quality of life) features would you like to see? What red flags make you avoid a server entirely? It only takes a few minutes to fill out, and every single response helps us shape the vision for this project. We can't promise every single idea will be implemented, but we promise to read and consider all of your feedback.   https://docs.google.com/forms/d/e/1FAIpQLScKXptLs9ci_y8PfSmfy9dr2iSvZ9KI9dF3qDaKeFgg9RAaMQ/viewform?pli=1   Thanks a lot for your time and help in bringing this project to life! Let us know your thoughts in the comments as well.
    • Standard Google accounts added in login:password format; aged 7–14 days on average after registration; high quality, manually registered!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..