Jump to content
  • 0

[question] announce code


Question

Posted

	private void changeMode(int mode)
{
	if(_nightCreatures.size() == 0 && _dayCreatures.size() == 0)
		return;

	switch(mode)
	{
		case 0:
		{
			Announcements.getInstance().announceToAll("Day begin.");
		}
			spawnDayCreatures();
			specialNightBoss(0);
			ShadowSenseMsg(0);
			break;
		case 1:
		{
			Announcements.getInstance().announceToAll("Night begin.");
		}
			spawnNightCreatures();
			specialNightBoss(1);
			ShadowSenseMsg(1);
			break;
		default:
			_log.warning("DayNightSpawnManager: Wrong mode sent");
			break;
	}
}

 

this code its ok? i add announce when change day to night  will work normal?

 

i wanna when is day announce day begin and when is night same..

7 answers to this question

Recommended Posts

  • 0
Posted

Should but... remove {}...

 

-{
      Announcements.getInstance().announceToAll("Day begin.");
-}
-{
Announcements.getInstance().announceToAll("Night begin.");
-}

  • 0
Posted

size() == 0 > isEmpty().

 

About the message, if you got working day+night spawns / Von Hellman / shadow sense messages, no reason your announcement is broken.

 

Until the method to announce is itself broken.

  • 0
Posted

size() == 0 > isEmpty().

 

About the message, if you got working day+night spawns / Von Hellman / shadow sense messages, no reason your announcement is broken.

 

Until the method to announce is itself broken.

 

i have remove all official spawns, i have some items that working day/night and i need that announce .. so i cant fix  that u mean?

  • 0
Posted

emena ti m leei kati sto annuce.... otan grafo p.x numera  5 i 4 m leei kati gia 3000 characters////.........fakin:D pws tha to fix?

English section here.

 

However, this is because you are trying to say small numbers of characters. If you set 2 characters only (eg. SS) says you that message.

However you can do that:

//announce 4(space)(space)(space)(space)

 

I thinks it is going to work

Guest
This topic is now closed to further replies.


  • Posts

    • Dear players, We remind you, that on April 11 at 18:00 server time (GMT +2), the open beta test of our upcoming Chronicle 2 update will begin! To participate in open beta testing, download the client from one of the links below. Download links: Download client | Download updater
    • MoMoProxy Offers $850 for 1TB Plan. anyone interested in can view details as follow: https://momoproxy.com/residential-proxies
    • Yes there are many problems. Im trying to fix there slowly, cause i i put already a lot of work in this files. I think it will not be easy to move the project to other builds
    • You probably wanted to write l2jmobius. I would recommend that you change the build because it has a lot of problems with the movement of npcs and players. Even if you find bots you will have to correct the movement or the bots will get stuck, fly, teleport
    • Complete Server Pack + Source Files: C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 100EUR --------------------------------------------------------------------------------------------------------------------------------------------- C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 150EUR -------------------------------------------------------------------------------------------------------------------------------------------- C6 Interlude: P756 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 150EUR The same as C4 but in C6 Client  ----------------------------------------------------------------------------------------------------------------------------------------------   C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 150EUR   https://imgur.com/a/pts-l2gold-interlude-p746-9kB3oA9#MbP2aJh -------------------------------------------------------------------------------------------------------------------------------------------------   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 350EUR   https://imgur.com/a/pts-l2off-p110-classic-interlude-athena-x45-Z2kZxuv#YlZU9hF -------------------------------------------------------------------------------------------------------------------------------------------------   DISCORD - MMOPROMOOO TELEGRAM - MMOPROMO 
  • Topics

×
×
  • Create New...