Epic Status - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Пользователи Календарь Все разделы прочитаны
Вернуться   Форум администраторов игровых серверов > MMO > Lineage II > Работа со скриптами

Работа со скриптами Помощь в редактировании и написании квестов к Java серверам, а так же эвентов.

Ответ
Опции темы
Непрочитано 28.05.2016, 21:23   #1
Пользователь

Автор темы (Топик Стартер) Epic Status

Иметься данный код

Код:
/*
 * Copyright (C) 2004-2014 L2J DataPack
 * 
 * This file is part of L2J DataPack.
 * 
 * L2J DataPack is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * L2J DataPack is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package handlers.voicedcommandhandlers;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Logger;

import com.l2jserver.gameserver.data.xml.impl.NpcData;
import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;

/**
 * @author JMD.
 */

public class Epic implements IVoicedCommandHandler
{
	static final Logger _log = Logger.getLogger(Epic.class.getName());
	private static final String[] VOICED_COMMANDS =
	{
		"epic"
	};
	
	@Override
	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
	{
		if (command.startsWith("epic"))
		{
			return Status(activeChar);
		}
		return false;
	}
	
	public boolean Status(L2PcInstance activeChar)
	{
		
		int[] BOSSES =
		{
			29001,
			29006,
			29014,
			29020,
			29028,
			29068,
			29118
		
		};
		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
		final StringBuilder replyMSG = new StringBuilder("<html><body><center>");
		// replyMSG.append("<font color=\"LEVEL\">* Grand Boss Status & Respawn *</font><br>");
		for (int boss : BOSSES)
		{
			String name = NpcData.getInstance().getTemplate(boss).getName();
			StatsSet stats = GrandBossManager.getInstance().getStatsSet(boss);
			if (stats == null)
			{
				replyMSG.append("Stats for GrandBoss " + boss + " not found!<br>");
				continue;
			}
			
			long delay = stats.getLong("respawn_time");
			long currentTime = System.currentTimeMillis();
			if (delay <= currentTime)
			{
				replyMSG.append("(" + name + ") is <font color=\"00FF00\">Alive</font><br>");
				
			}
			else
			{
				replyMSG.append("(" + name + ") is <font color=\"FF0000\">Dead</font> <font color=\"FF9900\">( " + sdf.format(new Date(delay)) + " )</font><br>");
			}
		}
		replyMSG.append("</center></body></html>");
		final NpcHtmlMessage adminReply = new NpcHtmlMessage();
		adminReply.setHtml(replyMSG.toString());
		activeChar.sendPacket(adminReply);
		return true;
	}
	
	@Override
	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
}
Помогите переделать под люцеру
в люцере нету
gameserver.data.xml.impl.NpcData;
gameserver.instancemanager.GrandBossManager;
gameserver.model.StatsSet;
hjmo вне форума Ответить с цитированием
Непрочитано 28.05.2016, 22:24   #2
Аватар для PROGRAMMATOR
Администратор

По умолчанию Re: Epic Status

На вскидку:

NpcTable
BossSpawnManager
__________________
composer require laravel/framework
yarn add vue
PROGRAMMATOR вне форума Отправить сообщение для PROGRAMMATOR с помощью ICQ Отправить сообщение для PROGRAMMATOR с помощью Skype™ Ответить с цитированием
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 
Опции темы

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Epic Music Strange0ne Курилка / Yak floor 13 08.12.2012 09:07
Команды .status .info mynameisvova Lineage II 16 14.12.2010 12:55
Переделка Grand Boss Status Под Скорию RaZoR.eXe Lineage II 10 22.07.2010 17:40
Raid Boss Status/Live map script Devolick Lineage II 0 15.12.2009 16:13
Epic для Hellbound amorphis Lineage II 22 06.08.2008 17:56


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 04:55. Часовой пояс GMT +3.

Вверх