Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 deletions

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
Welcome. I know Lionel has sent you.<br>
I know what Lionel has been preparing for you. That's why I wanted to give you the opportunity to experience it beforehand.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10814_BefittingOfTheStatus 30097-02.htm">"What is it?"</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
Lionel wants to give you a reward when you complete all the tests. That's why he told me to get him a special item.<br>
After I got it, I realized that I didn't want to hide it from you. That's why I asked a Dwarf to make a clone of the item.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus 30097-03.htm">"What is it?"</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Trader Galladucci:<br>
It's a tiara.<br>
The real thing is more beautiful and powerful, and the clone isn't as good. However, it's still useful.<br>
I asked Lionel about using a clone at least.<br>
But even if it's a clone, ingredients are needed nontheless. Will you bring them?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus 30097-04.html">"I'll bring the ingredients."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
In order to make this item, I need hair accessories.<br>
Bring <font color="LEVEL">5 of the following accessories without repeating</font>. Here's the list: <font color="LEVEL">Lady's Hairpin, Party Hat, Daisy Hairpin, Chapeau, Monocle, Outlaw's Eyepatch, Forget-me-not Hairpin, Maiden's Hairpin, Eyepatch, Little Angel Wings, Artisan's Goggles, Party Mask, Fairy Antennae, Pirate King Hat, Pirate's Eyepatch, Arrow-pierced Apple</font>.<br>
Also, <font color="LEVEL">I won't accept items with options</font>. Remember that.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Galladucci:<br>
Don't be in such a hurry. I can't talk about this gift to just anyone. Go talk to Lionel first.<br>
(Only characters who are performing the Exalted, One Who Faces the Limit quest may take this quest.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Galladucci:<br>
You have enough time, so no need to hurry. I'll stay here.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
You really got everything?<br>
Great!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus 30097-08.html">"I know."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
Great.<br>
You should be able to accomplish anything with that kind of skill!<br>
I'll give you a certificate.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Galladucci:<br>
I'm busy, so please don't bother me.<br>
(Only characters above Lv. 99.)
</body></html>

View File

@@ -0,0 +1,296 @@
/*
* 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 quests.Q10814_BefittingOfTheStatus;
import java.util.Arrays;
import java.util.List;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.datatables.ItemTable;
import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import quests.Q10811_ExaltedOneWhoFacesTheLimit.Q10811_ExaltedOneWhoFacesTheLimit;
/**
* Befitting of the Status (10814)
* @author Gladicek, St3eT
*/
public final class Q10814_BefittingOfTheStatus extends Quest
{
// Npc
private static final int GALLADUCCI = 30097;
// Items
private static final int REPLICA_TIARA = 37804;
private static final int GALLADUCI_RODEMAI_CERTIFICATE = 45625;
private static final int[] HATS =
{
6844, // Lady's Hairpin
8184, // Party Hat
7696, // Daisy Hairpin
8185, // Chapeau
6846, // Monocle
7681, // Outlaw's Eyepatch
7695, // Forget-me-not Hairpin
7682, // Maiden's Hairpin
8916, // Eyepatch
8188, // Little Angel Wings
8186, // Artisan's Goggles
5808, // Party Mask
8189, // Fairy Antennae
21892, // Pirate King Hat
6845, // Pirate's Eyepatch
13490, // Arrow-pierced Apple
};
// Misc
private static final int MIN_LEVEL = 99;
public Q10814_BefittingOfTheStatus()
{
super(10814);
addStartNpc(GALLADUCCI);
addTalkId(GALLADUCCI);
addCondMinLevel(MIN_LEVEL, "30097-09.htm");
addCondStartedQuest(Q10811_ExaltedOneWhoFacesTheLimit.class.getSimpleName(), "30097-05.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "30097-02.htm":
case "30097-03.htm":
case "30097-06.html":
{
htmltext = event;
break;
}
case "30097-04.html":
{
qs.startQuest();
htmltext = event;
break;
}
case "30097-08.html":
{
if (qs.isCond(6))
{
if ((player.getLevel() >= MIN_LEVEL))
{
giveItems(player, REPLICA_TIARA, 1);
giveItems(player, GALLADUCI_RODEMAI_CERTIFICATE, 1);
qs.exitQuest(false, true);
final Quest mainQ = QuestManager.getInstance().getQuest(Q10811_ExaltedOneWhoFacesTheLimit.class.getSimpleName());
if (mainQ != null)
{
mainQ.notifyEvent("SUBQUEST_FINISHED_NOTIFY", npc, player);
}
htmltext = event;
break;
}
htmltext = getNoQuestLevelRewardMsg(player);
break;
}
}
case "showItemList":
{
htmltext = generateItemListHtml(player, npc);
break;
}
default:
{
if (event.startsWith("insertItem_"))
{
final int itemId = Integer.parseInt(event.replace("insertItem_", ""));
if (CommonUtil.contains(HATS, itemId))
{
if (hasQuestItems(player, itemId))
{
for (int i = 1; i < 5; i++)
{
final int slotValue = qs.getMemoStateEx(i);
if (slotValue != 0)
{
continue;
}
qs.setMemoStateEx(i, itemId);
break;
}
takeItems(player, itemId, 1);
if (qs.getCond() < 6)
{
qs.setCond(qs.getCond() + 1);
}
switch (qs.getCond())
{
case 2:
htmltext = "next-item-01.html";
break;
case 3:
htmltext = "next-item-02.html";
break;
case 4:
htmltext = "next-item-03.html";
break;
case 5:
htmltext = "next-item-04.html";
break;
case 6:
htmltext = "30097-07.html";
break;
}
}
else
{
htmltext = "no-item.html";
}
}
}
}
}
return htmltext;
}
private String generateItemListHtml(L2PcInstance player, L2Npc npc)
{
String html = null;
final QuestState qs = getQuestState(player, false);
if (qs != null)
{
final String htmlfile;
switch (qs.getCond())
{
case 1:
htmlfile = "list-01.html";
break;
case 2:
htmlfile = "list-02.html";
break;
case 3:
htmlfile = "list-03.html";
break;
case 4:
htmlfile = "list-04.html";
break;
case 5:
htmlfile = "list-05.html";
break;
default:
htmlfile = "list-01.html";
}
final NpcHtmlMessage htmlFile = getNpcHtmlMessage(player, npc, htmlfile);
final StringBuilder sb = new StringBuilder();
if (htmlFile != null)
{
for (int i = 1; i < 5; i++)
{
final int itemId = qs.getMemoStateEx(i);
final L2Item item = ItemTable.getInstance().getTemplate(itemId);
if (item != null)
{
htmlFile.replace("%slot" + i + "%", item.getName());
}
}
final List<Integer> itemList = Arrays.asList(qs.getMemoStateEx(1), qs.getMemoStateEx(2), qs.getMemoStateEx(3), qs.getMemoStateEx(4), qs.getMemoStateEx(5));
for (int itemId : HATS)
{
if (!itemList.contains(itemId))
{
final L2Item item = ItemTable.getInstance().getTemplate(itemId);
if (item != null)
{
sb.append("<Button ALIGN=LEFT ICON=\"NORMAL\" action=\"bypass -h Quest Q10814_BefittingOfTheStatus insertItem_" + itemId + "\">" + item.getName() + "</Button>");
}
}
}
htmlFile.replace("%itemList%", sb.toString());
html = htmlFile.getHtml();
}
}
return html;
}
private NpcHtmlMessage getNpcHtmlMessage(L2PcInstance player, L2Npc npc, String fileName)
{
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
final String text = getHtm(player.getHtmlPrefix(), fileName);
if (text == null)
{
_log.info("Cannot find HTML file for " + Q10814_BefittingOfTheStatus.class.getSimpleName() + " Quest: " + fileName);
return null;
}
html.setHtml(text);
return html;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
htmltext = "30097-01.htm";
break;
}
case State.STARTED:
{
if ((qs.getCond() >= 1) && (qs.getCond() < 6))
{
htmltext = !isSimulated ? generateItemListHtml(player, npc) : null;
}
else if (qs.isCond(6))
{
htmltext = "30097-07.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
What did you bring for the first item?<br>
I hope you're not giving me something you've equipped!<br>
%itemList%
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
So far you brought <font color="LEVEL">%slot1%</font>. One item. What did you bring for the second?<br>
You can't bring the same item twice. And don't give me something you've equipped.<br>
%itemList%
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
So far you brought <font color="LEVEL">%slot1%</font>, and <font color="LEVEL">%slot2%</font>. Two items. What did you bring for the third?<br>
You can't bring the same item twice. And don't give me something you've equipped.<br>
%itemList%
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
So far you brought <font color="LEVEL">%slot1%</font>, <font color="LEVEL">%slot2%</font>, and <font color="LEVEL">%slot3%</font>. Three items. What did you bring for the fourth?<br>
You can't bring the same item twice. And don't give me something you've equipped.<br>
%itemList%
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
So far you brought <font color="LEVEL">%slot1%</font>, <font color="LEVEL">%slot2%</font>, <font color="LEVEL">%slot3%</font>, and <font color="LEVEL">%slot4%</font>. Four items. What did you bring for the last?<br>
You can't bring the same item twice. And don't give me something you've equipped.<br>
%itemList%
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
I got the first item. What do you want to do next?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus showItemList">"I got the next item."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus 30097-06.html">"I'm still looking for the next item."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
I got the second item as well. What do you want to do next?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus showItemList">"I got the next item."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus 30097-06.html">"I'm still looking for the next item."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
I got the third item as well. What do you want to do next?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus showItemList">"I got the next item."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus 30097-06.html">"I'm still looking for the next item."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Galladucci:<br>
I got the fourth item as well. What do you want to do next?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus showItemList">"I got the next item."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10814_BefittingOfTheStatus 30097-06.html">"I'm still looking for the next item."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Galladucci:<br>
You don't have what you said you brought! If you don't have it, I can't receive it!
</body></html>