public String onTalk(NpcInstance npc, QuestState st)
{
String htmlText = "noquest";
int cond = st.getCond();
Player player = st.getPlayer();
Clan clan = player.getClan();
ClanHall clanhall = ResidenceHolder.getInstance().getResidence(63);
if (clanhall.getSiegeEvent().isRegistrationOver())
{
htmlText = null;
showHtmlFile(player, "farm_messenger_q0655_02.htm", false, "%siege_time%", TimeUtils.toSimpleFormat(clanhall.getSiegeDate()));
}
else if ((clan == null) || (player.getObjectId() != clan.getLeaderId()))
{
htmlText = "farm_messenger_q0655_03.htm";
}
else if ((player.getObjectId() == clan.getLeaderId()) && (clan.getLevel() < 4))
{
htmlText = "farm_messenger_q0655_05.htm";
}
else if (clanhall.getSiegeEvent().getSiegeClan(SiegeEvent.ATTACKERS, player.getClan()) != null)
{
htmlText = "farm_messenger_q0655_07.htm";
}
else if (clan.getHasHideout() > 0)
{
htmlText = "farm_messenger_q0655_04.htm";
}
else if (cond == 0)
{