Jump to content

Question

Posted

    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

  • 0
Posted

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);
				}
			}
  • 0
Posted

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.
 

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...