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,5 @@
<html><body>Warehouse Keeper Collob:<br>
Are you collecting <font color="LEVEL">Pirate's Treasure Chests</font>? Bring me one and I'll open it for you. All I ask is that you pay for making the key. <font color="LEVEL">It costs 600 adena.</font><br>
However, you should know that this chest carries a curse. <font color="LEVEL">You must be willing to risk receiving the curse. </font><br>
<a action="bypass -h Quest Q00365_DevilsLegacy REWARD">"Open the chest."</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Warehouse Keeper Collob:<br>
Hmm, you no longer have a chest. Please, go get one and come back.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Warehouse Keeper Collob:<br>
You don't have the adena needed to pay for the key.<br>
The key that will open the chest costs 600 adena.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Warehouse Keeper Collob:<br>
I'm afraid the curse is having an effect on me. Perhaps if I rest I'll feel better. I'm going to bed. Please come back later.<br>
Why don't you go to Devil's Isle and collect a few more Treasure Chests?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Warehouse Keeper Collob:<br>
The chest is open. Are you pleased with its contents?
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Warehouse Keeper Collob:<br>
The chest is open.<br>
Oh no!! The curse of the pirates! I can't move...!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Warehouse Keeper Collob:<br>
I'm afraid the curse is having an effect on me. Perhaps if I rest I'll feel better. I'm going to bed. Please come back later.<br>
Why don't you go to Devil's Isle and collect a few more Treasure Chests?
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Warehouse Keeper Randolf:<br>
Have you heard of the notorious Pirate Captain Zaken? His dogged pursuit of <font color="LEVEL">treasure</font> led him to a rocky island now called "Devil's Isle." His increasingly eccentric behavior caused him to lose the confidence of his crew, and they marooned him there.<br>
In despair, Zaken turned to the forces of darkness, who gave him the power to kill and imprison the souls of all of those who betrayed him. Even now, the souls of those damned warriors roam that barren place.<br>
I suppose you knew this already. But here is something you probably don't know... It is said that <font color="LEVEL">Zaken's treasure was stolen by his betrayers</font>, and they still have it! So what do you think? Will you help me find the treasure?<br>
<a action="bypass -h Quest Q00365_DevilsLegacy 30095-02.htm">"I will help."</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Warehouse Keeper Randolf:<br>
Good choice! We will both benefit from our arrangement...<br>
Go to <font color="LEVEL">Devil's Isle</font>, slay the <font color="LEVEL">pirate zombies and their captains</font>, collect their <font color="LEVEL">Treasure Chests</font> and bring them to me. You shall be well rewarded.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Warehouse Keeper Randolf:<br>
Have you heard of the notorious Pirate Captain Zaken? His dogged pursuit of <font color="LEVEL">treasure</font> led him to a rocky island now called "Devil's Isle." His increasingly eccentric behavior caused him to lose the confidence of his crew, and they marooned him there.<br>
In despair, Zaken turned to the forces of darkness, who gave him the power to kill and imprison the souls of all of those who betrayed him. Even now, the souls of those damned warriors roam that barren place.<br>
There is more you should know, but you are not yet ready.<br>
(This quest may only be undertaken by a character of level 39 or above.)
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Warehouse Keeper Randolf:<br>
Good job! You shall have your reward.<br>
I hope you don't feel that you've been cheated. Not all the chests hold treasure, but the key required to open them is very expensive. Not to mention the magical scroll I must buy to protect against the horrible pirate curse that these chests sometimes impart. Truly, I take a terrible risk each time I open one. This is not a highly profitable business.<br>
You should be happy to get your reward regardless of whether or not the chests hold treasure. I hope we can continue to do business together. Don't be fooled by <font color="LEVEL">Collob</font>. He will probably offer to open the chests for you. His lack of experience could lead to terrible consequences...<br>
<a action="bypass -h Quest Q00365_DevilsLegacy 30095-05.html">"I quit."</a><br>
<a action="bypass -h Quest Q00365_DevilsLegacy 30095-06.html">"I will continue to work with you."</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Warehouse Keeper Randolf:<br>
Oh, well... Too bad. You won't be easily replaced. I won't try to talk you out of it, you must have your own reasons.<br>
Perhaps we can work together again in the future.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Warehouse Keeper Randolf:<br>
Go to Devil's Isle, slay the pirate zombies and their captains, and bring back their Treasure Chests.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Warehouse Keeper Randolf:<br>
Go to <font color="LEVEL">Devil's Isle</font>, slay the <font color="LEVEL">pirate zombies and their captains</font>, collect their <font color="LEVEL">Treasure Chests </font> and bring them to me. You will be well rewarded.<br>
<a action="bypass -h Quest Q00365_DevilsLegacy 30095-05.html">"I quit."</a><br>
<a action="bypass -h Quest Q00365_DevilsLegacy 30095-06.html">"I will do it."</a>
</body></html>

View File

