Убрал всё равно в игре стоит лого черный
package handlers.voice;
import java.util.ArrayList;
import ru.catssoftware.gameserver.datatables.NpcTable;
import ru.catssoftware.gameserver.handler.IVoicedCommandHandler;
import ru.catssoftware.gameserver.handler.VoicedCommandHandler;
import ru.catssoftware.gameserver.model.actor.instance.L2PcInstance;
import ru.catssoftware.gameserver.model.entity.GrandBossState;
import ru.catssoftware.gameserver.network.serverpackets.NpcHtmlMessage;
public class GrandBossSpawn implements IVoicedCommandHandler
{
private static ArrayList<GrandBossState> BOSSES = new ArrayList<GrandBossState>();
private static final String [] VOICED_COMMANDS = {"epic"};
@[member='override']
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (activeChar == null)
return false;
if (command.startsWith("epic"))
{
BOSSES.clear();
BOSSES.add(new GrandBossState(29006));
BOSSES.add(new GrandBossState(29014));
BOSSES.add(new GrandBossState(29001));
BOSSES.add(new GrandBossState(29020));
BOSSES.add(new GrandBossState(29022));
BOSSES.add(new GrandBossState(29045));
BOSSES.add(new GrandBossState(29019));
BOSSES.add(new GrandBossState(29028));
NpcHtmlMessage epic = new NpcHtmlMessage(5);
StringBuilder html = new StringBuilder("<html><body><br>");
html.append("<html><title>Информация по Гранд Боссам</title><body><br><center>");
for (GrandBossState boss : BOSSES)
{
int bossid = boss.getBossId();
String name = NpcTable.getInstance().getTemplate(bossid).getName();
long delay = boss.getRespawnDate();
GrandBossState.StateEnum state = boss.getState();
html.append("<font color=\"00C3FF\">" + name + "</font>: <font color=\"");
switch (state)
{
case NOTSPAWN:
if (System.currentTimeMillis() < delay)
{
long hours = (delay - System.currentTimeMillis()) / 1000 / 60 / 60;
long mins = ((delay - (hours * 60 * 60 * 1000)) - System.currentTimeMillis()) / 1000 / 60;
html.append("FFFFFF\">Respawn in:</font><font color=\"32C332\"> " + hours + " ч. " + mins + " мин.</font><br1>");
}
else
html.append("FFFFFF\">Sleep/Not spawn</font>" + "<br1>"); //Не заспавнен
break;
case ALIVE:
html.append("9CC300\">Is Alive</font>" + "<br1>"); //Жив
break;
case DEAD:
if (System.currentTimeMillis() < delay)
{
long hours = (delay - System.currentTimeMillis()) / 1000 / 60 / 60;
long mins = ((delay - (hours * 60 * 60 * 1000)) - System.currentTimeMillis()) / 1000 / 60;
html.append("FFFFFF\">Respawn in:</font><font color=\"32C332\"> " + hours + " ч. " + mins + " мин.</font><br1>");
}
else
html.append("FFFFFF\">Is Dead </font>" + "<br1>"); //Мертв
break;
case INTERVAL:
if (System.currentTimeMillis() < delay)
{
long hours = (delay - System.currentTimeMillis()) / 1000 / 60 / 60;
long mins = ((delay - (hours * 60 * 60 * 1000)) - System.currentTimeMillis()) / 1000 / 60;
html.append("FFFFFF\">Respawn in:</font><font color=\"32C332\"> " + hours + " ч. " + mins + " мин.</font><br1>");
}
else
html.append("9CC300\">Is Alive</font><br1>"); // Жив
break;
case SLEEP:
html.append("FFFFFF\">Sleep</font>" + "<br1>"); // Спит
break;
case UNKNOWN:
html.append("FFFFFF\">Unknown</font>" + "<br1>"); // Ошибка, проверь БД grandboss_intervallist
break;
}
}
html.append("</center></body></html>");
epic.setHtml(html.toString());
activeChar.sendPacket(epic);
return true;
}
return false;
}
@[member='override']
public String getDescription(String command)
{
if (command.equals("epic"))
return "Показать статус Эпик Босов";
return null;
}
@[member='override']
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
public static void main(String[] args)
{
VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new GrandBossSpawn());
}
}