Sync with L2JServer Jan 9th 2015.
This commit is contained in:
6
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-01.html
vendored
Normal file
6
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-01.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 778">Craft R-Grade Dual Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-01.html">Bestow Special Ability on R-Grade Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-01.html">Change Special Ability of R-Grade Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-01.html">Change Special Ability of R95-Grade Weapon</Button>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-02.html
vendored
Normal file
8
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-02.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 216">Craft S-Grade Dual Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262501"">Bestow Special Ability on S-Grade Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-02.html">Change Special Ability of S-Grade Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-02.html">Change Special Ability of S80-Grade Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262504">Remove Seal from S-Grade Armor</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262505">Remove Seal from S-Grade Accessory</Button>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-03.html
vendored
Normal file
5
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-03.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 311262502">Craft A-Grade Dual Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262510">Bestow Special Ability on A-Grade Weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-03.html">Change Special Ability of A-Grade Weapon</Button>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-04.html
vendored
Normal file
6
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-04.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
I'll exchange the weapon that you've been using for a weapon that is one level stronger. Pay me the difference in Ancient Adena.<br>
|
||||
There's something you should know. <font color="LEVEL">Special abilities</font> don't transfer. And if you transfer <font color="LEVEL">enchantments</font>, the new weapon will not be enchanted.<br>
|
||||
<Button ALIGN=LEFT ICON="normal" action="bypass -h npc_%objectId%_exc_multisell 311262511">Replace a weapon with an even stronger weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="return" action="bypass -h npc_%objectId%_Quest Mammons 31126.html">Back</Button>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-05.html
vendored
Normal file
8
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-05.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><head><body>Blacksmith of Mammon:<br>
|
||||
I will exchange the weapon for another type of the same grade. For example, you can exchange a mithril dagger for a two-handed claymore of the same grade. But, I have to warn you.<br>
|
||||
First, weapons with <font color="LEVEL">special abilities</font> cannot be exchanged.<br>
|
||||
Second, when exchanging a weapon that has been <font color="LEVEL">enchanted</font> the exchanged weapon will have the same enchantment.<br>
|
||||
<Button ALIGN=LEFT ICON="normal" action="bypass -h npc_%objectId%_exc_multisell 311262512">Exchange a weapon of D-grade to B-grade for a different type</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262519">Exchange an A-grade weapon for a different type</Button>
|
||||
<Button ALIGN=LEFT ICON="return" action="bypass -h npc_%objectId%_Quest Mammons 31126.html">Back</Button>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-06.html
vendored
Normal file
8
trunk/dist/game/data/scripts/ai/npc/Mammons/31126-06.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><head><body>Blacksmith of Mammon:<br>
|
||||
Do you know about the Foundation Items? Even we blacksmiths see them only infrequently.<br>
|
||||
These uncommon items are brought into being by a power than goes beyond mere chance. We Dwarves say that it is the blessing of Maphr.<br>
|
||||
That perfect craftsmanship is beyond the Human race's capacity.<br>
|
||||
It is not, however, beyond mine. Bring me <font color="LEVEL">Mammon's Varnish Enhancer, which is sold by the Merchant of Mammon</font>. Then I will use techniques known only to me to transform the item into something accessible to mortals.<br>
|
||||
Be sure to select a helmet among the rare items that provides you with a useful power. Don't worry if you make the wrong choice, though. You will have another chance to make a selection.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 311262513">Complete a Foundation Item</Button>
|
||||
</body></html>
|
17
trunk/dist/game/data/scripts/ai/npc/Mammons/31126.html
vendored
Normal file
17
trunk/dist/game/data/scripts/ai/npc/Mammons/31126.html
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<html><body>Blacksmith of Mammon:<br>
|
||||
May Mammon bless you! I, the Blacksmith of Mammon, have come to offer you arms of the highest quality.<br>
|
||||
I shall mend your weapons and armor with skills that no novice blacksmith could ever hope to imitate.<br>
|
||||
Yet there are a few things I must tell you. Although we Dwarves of Mammon didn't deal in coins of the outside world before, we have changed with the times and now accept them. Also remember that you can only remove seals from A-grade items with village blacksmiths now. Lastly, I can change the status of Bound items for you, if you provide an Unbind Scroll for me.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-01.html">R-grade</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-02.html">S-grade</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-03.html">A-grade</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262509">Remove the special ability from a weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-04.html">Replace a weapon with an even stronger weapon</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-05.html">Replace a weapon with another type of the same grade</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126-06.html">Finish a chaotic masterwork item</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 311262516">Exchange masterwork upper armor for common upper armor.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126.html">Remove the curse contained in an item or upgrade the item to a blessed item</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126.html">Upgrade Amaranthine/Eternal equipment</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 31126.html">Switch Amaranthine/Eternal equipment</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/ai/npc/Mammons/33511.html
vendored
Normal file
6
trunk/dist/game/data/scripts/ai/npc/Mammons/33511.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Priest of Mammon:<br>
|
||||
The door to the Necropolis and Catacombs is closed. I heard that the monsters inside were cleaned out by the Goddess of Destruction but... hmm... I don't know.<br>
|
||||
No matter, both the Dawn and Dusk were caught horribly unprepared by Shilen's resurrection. Haha... Because of this, I started taking on the work normally done by the priests of Dawn and Dusk.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 208">"I want to buy some supplies."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2021">"I'd like to exchange a seal stone for an item."</Button>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/ai/npc/Mammons/33739-01.html
vendored
Normal file
6
trunk/dist/game/data/scripts/ai/npc/Mammons/33739-01.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Merchant of Mammon:<br>
|
||||
Elcyum is a mineral found by the Gray Pillar dwarves in the deepest part of the Spine Mountains.<br>
|
||||
Its energies increase an item's upgrade chances. It can also be exchanged for a <font color="LEVEL">Giant's Augmenting Stone</font> that provides advanced augmentation.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2030">"I want to exchange Elcyum for something."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 2031">"I want to exchange a Giant's Augmenting Stone for something."</Button>
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/ai/npc/Mammons/33739.html
vendored
Normal file
9
trunk/dist/game/data/scripts/ai/npc/Mammons/33739.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>Merchant of Mammon:<br>
|
||||
May Mammon's blessings be upon you! Mammon's guild is here to present our special collection of rare items.<br>
|
||||
Before you start shopping, there's a few things you should know. While we dealt only in Ancient Adena in the past, now we take Adena like any other merchant. Also, you must bring a <font color="LEVEL">Blank Scroll</font> if you plan to purchase an Enchant Scroll. If you bring us Soul Crystal Fragments, we can make them into whole Soul Crystals. We also have <font color="LEVEL">Elcyum</font> upgrade items. And don't forget to check out our Augmenting Stones!.<br>
|
||||
Remember, local tax rates apply! <br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 207">"I want to buy something."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 777">"I want to exchange a Rare Soul Crystal for something else."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_TerritoryStatus">"Can you tell me about the local lord and tax rate?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Mammons 33739-01.html">"I want to take a look at some Elcyum."</Button>
|
||||
</body></html>
|
134
trunk/dist/game/data/scripts/ai/npc/Mammons/Mammons.java
vendored
Normal file
134
trunk/dist/game/data/scripts/ai/npc/Mammons/Mammons.java
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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 ai.npc.Mammons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
* Mammons AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Mammons extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int MAMMONS[] =
|
||||
{
|
||||
31126, // Blacksmith of Mammon
|
||||
33739, // Priest of Mammon
|
||||
33511, // Merchant of Mammon
|
||||
};
|
||||
// Locations
|
||||
private static final Location[] BLACKSMITH_LOC =
|
||||
{
|
||||
new Location(146873, 29448, -2264, 0), // Aden
|
||||
new Location(81266, 150091, -3528, 891), // Giran
|
||||
new Location(42825, -41337, -2184), // Rune
|
||||
};
|
||||
private static Location[] MERCHANT_LOC =
|
||||
{
|
||||
new Location(146872, 29569, -2264, 0), // Aden
|
||||
new Location(81272, 150041, -3528, 891), // Giran
|
||||
new Location(42803, -41283, -2184, 37972), // Rune
|
||||
};
|
||||
private static Location[] PRIEST_LOC =
|
||||
{
|
||||
new Location(146882, 29665, -2264, 0), // Aden
|
||||
new Location(81284, 150155, -3528, 891), // Giran
|
||||
new Location(42784, -41236, -2192, 37972), // Rune
|
||||
};
|
||||
// Misc
|
||||
private static String[] TOWN_NAME =
|
||||
{
|
||||
"Town of Aden",
|
||||
"Town of Giran",
|
||||
"Town of Rune",
|
||||
};
|
||||
private static final int TELEPORT_DELAY = 1800000; // 30min
|
||||
private static final List<L2Npc> _mammons = new ArrayList<>();
|
||||
|
||||
private Mammons()
|
||||
{
|
||||
super(Mammons.class.getSimpleName(), "ai/npc");
|
||||
addStartNpc(MAMMONS);
|
||||
addTalkId(MAMMONS);
|
||||
addFirstTalkId(MAMMONS);
|
||||
|
||||
onAdvEvent("RESPAWN_MAMMONS", null, null);
|
||||
startQuestTimer("RESPAWN_MAMMONS", TELEPORT_DELAY, null, null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "31126.html":
|
||||
case "31126-01.html":
|
||||
case "31126-02.html":
|
||||
case "31126-03.html":
|
||||
case "31126-04.html":
|
||||
case "31126-05.html":
|
||||
case "31126-06.html":
|
||||
case "33739-01.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "RESPAWN_MAMMONS":
|
||||
{
|
||||
if (!_mammons.isEmpty())
|
||||
{
|
||||
_mammons.stream().filter(Objects::nonNull).forEach(L2Npc::deleteMe);
|
||||
_mammons.clear();
|
||||
}
|
||||
final int town = getRandom(3);
|
||||
final L2Npc blacksmith = addSpawn(MAMMONS[0], BLACKSMITH_LOC[town]);
|
||||
final L2Npc merchant = addSpawn(MAMMONS[1], MERCHANT_LOC[town]);
|
||||
final L2Npc priest = addSpawn(MAMMONS[2], PRIEST_LOC[town]);
|
||||
_mammons.addAll(Arrays.asList(blacksmith, merchant, priest));
|
||||
|
||||
Broadcast.toAllOnlinePlayers("Mammon's has been spawned in " + TOWN_NAME[town] + ".", false); // TODO: remove me
|
||||
if (Config.ANNOUNCE_MAMMON_SPAWN)
|
||||
{
|
||||
Broadcast.toAllOnlinePlayers("Mammon's has been spawned in " + TOWN_NAME[town] + ".", false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Mammons();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user