package quests.VipShop;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
public class VipShop extends Quest {
// Итем / кол-во
private final int ITEM = 9565;
private final int COUNT = 1;
// NpcID
private final int NPC = 40001;
public VipShop(int questId, String name, String descr) {
super(questId, name, descr);
State st = new State("Start", this);
this.setInitialState(st);
addStartNpc(NPC);
addTalkId(NPC);
}
@Override
public String onTalk(Npc npc, Player player) {
QuestState st = player.getQuestState(getName());
if (st.getQuestItemsCount(ITEM) < COUNT)
return "2.htm";
return "1.htm";
}
public static void main(String[] args) {
new VipShop(-1, "VipShop", "by VipShop");
}
}