Addition of custom Noble Master and Delevel Manager NPCs.
This commit is contained in:
3
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
3
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-1.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You do not have enough <font color="LEVEL">Gold Einhasad</font>!
|
||||
</body></html>
|
4
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
4
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000-2.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Jeadin:<br>
|
||||
You are too young...<br1>
|
||||
Go away!
|
||||
</body></html>
|
15
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
15
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/1002000.htm
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<html><body>Jeadin:<br>
|
||||
<br>
|
||||
You want to De-level?<br>
|
||||
Certainly mortal... As you wish...<br>
|
||||
It will cost you <font color="LEVEL">2x Gold Einhasad</font> per level.<br>
|
||||
We will destroy the coins in Shilens name.<br>
|
||||
<br>
|
||||
<br>
|
||||
I have to warn you!<br>
|
||||
When it is done, it cannot be undone!<br>
|
||||
Are you certain?<br>
|
||||
<br>
|
||||
<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest DelevelManager delevel">By the name of Shilen! De-level me!</Button>
|
||||
</body></html>
|
78
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
78
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/DelevelManager/DelevelManager.java
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* 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.DelevelManager;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DelevelManager extends AbstractNpcAI
|
||||
{
|
||||
private DelevelManager()
|
||||
{
|
||||
addStartNpc(Config.DELEVEL_MANAGER_NPCID);
|
||||
addTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
addFirstTalkId(Config.DELEVEL_MANAGER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.DELEVEL_MANAGER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "delevel":
|
||||
{
|
||||
if (player.getLevel() <= Config.DELEVEL_MANAGER_MINIMUM_DELEVEL)
|
||||
{
|
||||
return "1002000-2.htm";
|
||||
}
|
||||
if (getQuestItemsCount(player, Config.DELEVEL_MANAGER_ITEMID) >= Config.DELEVEL_MANAGER_ITEMCOUNT)
|
||||
{
|
||||
takeItems(player, Config.DELEVEL_MANAGER_ITEMID, Config.DELEVEL_MANAGER_ITEMCOUNT);
|
||||
player.getStat().removeExpAndSp((player.getExp() - ExperienceData.getInstance().getExpForLevel(player.getLevel() - 1)), 0);
|
||||
player.broadcastUserInfo();
|
||||
return "1002000.htm";
|
||||
}
|
||||
return "1002000-1.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1002000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DelevelManager();
|
||||
}
|
||||
}
|
5
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
5
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-1.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
Congratulations!<br1>
|
||||
You are now a Noblesse.<br>
|
||||
</body></html>
|
4
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
4
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-2.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You must be at least level 80!
|
||||
</body></html>
|
4
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
4
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000-3.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
You already are a noble.
|
||||
</body></html>
|
14
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
14
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/1003000.htm
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<html><body>
|
||||
Noblesse Master:<br>
|
||||
<br>
|
||||
If you are at least level 80,<br>
|
||||
I can promote you to Noblesse.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NoblessMaster noblesse">Noblesse me!</Button>
|
||||
</center>
|
||||
</body></html>
|
84
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
84
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/custom/NoblessMaster/NoblessMaster.java
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* 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.NoblessMaster;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class NoblessMaster extends AbstractNpcAI
|
||||
{
|
||||
// Item
|
||||
private static final int NOBLESS_TIARA = 7694;
|
||||
|
||||
private NoblessMaster()
|
||||
{
|
||||
addStartNpc(Config.NOBLESS_MASTER_NPCID);
|
||||
addTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
addFirstTalkId(Config.NOBLESS_MASTER_NPCID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
if (!Config.NOBLESS_MASTER_ENABLED)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "noblesse":
|
||||
{
|
||||
if (player.isNoble())
|
||||
{
|
||||
return "1003000-3.htm";
|
||||
}
|
||||
if (player.getLevel() >= Config.NOBLESS_MASTER_LEVEL_REQUIREMENT)
|
||||
{
|
||||
if (Config.NOBLESS_MASTER_REWARD_TIARA)
|
||||
{
|
||||
giveItems(player, NOBLESS_TIARA, 1);
|
||||
}
|
||||
player.setNoble(true);
|
||||
player.sendPacket(QuestSound.ITEMSOUND_QUEST_FINISH.getPacket());
|
||||
return "1003000-1.htm";
|
||||
}
|
||||
return "1003000-2.htm";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
return "1003000.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new NoblessMaster();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user