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

    • I am selling my l2jeternity high five (all inclusive option $300) license+daily $50(mission) mod, autofarm, this is a very good and stable H5 assembly on market if you know how to run it properly, project developer LordWinter also a very passionate person and active in daily basis, because I am no longer using it, selling this out to put in good use for new h5 l2project. I am selling this for $180, pm me for details/offer. thanks *Sale and rebinding with the consent of the developer LordWinter payment option : paypal/crypto telegram: @arcadin77  
    • Hello friends, good morning, good afternoon or good evening, depending on the time you are seeing this! I have been trying to decompile and compile again with only the classes that I want LineageEffect.u for a few days now, but I have not been successful. Could someone help me by clearing up some doubts about how I can do this work and be successful?!
    • **INTERLUDE REMASTERED** Moonland is a server that's been running for about three years without wipe, and they don't plan on wiping it anytime soon. I'm selling my items or even the account due to not having much time to play anymore. I'm selling only for $$$. Not going to disclose my nickname in the server, but here are some of the items: Lvl 5 equipment for both mage and fighter +100 mage pvp set 2mastery jewels for fighter, 2 for mage, blessed antharas, blessed queen ant, ring of fallen angel, earring of fafurion. 1k + col, VIP cosmetics for armor, agathion and weapons(duals + mage wep)   I'm only selling for real money via paypal or cs2 skins so don't offer me anything else.
    • ➡ Discount for your purchase: MAY2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
  • Topics

×
×
  • Create New...