Well, look at this, it's gonna be a way easier for ya ;D Also, select what you don't understand, so we can explain to you, instead of random explanation.
/*
* This program 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.
*
* This program 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 custom.NobleQuest;
import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.quest.Quest;
public class NobleQuest extends Quest
{
private final static int[] npcIds =
{
999
};
public NobleQuest(int questId, String name, String descr)
{
super(questId, name, descr);
for (int i : npcIds)
{
addStartNpc(i);
addFirstTalkId(i);
}
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = "";
if (player.getLevel() < 76)
htmltext = "no-level.htm";
else if (player.getPvpKills() < 20)
htmltext = "no-pvp.htm";
else if (player.isNoble())
htmltext = "noble.htm";
else
{
player.setNoble(true);
htmltext = "success.htm";
}
return htmltext;
}
public static void main(String[] args)
{
new NobleQuest(-1, "NobleQuest", "custom");
}
}