GameBlonD Posted August 28, 2016 Posted August 28, 2016 public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) { L2PcInstance partyMember = getRandomPartyMember(player, "1"); if (partyMember == null) return null; QuestState st = partyMember.getQuestState(getName()); if (st == null) return null; int id = npc.getNpcId(); int cond = st.getInt("cond"); switch (cond) { case 1: if (id == MOB1 && st.getQuestItemsCount(QITEM1) == 0) { st.giveItems(QITEM1,1); if (st.getQuestItemsCount(QITEM1) >= 1 && st.getQuestItemsCount(QITEM2) >= 1) { st.set("cond","2"); st.playSound("ItemSound.quest_middle"); }Is this possibly to give into whole party? dont mind about }{ Quote
0 Gam3Master Posted August 28, 2016 Posted August 28, 2016 Check 246 Quest for (L2PcInstance plr : getPartyMembers(player, npc, "cond", "4")) { if (!plr.isSubClassActive()) continue; QuestState st = plr.getQuestState(qn); if (!st.hasQuestItems(RAIN_SONG)) { st.set("cond", "5"); st.playSound(QuestState.SOUND_MIDDLE); st.giveItems(RAIN_SONG, 1); } } Quote
0 Horse Posted August 29, 2016 Posted August 29, 2016 He copied part of the nobless quest when you kill barakiel. You can delete the subclass check, since you don't need that. for (L2PcInstance plr : getPartyMembers(player, npc, "cond", "4")) this is what you should implent in your quest instead of 2PcInstance partyMember = getRandomPartyMember(player, "1"); or for (L2PcInstance member : player.getParty().getMembers()) not sure if this works in IL tho. Quote
Question
GameBlonD
public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
{
L2PcInstance partyMember = getRandomPartyMember(player, "1");
if (partyMember == null)
return null;
QuestState st = partyMember.getQuestState(getName());
if (st == null)
return null;
int id = npc.getNpcId();
int cond = st.getInt("cond");
switch (cond)
{
case 1:
if (id == MOB1 && st.getQuestItemsCount(QITEM1) == 0)
{
st.giveItems(QITEM1,1);
if (st.getQuestItemsCount(QITEM1) >= 1 && st.getQuestItemsCount(QITEM2) >= 1)
{
st.set("cond","2");
st.playSound("ItemSound.quest_middle");
}
Is this possibly to give into whole party? dont mind about }{
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.