@Override
	public String onTalk(L2Npc npc, L2PcInstance player)
	{
		String htmltext = getNoQuestMsg();
		QuestState st = player.getQuestState(qn);
		if (st == null)
			return htmltext;
		
		switch (st.getState())
		{
			case Quest.STATE_CREATED:
				if (player.getLevel() < 76)
				{
					player.sendMessage("Low lvl, canceling nobless quest.");
					st.exitQuest(true);
				}
				else if (player.getClassIndex() == 0)
				{
					player.sendMessage("Not a subclass, canceling subclass quest.");
					st.exitQuest(true);
				}
				else
				{
					st.setState(STATE_STARTED);
					htmltext = "<html><body>Nobles quest started.</body></html>";
				}
				break;
			
			case Quest.STATE_STARTED:
				player.setNoble(true, true);
				st.giveItems(NOBLESS_TIARA, 1);
				st.exitQuest(false);
				htmltext = "<html><body>Nobles quest completed.</body></html>";
				st.playSound(QuestState.SOUND_FANFARE);
				break;
				
			case Quest.STATE_COMPLETED:
				htmltext = getAlreadyCompletedMsg();
				break;
		}
		
		return htmltext;
	}