I am using L2jserver files. Latest revision ( Beta ). DP:10079 L2J:6317
This is the script im trying to make it work. GS dont show any errors.. And then i kill barakiel it wont give me nobless. Yes i killed it with subclass and writen path to scripts.cfg
Help please. Thanks in advice.
/*
* 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 custom.Nobless;
import com.l2jserver.gameserver.model.L2CommandChannel;
import com.l2jserver.gameserver.model.L2Party;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
/**
*
* @author mochitto
*
*/
public final class Noblesse extends Quest
{
private static final String QN = "Noblesse";
private static final int BARAKIEL = 25325;
private static final int NOBLESS_TIARA = 7694;
private static final String[] PARTS =
{
"Q00241_PossessorOfAPreciousSoul_1",
"Q00242_PossessorOfAPreciousSoul_2",
"Q00246_PossessorOfAPreciousSoul_3",
"Q00247_PossessorOfAPreciousSoul_4"
};
@Override
public final String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
{
if( getId() != BARAKIEL )
return null;
L2CommandChannel cmd = null;
L2Party party = player.getParty();
if (party != null)
cmd = player.getParty().getCommandChannel();
if (cmd != null)
{
for (L2PcInstance partyMember : cmd.getMembers())
{
if(!partyMember.isNoble() && partyMember.isSubClassActive())
{
for(String q : PARTS)
{
QuestState st = partyMember.getQuestState(q);
if (st != null)
{
st.setState(State.COMPLETED);
st.exitQuest(false);
}
}
partyMember.setNoble(true);
partyMember.sendMessage("Congratulations. You are now Noblesse.");
partyMember.addItem("Custom nobless", NOBLESS_TIARA, 1, null, true);
_log.info("Noblesse: Player "+partyMember+" get nobless.");
}
}
}
else if (party != null)
{
for (L2PcInstance partyMember : party.getMembers())
{
if(!partyMember.isNoble() && partyMember.isSubClassActive())
{
for(String q : PARTS)
{
QuestState st = partyMember.getQuestState(q);
if (st != null)
{
st.setState(State.COMPLETED);
st.exitQuest(false);
}
}
partyMember.setNoble(true);
partyMember.sendMessage("Congratulations. You are now Noblesse.");
partyMember.addItem("Custom nobless", NOBLESS_TIARA, 1, null, true);
_log.info("Noblesse: Player "+partyMember+" get nobless.");
}
}
}
else
{
if(!player.isNoble() && player.isSubClassActive())
{
for(String q : PARTS)
{
QuestState st = player.getQuestState(q);
if (st != null)
{
st.setState(State.COMPLETED);
st.exitQuest(false);
}
}
player.setNoble(true);
player.sendMessage("Congratulations. You are now Noblesse.");
player.addItem("Custom nobless", NOBLESS_TIARA, 1, null, true);
_log.info("Noblesse: Player "+player+" get nobless.");
}
}
return super.onKill(npc, player, isPet);
}
public Noblesse(int questId, String name, String descr)
{
super(questId, name, descr);
addKillId(BARAKIEL);
}
public static void main(String[] args)
{
new Noblesse(-1, QN, "custom");
}
}
Lineage II Classic Einhovant new project is looking for a skilled Java Developer to join our team!
If you're passionate about game development and eager to contribute to this project, we'd love to hear from you.
For more details, feel free to send us a message. Let’s create something amazing together!
Question
krepst
Hi,
I am using L2jserver files. Latest revision ( Beta ). DP:10079 L2J:6317
This is the script im trying to make it work.
GS dont show any errors.. And then i kill barakiel it wont give me nobless.
Yes i killed it with subclass and writen path to scripts.cfg
Help please. Thanks in advice.
6 answers to this question
Recommended Posts