This commit is contained in:
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-01.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Aren't you the one that's always in the Dragon Valley? ... Or is this is the first time I've seen you? Ever since my soul has been ripped apart, my memories have become so vague.<br>
|
||||
Anyhow, I have something to ask you, so could you lend me your ears?<br>
|
||||
<a action="bypass -h Quest Q00455_WingsOfSand 32864-02.htm">Listen to its tale.</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-02.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Looking at you all running around here! You must be confident, but don't you want to help me get my revenge?<br>
|
||||
I'm asking if you can kill the Land Dragon Antharas.<br>
|
||||
<a action="bypass -h Quest Q00455_WingsOfSand 32864-03.htm">"Land Dragon Antharas?"</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-03.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-03.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Scared? Come now, I'd be embarassed if I was that easily shocked.<br>
|
||||
You really can't kill that Land Dragon?<br>
|
||||
<a action="bypass -h Quest Q00455_WingsOfSand 32864-04.htm">"Not alone!"</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-04.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-04.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
True, you have a point. How about this kind of favor? Gather up companions and as a revenge, kill his servants for me. Kill the cursed creatures called the <font color="LEVEL">Wings of Sand</font>.<br>
|
||||
Wouldn't Antharas be weakened if he loses servants? Maybe I can get my revenge some day...<br>
|
||||
<a action="bypass -h Quest Q00455_WingsOfSand 32864-05.htm">"Sure. Worth a go."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-05.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-05.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Go on then. Kill <font color="LEVEL">Emerald Horns, Dust Riders, Bleeding Flies, Black Dagger Wings, Shadow Summoners, Spike Slashers, and Muscle Bombers</font>.<br>
|
||||
You can bring back the <font color="LEVEL">Large Dragon Tooth</font>. One is good, two is better. I will reward you, now go show me your skills.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-06.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-06.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Go on then. Kill <font color="LEVEL">Emerald Horns, Dust Riders, Bleeding Flies, Black Dagger Wings, Shadow Summoners, Spike Slashers, and Muscle Bombers</font>.<br>
|
||||
You can bring back the <font color="LEVEL">Large Dragon Tooth</font>. One is good, two is better.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-07.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-07.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Yes take this. Thank you. I hope this weakens the army of Antharas and the day would come to avenge me someday...
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-08.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/32864-08.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
I barely remember anything, but I DO remember that you're the one who did me a favor.<br>
|
||||
Thank you!<br>
|
||||
(You can only do this quest once a day. This quest resets everyday at 6:30 am.)
|
||||
</body></html>
|
248
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/Q00455_WingsOfSand.java
vendored
Normal file
248
trunk/dist/game/data/scripts/quests/Q00455_WingsOfSand/Q00455_WingsOfSand.java
vendored
Normal file
@@ -0,0 +1,248 @@
|
||||
/*
|
||||
* 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.Q00455_WingsOfSand;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.enums.QuestType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Wings of Sand (455)
|
||||
* @author Zoey76
|
||||
*/
|
||||
public class Q00455_WingsOfSand extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int[] SEPARATED_SOULS =
|
||||
{
|
||||
32864,
|
||||
32865,
|
||||
32866,
|
||||
32867,
|
||||
32868,
|
||||
32869,
|
||||
32870,
|
||||
32891
|
||||
};
|
||||
// Monsters
|
||||
private static final int EMERALD_HORN = 25718;
|
||||
private static final int DUST_RIDER = 25719;
|
||||
private static final int BLEEDING_FLY = 25720;
|
||||
private static final int BLACK_DAGGER_WING = 25721;
|
||||
private static final int SHADOW_SUMMONER = 25722;
|
||||
private static final int SPIKE_SLASHER = 25723;
|
||||
private static final int MUSCLE_BOMBER = 25724;
|
||||
// Item
|
||||
private static final int LARGE_BABY_DRAGON = 17250;
|
||||
private static final List<Integer> ARMOR_PARTS = Arrays.asList(15660, 15661, 15662, 15663, 15664, 15665, 15666, 15667, 15668, 15669, 15670, 15671, 15672, 15673, 15674, 15675, 15691);
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 80;
|
||||
private static final int CHANCE = 350;
|
||||
|
||||
public Q00455_WingsOfSand()
|
||||
{
|
||||
super(455, Q00455_WingsOfSand.class.getSimpleName(), "Wings of Sand");
|
||||
addStartNpc(SEPARATED_SOULS);
|
||||
addTalkId(SEPARATED_SOULS);
|
||||
addKillId(EMERALD_HORN, DUST_RIDER, BLEEDING_FLY, BLACK_DAGGER_WING, SHADOW_SUMMONER, SPIKE_SLASHER, MUSCLE_BOMBER);
|
||||
registerQuestItems(LARGE_BABY_DRAGON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isSummon)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if ((st != null) && Util.checkIfInRange(1500, npc, player, false) && (getRandom(1000) < CHANCE))
|
||||
{
|
||||
st.giveItems(LARGE_BABY_DRAGON, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
if (st.getQuestItemsCount(LARGE_BABY_DRAGON) == 1)
|
||||
{
|
||||
st.setCond(2, true);
|
||||
}
|
||||
else if (st.getQuestItemsCount(LARGE_BABY_DRAGON) == 2)
|
||||
{
|
||||
st.setCond(3, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "32864-02.htm":
|
||||
case "32864-03.htm":
|
||||
case "32864-04.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32864-05.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
executeForEachPlayer(killer, npc, isSummon, true, false);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, true);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
htmltext = "32864-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (st.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = "32864-06.html";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
giveItems(st);
|
||||
htmltext = "32864-07.html";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
giveItems(st);
|
||||
htmltext = "32864-07.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (!st.isNowAvailable())
|
||||
{
|
||||
htmltext = "32864-08.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setState(State.CREATED);
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
htmltext = "32864-01.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reward the player.
|
||||
* @param st the quest state of the player to reward
|
||||
*/
|
||||
private static final void giveItems(QuestState st)
|
||||
{
|
||||
int chance;
|
||||
int parts;
|
||||
for (int i = 1; i <= (st.getCond() - 1); i++)
|
||||
{
|
||||
chance = getRandom(1000);
|
||||
parts = getRandom(1, 2);
|
||||
if (chance < 50)
|
||||
{
|
||||
st.giveItems(getRandom(15815, 15825), 1); // Weapon Recipes
|
||||
}
|
||||
else if (chance < 100)
|
||||
{
|
||||
st.giveItems(getRandom(15792, 15808), parts); // Armor Recipes
|
||||
}
|
||||
else if (chance < 150)
|
||||
{
|
||||
st.giveItems(getRandom(15809, 15811), parts); // Jewelry Recipes
|
||||
}
|
||||
else if (chance < 250)
|
||||
{
|
||||
st.giveItems(ARMOR_PARTS.get(getRandom(ARMOR_PARTS.size())), parts); // Armor Parts
|
||||
}
|
||||
else if (chance < 500)
|
||||
{
|
||||
st.giveItems(getRandom(15634, 15644), parts); // Weapon Parts
|
||||
}
|
||||
else if (chance < 750)
|
||||
{
|
||||
st.giveItems(getRandom(15769, 15771), parts); // Jewelry Parts
|
||||
}
|
||||
else if (chance < 900)
|
||||
{
|
||||
st.giveItems(getRandom(9552, 9557), 1); // Crystals
|
||||
}
|
||||
else if (chance < 970)
|
||||
{
|
||||
st.giveItems(6578, 1); // Blessed Scroll: Enchant Armor (S-Grade)
|
||||
}
|
||||
else
|
||||
{
|
||||
st.giveItems(6577, 1); // Blessed Scroll: Enchant Weapon (S-Grade)
|
||||
}
|
||||
}
|
||||
st.exitQuest(QuestType.DAILY, true);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user