@@ -0,0 +1,257 @@
/*
* 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.Q00365_DevilsLegacy;
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.SkillHolder;
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
/**
* Devil's Legacy (365)
* @author Adry_85
*/
public final class Q00365_DevilsLegacy extends Quest
{
// NPCs
private static final int COLLOB = 30092;
private static final int RANDOLF = 30095;
// Item
private static final int PIRATES_TREASURE_CHEST = 5873;
// Rewards
private static final int ENCHANT_WEAPON_C = 951;
private static final int ENCHANT_ARMOR_C = 952;
private static final int ENCHANT_WEAPON_D = 955;
private static final int ENCHANT_ARMOR_D = 956;
private static final int THREAD = 1868;
private static final int ANIMAL_BONE = 1872;
private static final int COKES = 1879;
private static final int STEEL = 1880;
private static final int COARSE_BONE_POWDER = 1881;
private static final int LEATHER = 1882;
private static final int CORD = 1884;
// Misc
private static final int MIN_LEVEL = 39;
// Skill
private static SkillHolder POISON = new SkillHolder(4035, 2);
// Mobs
private static final Map<Integer, Double> MOBS = new HashMap<>();
static
{
MOBS.put(20836, 0.47); // pirates_zombie
MOBS.put(20845, 0.40); // pirates_zombie_captain
MOBS.put(21629, 0.40); // pirates_zombie_captain_1
MOBS.put(21630, 0.40); // pirates_zombie_captain_2
}
public Q00365_DevilsLegacy()
{
super(365, Q00365_DevilsLegacy.class.getSimpleName(), "Devil's Legacy");
addStartNpc(RANDOLF);
addTalkId(RANDOLF, COLLOB);
addKillId(MOBS.keySet());
registerQuestItems(PIRATES_TREASURE_CHEST);
}
@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 "30095-02.htm":
{
qs.startQuest();
qs.setMemoState(1);
htmltext = event;
break;
}
case "30095-05.html":
{
qs.exitQuest(true, true);
htmltext = event;
break;
}
case "30095-06.html":
{
htmltext = event;
break;
}
case "REWARD":
{
if (!qs.isMemoState(1))
{
htmltext = "30092-04.html";
}
else if (!hasQuestItems(player, PIRATES_TREASURE_CHEST))
{
htmltext = "30092-02.html";
}
else if (player.getAdena() < 600)
{
htmltext = "30092-03.html";
}
else
{
final int itemId;
final int chance;
if (getRandom(100) < 80)
{
chance = getRandom(100);
if (chance < 1)
{
itemId = ENCHANT_WEAPON_D;
}
else if (chance < 4)
{
itemId = ENCHANT_ARMOR_D;
}
else if (chance < 36)
{
itemId = THREAD;
}
else if (chance < 68)
{
itemId = CORD;
}
else
{
itemId = ANIMAL_BONE;
}
htmltext = "30092-05.html";
}
else
{
chance = getRandom(1000);
if (chance < 10)
{
itemId = ENCHANT_WEAPON_C;
}
else if (chance < 40)
{
itemId = ENCHANT_ARMOR_C;
}
else if (chance < 60)
{
itemId = ENCHANT_WEAPON_D;
}
else if (chance < 260)
{
itemId = ENCHANT_ARMOR_D;
}
else if (chance < 445)
{
itemId = COKES;
}
else if (chance < 630)
{
itemId = STEEL;
}
else if (chance < 815)
{
itemId = LEATHER;
}
else
{
itemId = COARSE_BONE_POWDER;
}
npc.setTarget(player);
npc.doCast(POISON.getSkill());
npc.setCurrentMp(npc.getMaxMp());
qs.setMemoState(2);
htmltext = "30092-06.html";
}
takeItems(player, PIRATES_TREASURE_CHEST, 1);
takeItems(player, Inventory.ADENA_ID, 600);
rewardItems(player, itemId, 1);
}
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(player, -1, 3, npc);
if (qs != null)
{
giveItemRandomly(qs.getPlayer(), npc, PIRATES_TREASURE_CHEST, 1, 0, MOBS.get(npc.getId()), true);
}
return super.onKill(npc, player, isSummon);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (qs == null)
{
return htmltext;
}
switch (npc.getId())
{
case RANDOLF:
{
if (qs.isCreated())
{
htmltext = ((player.getLevel() >= MIN_LEVEL) ? "30095-01.htm" : "30095-03.html");
}
else if (qs.isStarted())
{
if (hasQuestItems(player, PIRATES_TREASURE_CHEST))
{
final long chestCount = getQuestItemsCount(player, PIRATES_TREASURE_CHEST);
giveAdena(player, (chestCount * 400) + 19800, true);
takeItems(player, PIRATES_TREASURE_CHEST, -1);
htmltext = "30095-04.html";
}
else
{
htmltext = "30095-07.html";
}
}
break;
}
case COLLOB:
{
if (qs.isStarted())
{
htmltext = (qs.isMemoState(1) ? "30092-01.html" : "30092-07.html");
}
break;
}
}
return htmltext;
}
}