String oldVar = player.getVar("ng1");
player.setVar("ng1", oldVar == null ? "1" : String.valueOf(Integer.parseInt(oldVar) + 1), -1);
player.addExpAndSp(Experience.LEVEL[6] - player.getExp(), 127, 0, 0, true, false);
player.addAdena(11567);
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q1-2.htm", val));
return;
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q1-1.htm", val).replace("%tonpc%", getQuestNpc(1, player)));
return;
}
if (player.getLevel() < 10)
{
if (player.getVarB("p1q2"))
{
if (!player.getVarB("ng2"))
{
String oldVar = player.getVar("ng2");
player.setVar("ng2", oldVar == null ? "1" : String.valueOf(Integer.parseInt(oldVar) + 1), -1);
long addexp = Experience.LEVEL[10] - player.getExp();
player.addExpAndSp(addexp, addexp / 24, 0, 0, true, false);
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q3-1.htm", val).replace("%tonpc%", getQuestNpc(3, player)));
return;
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q2-1.htm", val).replace("%tonpc%", getQuestNpc(2, player)));
return;
}
if (player.getLevel() < 15)
{
if (player.getVarB("p1q3"))
{
if (!player.getVarB("ng3"))
{
String oldVar = player.getVar("ng3");
player.setVar("ng3", oldVar == null ? "1" : String.valueOf(Integer.parseInt(oldVar) + 1), -1);
long addexp = Experience.LEVEL[15] - player.getExp();
player.addExpAndSp(addexp, addexp / 22, 0, 0, true, false);
player.addAdena(38180);
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q4-1.htm", val).replace("%tonpc%", getQuestNpc(4, player)));
return;
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q3-1.htm", val).replace("%tonpc%", getQuestNpc(3, player)));
return;
}
if (player.getLevel() < 18)
{
if (player.getVarB("p1q4"))
{
if (!player.getVarB("ng4"))
{
String oldVar = player.getVar("ng4");
player.setVar("ng4", oldVar == null ? "1" : String.valueOf(Integer.parseInt(oldVar) + 1), -1);
long addexp = Experience.LEVEL[18] - player.getExp();
player.addExpAndSp(addexp, addexp / 5, 0, 0, true, false);
player.addAdena(10018);
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q4-2.htm", val));
return;
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q4-1.htm", val).replace("%tonpc%", getQuestNpc(4, player)));
return;
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q-no.htm", val));
return;
}
player.sendPacket(new NpcHtmlMessage(player, this, "newbiehelper/q-no.htm", val));
return;
}
super.showChatWindow(player, val);
}