Перейти к содержанию
Авторизация  
Fragment

Tvt Frozen

Рекомендуемые сообщения

Вот хотел поправить HTML NPC менеджера который появляется в гиране но так и не нашол её.Кто может подскажите где она есть.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

в com\l2jfrozen\gameserver\model\entity\event\TvT.java

вот именно этот кусок кода

Скрытый текст

public static void showEventHtml(L2PcInstance eventPlayer, String objectId)
{
	try
	{
		NpcHtmlMessage adminReply = new NpcHtmlMessage(5);

		TextBuilder replyMSG = new TextBuilder("<html><title>"+_eventName+"</title><body>");
		replyMSG.append("<center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32></center><br1>");
		replyMSG.append("<center><font color=\"3366CC\">Current event:</font></center><br1>");
		replyMSG.append("<center>Name: <font color=\"00FF00\">" + _eventName + "</font></center><br1>");
		replyMSG.append("<center>Description: <font color=\"00FF00\">" + _eventDesc + "</font></center><br><br>");

		if(!_started && !_joining)
			replyMSG.append("<center>Wait till the admin/gm start the participation.</center>");
		else if(Config.TVT_EVEN_TEAMS.equals("SHUFFLE") && !checkMaxPlayers(_playersShuffle.size()))
		{
			if(!_started)
			{
				replyMSG.append("Currently participated: <font color=\"00FF00\">" + _playersShuffle.size() + ".</font><br>");
				replyMSG.append("Max players: <font color=\"00FF00\">" + _maxPlayers + "</font><br><br>");
				replyMSG.append("<font color=\"FFFF00\">You can't participate to this event.</font><br>");
			}
		}
		else if(eventPlayer.isCursedWeaponEquiped() && !Config.TVT_JOIN_CURSED)
		{
			replyMSG.append("<font color=\"FFFF00\">You can't participate to this event with a cursed Weapon.</font><br>");
		}
		else if(!_started && _joining && eventPlayer.getLevel()>=_minlvl && eventPlayer.getLevel()<=_maxlvl)
		{
			synchronized(_players){
				if(_players.contains(eventPlayer) || _playersShuffle.contains(eventPlayer) || checkShufflePlayers(eventPlayer))
				{
					if(Config.TVT_EVEN_TEAMS.equals("NO") || Config.TVT_EVEN_TEAMS.equals("BALANCE"))
						replyMSG.append("You participated already in team <font color=\"LEVEL\">" + eventPlayer._teamNameTvT + "</font><br><br>");
					else if(Config.TVT_EVEN_TEAMS.equals("SHUFFLE"))
						replyMSG.append("<center><font color=\"3366CC\">You participated already!</font></center><br><br>");

					replyMSG.append("<center>Joined Players: <font color=\"00FF00\">" + _playersShuffle.size() + "</font></center><br>");

					replyMSG.append("<center><font color=\"3366CC\">Wait till event start or remove your participation!</font><center>");
					replyMSG.append("<center><button value=\"Remove\" action=\"bypass -h npc_" + objectId+ "_tvt_player_leave\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
				}
				else
				{
					replyMSG.append("<center><font color=\"3366CC\">You want to participate in the event?</font></center><br>");
					replyMSG.append("<center><td width=\"200\">Min lvl: <font color=\"00FF00\">" + _minlvl + "</font></center></td><br>");
					replyMSG.append("<center><td width=\"200\">Max lvl: <font color=\"00FF00\">" + _maxlvl + "</font></center></td><br><br>");
					replyMSG.append("<center><font color=\"3366CC\">Teams:</font></center><br>");

					if(Config.TVT_EVEN_TEAMS.equals("NO") || Config.TVT_EVEN_TEAMS.equals("BALANCE"))
					{
						replyMSG.append("<center><table border=\"0\">");

						for(String team : _teams)
						{
							replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font> (" + teamPlayersCount(team) + " joined)</td>");
							replyMSG.append("<center><td width=\"60\"><button value=\"Join\" action=\"bypass -h npc_" + objectId + "_tvt_player_join " + team
									+ "\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center></td></tr>");
						}
						replyMSG.append("</table></center>");
					}
					else if(Config.TVT_EVEN_TEAMS.equals("SHUFFLE"))
					{
						replyMSG.append("<center>");

						for(String team : _teams)
							replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font>  </td>");

						replyMSG.append("</center><br>");

						replyMSG.append("<center><button value=\"Join Event\" action=\"bypass -h npc_" + objectId + "_tvt_player_join eventShuffle\" width=85 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
						replyMSG.append("<center><font color=\"3366CC\">Teams will be reandomly generated!</font></center><br>");
						replyMSG.append("<center>Joined Players:</font> <font color=\"LEVEL\">" + _playersShuffle.size() + "</center></font><br>");
						replyMSG.append("<center>Reward: <font color=\"LEVEL\">" + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName()+ "</center></font>");
					}
				}
			}

		}
		else if(_started && !_joining)
			replyMSG.append("<center>"+_eventName+" match is in progress.</center>");
		else if(eventPlayer.getLevel() < _minlvl || eventPlayer.getLevel() > _maxlvl)
		{
			replyMSG.append("Your lvl: <font color=\"00FF00\">" + eventPlayer.getLevel() + "</font><br>");
			replyMSG.append("Min lvl: <font color=\"00FF00\">" + _minlvl + "</font><br>");
			replyMSG.append("Max lvl: <font color=\"00FF00\">" + _maxlvl + "</font><br><br>");
			replyMSG.append("<font color=\"FFFF00\">You can't participate to this event.</font><br>");
		}

		replyMSG.append("</body></html>");
		adminReply.setHtml(replyMSG.toString());
		eventPlayer.sendPacket(adminReply);

		// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
		eventPlayer.sendPacket( ActionFailed.STATIC_PACKET );
	}
	catch(Exception e)
	{
		if(Config.ENABLE_ALL_EXCEPTIONS)
			e.printStackTrace();

		_log.log(Level.SEVERE, _eventName+" Engine[showEventHtlm(" + eventPlayer.getName() + ", " + objectId + ")]: exception" + e.getMessage());
	}
}

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×
×
  • Создать...