This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Vergara:<br>
I can't remember the last time I saw royalty! Sigh...<br>
(This quest may only be undertaken by a royal character of level 55 or above.)
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Head Blacksmith Vergara:<br>
I'm honored to finally meet royalty!<br>
The heavens at last have smiled upon me!<br>
As a royal, you must have many rare coins, am I right?<br>
You know, I have many rare items, too. Would you be interested in trading with me? All my products are guaranteed top-notch.<br>
<a action="bypass -h Quest Q00382_KailsMagicCoin 30687-03.htm">"I will trade with you."</a>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Head Blacksmith Vergara:<br>
Ah, yes! The forthrightness of a true royal!<br>
I'll get right to the point. Here is a list of the coins I want and what I have to offer in exchange. Being in the warehouse business, I've acquired many rare and precious items. I'm offering them to you at an exceptional price. Don't miss this great opportunity!<br>
<a action="bypass -h Quest Q00382_KailsMagicCoin 30687-04.htm">View the list.</a>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Head Blacksmith Vergara:<br>
I have many kinds of weapons. Take one or take them all!<br><br>
<a action="bypass -h npc_%objectId%_multisell 382">"I'm interested in recipe list."</a><br>
<a action="bypass -h Quest Q00382_KailsMagicCoin 30687-05.htm">"Where can I obtain Kail's Coins?"</a><br>
<a action="bypass -h Quest Q00382_KailsMagicCoin 30687-06.htm">"Tell me about the members of the coin collecting club." </a>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Head Blacksmith Vergara:<br>
You'll find Sorcerer Kail on the Forsaken Plains, and there you'll find the coins as well, likely in the possession of the filthy orcs that infest that place.<br>
You could also probably win some by gambling with other players...<br>
<a action="bypass -h Quest Q00382_KailsMagicCoin 30687-04.htm">Back</a>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Head Blacksmith Vergara:<br>
Although I've only just joined, I already know all of our members by heart!<br>
Let's see, there's<font color="LEVEL"> Magister Page</font> of the Magic Guild in Hunters Village,<font color="LEVEL"> Researcher Lorain</font>, who can be found near the entrance of Cruma Tower,<font color="LEVEL"> Warehouse Keeper Hagger</font> and<font color="LEVEL"> Guard Stan</font> of Oren Castle Town,<font color="LEVEL"> Blacksmith Duning</font> of Hunters Village,<font color="LEVEL"> Trader Ralford</font> under the Ivory Tower in Oren Castle Town,<font color="LEVEL"> Head Blacksmith Ferris</font> in Aden Castle Town,<font color="LEVEL"> Warehouse Keeper Collob</font> in Giran Castle Town, and... hmm, oh yes!<font color="LEVEL"> Grocer Pano</font> in the plaza of Floran Village!<br>
Impressive, eh? But oh so much more impressive now that we have a royal member such as you, my lord!<br>
<a action="bypass -h Quest Q00382_KailsMagicCoin 30687-04.htm">Back</a>
</body></html>

View File

@ -0,0 +1,137 @@
/*
* Copyright (C) 2004-2014 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 quests.Q00382_KailsMagicCoin;
import java.util.HashMap;
import java.util.Map;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.ItemChanceHolder;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.util.Util;
/**
* Kail's Magic Coin (382)
* @author Sdw, jurchicks
*/
public final class Q00382_KailsMagicCoin extends Quest
{
// NPCs
private static final int VERGARA = 30687;
// Monsters
private static final int FALLEN_ORC = 21017;
private static final int FALLEN_ORC_ARCHER = 21019;
private static final int FALLEN_ORC_SHAMAN = 21020;
private static final int FALLEN_ORC_CAPTAIN = 21022;
// Items
private static final int ROYAL_MEMBERSHIP = 5898;
private static final int KAILS_SILVER_BASILISK = 5961;
private static final int KAILS_GOLD_GOLEM = 5962;
private static final int KAILS_BLOOD_DRAGON = 5963;
// Drops
private static final double ORC_CAPTAIN_DROP_CHANCE = 0.069;
private static final Map<Integer, ItemChanceHolder> MONSTER_DROPS = new HashMap<>();
static
{
MONSTER_DROPS.put(FALLEN_ORC, new ItemChanceHolder(KAILS_SILVER_BASILISK, 0.073));
MONSTER_DROPS.put(FALLEN_ORC_ARCHER, new ItemChanceHolder(KAILS_GOLD_GOLEM, 0.075));
MONSTER_DROPS.put(FALLEN_ORC_SHAMAN, new ItemChanceHolder(KAILS_BLOOD_DRAGON, 0.073));
}
// Misc
private static final int MIN_LVL = 55;
public Q00382_KailsMagicCoin()
{
super(382, Q00382_KailsMagicCoin.class.getSimpleName(), "Kail's Magic Coin");
addStartNpc(VERGARA);
addTalkId(VERGARA);
addKillId(FALLEN_ORC, FALLEN_ORC_ARCHER, FALLEN_ORC_SHAMAN, FALLEN_ORC_CAPTAIN);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
String htmltext = null;
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "30386-03.htm":
{
if (qs.isCreated())
{
qs.startQuest();
htmltext = event;
}
break;
}
case "30386-05.htm":
case "30386-06.htm":
{
if (qs.isStarted())
{
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
if (qs.isCreated())
{
htmltext = (((talker.getLevel() >= MIN_LVL) && hasQuestItems(talker, ROYAL_MEMBERSHIP)) ? "30687-02.htm" : "30687-01.htm");
}
else if (qs.isStarted())
{
htmltext = "30687-04.htm";
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && hasQuestItems(killer, ROYAL_MEMBERSHIP) && Util.checkIfInRange(1500, npc, killer, true))
{
if (npc.getId() == FALLEN_ORC_CAPTAIN)
{
giveItemRandomly(killer, KAILS_SILVER_BASILISK + getRandom(3), 1, 0, ORC_CAPTAIN_DROP_CHANCE, true);
}
else
{
final ItemChanceHolder ih = MONSTER_DROPS.get(npc.getId());
giveItemRandomly(killer, ih.getId(), 1, 0, ih.getChance(), true);
}
}
return super.onKill(npc, killer, isSummon);
}
}