Hello i have this qquest working properly tested more than 10 times.
But i am not sure why a player can take the quest again and again after completed.
I want the quest to be done only 1 time by a player.
/*
* 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 quests.Q701_PathOfNoblesseTwo;
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;
import net.sf.l2j.gameserver.model.quest.QuestState;
public class Q701_PathOfNoblesseTwo extends Quest
{
private static final String qn = "Q701_PathOfNoblesseTwo";
// Item
private static final int GRAVE_ROBBERS_HEAD = 1474;
private static final int CARADINES_LETTER = 7678;
private static final int CARADINES_LETTER_1 = 7679;
public Q701_PathOfNoblesseTwo()
{
super(701, qn, "Path Of Noblesse Two");
setItemsIds(GRAVE_ROBBERS_HEAD);
addStartNpc(50011); // Exemia
addTalkId(50011);
addKillId(21353, 21354, 21355); // Varka Silenos Scout, Varka Silenos Hunter, Varka Silenos Shaman
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
QuestState st = player.getQuestState(qn);
if (st == null)
return htmltext;
if (event.equalsIgnoreCase("50011-03.htm"))
{
st.setState(STATE_STARTED);
st.set("cond", "1");
st.playSound(QuestState.SOUND_ACCEPT);
}
return htmltext;
}
@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 STATE_CREATED:
if (player.getLevel() < 75)
htmltext = "50011-01.htm";
else
htmltext = "50011-02.htm";
break;
case STATE_STARTED:
if (st.getInt("cond") == 1)
htmltext = "50011-04.htm";
else
{
htmltext = "50011-05.htm";
st.takeItems(GRAVE_ROBBERS_HEAD, -1);
st.takeItems(CARADINES_LETTER, -1);
st.giveItems(CARADINES_LETTER_1, 1);
st.rewardItems(57, 3000000);
st.playSound(QuestState.SOUND_FINISH);
st.exitQuest(false);
}
break;
//I Add this 4 lines but still players can do it.
//Can someone correct it please?
case STATE_COMPLETED:
htmltext = getAlreadyCompletedMsg();
break;
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
{
QuestState st = checkPlayerCondition(player, npc, "cond", "1");
if (st == null)
return null;
if (st.dropItemsAlways(GRAVE_ROBBERS_HEAD, 1, 1000))
st.set("cond", "2");
return null;
}
public static void main(String[] args)
{
new Q701_PathOfNoblesseTwo();
}
}
Hello mate, it's been a while since you appeared on discord, I would like your attention to finalize the ongoing project, if you see this please reply to me.
i think Interlude is better...there are lots of IL pack based on Vanganth old code in this forum,you can find it.
C5 only bugged in there.
Kameal i only know the La2world did that.
HB ,hmmm...the COEP i guess.
Verified and stable decrypter for unpacking files protected by ActiveAnticheat (AA) in Lineage 2. The utility provides direct access to game resources for modification, study, and creating your own content.
Unpacks internal game files: .dat, .u, .ukx, .usx, .ini, and others.
Batch processing: Decrypt an entire client folder at once.
Single-file decryption: For working with individual files.
Important: Antivirus programs may trigger false positives since the tool modifies files. It is recommended to add the utility to your exceptions list.
Proof of functionality:
https://youtu.be/SMSIo4aAmp4
The video clearly demonstrates the entire process: from launching the utility to successfully unpacking the files and their subsequent use.
Purchase Terms:
Price: $150
Promotion: 20% discount for the first buyer!
Payment method: USDT.
How to buy:
Contact me on Telegram: @kiselevwv for a quick response.
I will answer all your questions and provide additional information if necessary.
I guarantee functionality at the time of sale and prompt setup assistance after purchase.
Question
killer666
Hello i have this qquest working properly tested more than 10 times.
But i am not sure why a player can take the quest again and again after completed.
I want the quest to be done only 1 time by a player.
6 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now