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>Beast Herder Tunatun:<br>
There's nothing like a hard day's work that puts a man fast asleep at night. That is what I used to say. But I haven't been sleeping to well these past weeks.<br>
I worry about the future of this farm ever since those Sel Mahum started showing up.<br>
<a action="bypass -h Quest Q00278_HomeSecurity 31537-02.htm">Listen to his concern.</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Beast Herder Tunatun:<br>
Everyone knows that the best meat can only be found from the animals on this land. I've done all I can to keep them safe, but these Sel Mahum <font color="LEVEL">Farm Ravagers and Farm Bandits</font> are starting to be too much for me. In fact, I would be overwhelmed if they all attacked at once. There wouldn't be anything I could do to protect my life's work.<br>
When everything a man knows is threatened... how can he find his peace?<br>
<a action="bypass -h Quest Q00278_HomeSecurity 31537-04.htm">Offer to help.</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Beast Herder Tunatun:<br>
No. Never mind. I need a strong adventurer.<br>
(Only characters of level 82 and above are permitted to take on this quest.)
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Beast Herder Tunatun:<br>
Mighty kind of you. Tell you what... I'll pay you for killing those Sel Mahum <font color="LEVEL">Farm Ravagers or Farm Bandits</font> on my farm.<br>
I wish I could take your word for it, but I'm gonna need to see some proof before I pay you. Collect <font color="LEVEL">300</font> <font color="LEVEL">Sel Mahum Manes</font> and bring them back as proof.<br>
A word of warning though... some Sel Mahum can't grow Manes, so it might take you some time before you find one that does.<br>
Best of luck, stranger.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Beast Herder Tunatun:<br>
How goes it, stranger? Looks like you have a fine collection of Sel Mahum Manes going there.<br>
I'm a man of my word and I'll pay you rightly for yer work.<br>
<a action="bypass -h Quest Q00278_HomeSecurity 31537-07.html">Accept Reward</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Beast Herder Tunatun:<br>
That's it? Uhm... I was hoping for more.. Can you do better?
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Beast Herder Tunatun:<br>
I thank ya, stranger. Your help has definitely made a difference in my life. I even got a good night's sleep while you were helping out.<br>
If you are ever in need of some work, I am always willing pay until the very last one of those things are dead.
</body></html>

View File

@@ -0,0 +1,199 @@
/*
* 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.Q00278_HomeSecurity;
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;
/**
* Home Security (278)
* @author malyelfik
*/
public class Q00278_HomeSecurity extends Quest
{
// NPC
private static final int TUNATUN = 31537;
private static final int[] MONSTER =
{
18905,
18906,
18907
};
// Item
private static final int SEL_MAHUM_MANE = 15531;
// Misc
private static final int SEL_MAHUM_MANE_COUNT = 300;
public Q00278_HomeSecurity()
{
super(278, Q00278_HomeSecurity.class.getSimpleName(), "Home Security");
addStartNpc(TUNATUN);
addTalkId(TUNATUN);
addKillId(MONSTER);
registerQuestItems(SEL_MAHUM_MANE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
switch (event)
{
case "31537-02.htm":
{
htmltext = (player.getLevel() >= 82) ? "31537-02.htm" : "31537-03.html";
break;
}
case "31537-04.htm":
{
st.startQuest();
break;
}
case "31537-07.html":
{
int i0 = getRandom(100);
if (i0 < 10)
{
st.giveItems(960, 1);
}
else if (i0 < 19)
{
st.giveItems(960, 2);
}
else if (i0 < 27)
{
st.giveItems(960, 3);
}
else if (i0 < 34)
{
st.giveItems(960, 4);
}
else if (i0 < 40)
{
st.giveItems(960, 5);
}
else if (i0 < 45)
{
st.giveItems(960, 6);
}
else if (i0 < 49)
{
st.giveItems(960, 7);
}
else if (i0 < 52)
{
st.giveItems(960, 8);
}
else if (i0 < 54)
{
st.giveItems(960, 9);
}
else if (i0 < 55)
{
st.giveItems(960, 10);
}
else if (i0 < 75)
{
st.giveItems(9553, 1);
}
else if (i0 < 90)
{
st.giveItems(9553, 2);
}
else
{
st.giveItems(959, 1);
}
st.exitQuest(true, true);
htmltext = "31537-07.html";
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final QuestState st = getRandomPartyMemberState(player, 1, 3, npc);
if (st != null)
{
switch (npc.getId())
{
case 18905: // Farm Ravager (Crazy)
{
final int itemCount = ((getRandom(1000) < 486) ? getRandom(6) + 1 : getRandom(5) + 1);
if (st.giveItemRandomly(npc, SEL_MAHUM_MANE, itemCount, SEL_MAHUM_MANE_COUNT, 1.0, true))
{
st.setCond(2, true);
}
break;
}
case 18906: // Farm Bandit
case 18907: // Beast Devourer
{
if (st.giveItemRandomly(npc, SEL_MAHUM_MANE, 1, SEL_MAHUM_MANE_COUNT, 0.85, true))
{
st.setCond(2, true);
}
break;
}
}
}
return null;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
{
return htmltext;
}
if (st.isCreated())
{
htmltext = "31537-01.htm";
}
else if (st.isStarted())
{
if (st.isCond(1) || (getQuestItemsCount(player, SEL_MAHUM_MANE) < SEL_MAHUM_MANE_COUNT))
{
htmltext = "31537-06.html";
}
else if (st.isCond(2) && (getQuestItemsCount(player, SEL_MAHUM_MANE) >= SEL_MAHUM_MANE_COUNT))
{
htmltext = "31537-05.html";
}
}
return htmltext;
}
}