This commit is contained in:
6
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-01.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-01.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Railroad Worker Obi:<br>
|
||||
This area has gone to hell lately! The security was never that great, but once there were merchants and warehouses, security guards and adventurers... But that was a long time ago....<br>
|
||||
Now they're all gone! All that's left is this old, worn-out railroad station and the Bandits who rob anyone foolish enough to come here!<br>
|
||||
How would you like a job?<br>
|
||||
<a action="bypass -h Quest Q00649_ALooterAndARailroadMan 32052-03.htm">Tell me more about the Bandits.</a>
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-02.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-02.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Railroad Worker Obi:<br>
|
||||
The Bandits around here are known as <font color="LEVEL">Rayito's Bandits</font>. They're not very strong but they're tenacious!<br>
|
||||
Honestly, friend, I don't think you're ready to take these fellows on!<br>
|
||||
Come back when you've had more experience.<br>
|
||||
(Characters must have achieved at least level 30 to undertake this quest.)
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-03.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Railroad Worker Obi:<br>
|
||||
The Bandits around these parts are known as <font color="LEVEL">Rayito's Bandits</font>. They're not very strong but they're tenacious like bugs at a picnic.<br>
|
||||
<br>They survive by hunting the wild beasts around here. They use the beasts' teeth to decorate themselves! Nasty! Bring me <font color="LEVEL">proof that you killed 200 Bandits</font> and I will give you reward.
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-04.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-04.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Railroad Worker Obi:<br>
|
||||
Do you have 200 proofs from the Bandits?<br>
|
||||
<a action="bypass -h Quest Q00649_ALooterAndARailroadMan 32052-06.html">Here they are.</a>
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-05.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-05.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Railroad Worker Obi:<br>
|
||||
Defeat the Bandits and bring me 200 proofs.
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-06.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/32052-06.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Railroad Worker Obi:<br>
|
||||
You brought 200 Bandit proofs. That's great!<br>
|
||||
We can rest easily for a while now.<br>
|
||||
Please accept this token of our gratitude. It's not much, but please accept it.
|
||||
</body></html>
|
||||
146
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/Q00649_ALooterAndARailroadMan.java
vendored
Normal file
146
trunk/dist/game/data/scripts/quests/Q00649_ALooterAndARailroadMan/Q00649_ALooterAndARailroadMan.java
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* 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.Q00649_ALooterAndARailroadMan;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
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;
|
||||
|
||||
/**
|
||||
* A Looter And A Railroad Man (649)
|
||||
* @author netvirus
|
||||
*/
|
||||
public final class Q00649_ALooterAndARailroadMan extends Quest
|
||||
{
|
||||
// Npc
|
||||
private static final int RAILMAN_OBI = 32052;
|
||||
// Item
|
||||
private static final int THIEF_GUILD_MARK = 8099;
|
||||
// Misc
|
||||
private static final int MIN_LVL = 30;
|
||||
// Monsters
|
||||
private static final Map<Integer, Integer> MONSTERS = new HashMap<>();
|
||||
|
||||
static
|
||||
{
|
||||
MONSTERS.put(22017, 529); // Bandit Sweeper
|
||||
MONSTERS.put(22018, 452); // Bandit Hound
|
||||
MONSTERS.put(22019, 606); // Bandit Watchman
|
||||
MONSTERS.put(22021, 615); // Bandit Undertaker
|
||||
MONSTERS.put(22022, 721); // Bandit Assassin
|
||||
MONSTERS.put(22023, 827); // Bandit Warrior
|
||||
MONSTERS.put(22024, 779); // Bandit Inspector
|
||||
MONSTERS.put(22026, 1000); // Bandit Captain
|
||||
}
|
||||
|
||||
public Q00649_ALooterAndARailroadMan()
|
||||
{
|
||||
super(649, Q00649_ALooterAndARailroadMan.class.getSimpleName(), "A Looter and a Railroad Man");
|
||||
addStartNpc(RAILMAN_OBI);
|
||||
addTalkId(RAILMAN_OBI);
|
||||
addKillId(MONSTERS.keySet());
|
||||
registerQuestItems(THIEF_GUILD_MARK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "32052-03.htm":
|
||||
{
|
||||
if (st.isCreated())
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "32052-06.html":
|
||||
{
|
||||
if (st.isCond(2) && st.hasQuestItems(THIEF_GUILD_MARK))
|
||||
{
|
||||
st.giveAdena(21698, true);
|
||||
st.exitQuest(true, true);
|
||||
htmltext = event;
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LVL) ? "32052-01.htm" : "32052-02.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = (st.getQuestItemsCount(THIEF_GUILD_MARK) == 200) ? "32052-04.html" : "32052-05.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState st = getQuestState(killer, false);
|
||||
if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false) && (getRandom(1000) < MONSTERS.get(npc.getId())))
|
||||
{
|
||||
st.giveItems(THIEF_GUILD_MARK, 1);
|
||||
if (st.getQuestItemsCount(THIEF_GUILD_MARK) == 200)
|
||||
{
|
||||
st.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user