Cumpleaños todos los dias (quien pudiera)

Iniciado por djjose, Oct 23, 2025, 03:06 PM

Tema anterior - Siguiente tema

djjose

No puedes ver este adjunto.

Me dan item de cumpleaños a diario... alguna ayuda?

Esto lo tengo asi

# Events
#events/CharacterBirthday/CharacterBirthday.java

Swarlog

Pasa solucionarlo, debemos cambiar lo siguiente:

1.- Abrimos:

L2J_Server/java/com/l2jserver/gameserver/taskmanager/tasks/TaskBirthday.java

2.- Editamos:

{
 	private static final String NAME = "birthday";
 	private static final String NAME = "birthday";
 	/** Get all players that have had a birthday since last check. */
 	/** Get all players that have had a birthday since last check. */
-	private static final String SELECT_PENDING_BIRTHDAY_GIFTS = "SELECT charId, char_name, createDate, (YEAR(NOW()) - YEAR(createDate)) AS age " //
+	private static final String SELECT_PENDING_BIRTHDAY_GIFTS = "SELECT charId, char_name, createDate, (YEAR(NOW()) - YEAR(createDate)) AS age FROM characters WHERE (YEAR(NOW()) - YEAR(createDate) > 0) AND ((DATE_ADD(createDate, INTERVAL (YEAR(NOW()) - YEAR(createDate)) YEAR)) BETWEEN FROM_UNIXTIME(?) AND NOW())";
-		+ "FROM characters WHERE (YEAR(NOW()) - YEAR(createDate) > 0) AND (DATE_FORMAT(createDate, '%m-%d') > DATE_FORMAT(FROM_UNIXTIME(?), '%m-%d'))";
 	
 	
 	@Override
 	@Override
 	public String getName()
 	public String getName()

Y listo!