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>Collector Gutenhagen:<br>
Machines need to continually evolve. The ones that don't are turned into toasters. The Horrifying Golem Army has definitely evolved, and they have the strength to show it. To keep up with them you need to keep practicing!<br>
(Only characters with level 70 and above are permitted to take on this quest.)<br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Collector Gutenhagen:<br>
Like animals, machines need to evolve. Evolve or become antiquities. The Horrifying Golem Army has gained considerable strength by adhering to this motto. And they are up to something lately. I was trying to find out what, but I have had zero success. The research and data collection is.. complicated...<br>
<a action="bypass -h Quest Q00463_IMustBeaGenius 32069-02.htm">Ask how to collect data.</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Collector Gutenhagen:<br>
It seems the Horrifying Golem Army sends different numbers every day. I'll need the logs of each Golem to understand more.<br>
Hmm... You look like someone who's dying for a chance to extract important data... What do you think? Extract some data for me?<br>
<a action="bypass -h Quest Q00463_IMustBeaGenius 32069-03.htm">Say that you will</a>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Collector Gutenhagen:<br>
Quite good. Now, listen carefully and take notes if you must.<br>
First, Golems send negative or positive numbers, but the numbers differ from each other.<br1>
Second, one Golem will send a random number betweenn 1~100, but the Golem that does this changes day by day.<br1>
Lastly, Golems exhaust their energy sending one final transmission before collapsing. We can get that log data if we watch carefully.<br>
<font color="LEVEL">Today's number is %num%</font>. Collect all the log numbers until you have a value that is equal to <font color="LEVEL">%num%, and bring it to me.</font> If you are as good as you say you are, you should be alright.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Collector Gutenhagen:<br>
The log value doesn't match today's number. Do you know what THIS MEANS!! Go back. Try harder. And keep getting data until the numbers match!<br>
<a action="bypass -h Quest Q00463_IMustBeaGenius 32069-05.htm">Check today's number again</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Collector Gutenhagen:<br>
I suppose people just sometimes forget VERY important things. <font color="LEVEL">Today's number is %num%.</font> Please remember.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Collector Gutenhagen:<br>
You did it! I never doubted you. Yes, I prepared something for you. Here, this is a device unlike any other. Activating this device will give you a boost of energy and raise your intelligence. Sometimes it malfunctions... but, uhm... There won't be any problems, so trust me!<br>
<a action="bypass -h Quest Q00463_IMustBeaGenius reward">Operate the device</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Collector Gutenhagen:<br>
Huh? You're smart but also full of doubt, aren't you? I can't believe that you have not operated my device yet. Don't you trust me?! Or do you doubt my device?! I will give you one more chance!<br>
<a action="bypass -h Quest Q00463_IMustBeaGenius reward">Operate the device.</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Collector Gutenhagen:<br>
Oh, there you are, ready for more? Well I'm still analyzing the data you've brought.<br>
(This quest can be completed only once a day. This quest resets everyday at 6:30 am.)
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Collector Gutenhagen:<br>
......Hm, hmm!!!<br>
Well, well, well. This is strange... I haven't seen this before, no effects... Did I give you the wrong thing? It's not likely...<br>
Would you collect the logs again tomorrow? I'm sure everything will be working fine tomorrow.<br>
I think...
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Collector Gutenhagen:<br>
Well, all's well that ends well! I'm surprised to see such a stable result. At this rate, I may be able to get a higher sale price.<br>
Hmm, hmm. By the way - why not come back tomorrow? I always welcome fresh mea- uhm, adventurers like you.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Collector Gutenhagen:<br>
Yee-HAW!! Success!!<br>
All those times I took a hammer to this thing, and it finally works!! We must do it again someday!!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Collector Gutenhagen:<br>
This is hard to believe!! You are the first to have this happen!! Don't you surge with wisdom? Aren't you teeming with uncontrollable energy?<br>
The result is amazing... Come back any day, I'll be ready.
</body></html>

View File

@@ -0,0 +1,251 @@
/*
* 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.Q00463_IMustBeaGenius;
import java.util.HashMap;
import java.util.Map;
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.network.NpcStringId;
import com.l2jserver.gameserver.network.clientpackets.Say2;
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
/**
* I Must Be a Genius (463)<br>
* @author Gnacik, malyelfik
* @version 2010-08-19 Based on Freya PTS
*/
public class Q00463_IMustBeaGenius extends Quest
{
private static class DropInfo
{
private final int _count;
private final int _chance;
public DropInfo(int count, int chance)
{
_count = count;
_chance = chance;
}
public int getCount()
{
return _count;
}
public int getSpecialChance()
{
return _chance;
}
}
// NPC
private static final int GUTENHAGEN = 32069;
// Items
private static final int CORPSE_LOG = 15510;
private static final int COLLECTION = 15511;
// Mobs
private static final Map<Integer, DropInfo> MOBS = new HashMap<>();
static
{
MOBS.put(22801, new DropInfo(5, 0));
MOBS.put(22802, new DropInfo(5, 0));
MOBS.put(22803, new DropInfo(5, 0));
MOBS.put(22804, new DropInfo(-2, 1));
MOBS.put(22805, new DropInfo(-2, 1));
MOBS.put(22806, new DropInfo(-2, 1));
MOBS.put(22807, new DropInfo(-1, -1));
MOBS.put(22809, new DropInfo(2, 2));
MOBS.put(22810, new DropInfo(-3, 3));
MOBS.put(22811, new DropInfo(3, -1));
MOBS.put(22812, new DropInfo(1, -1));
}
// Reward @formatter:off
private static final int[][] REWARD =
{
// exp, sp, html
{198725, 15892, 8},
{278216, 22249, 8},
{317961, 25427, 8},
{357706, 28606, 9},
{397451, 31784, 9},
{596176, 47677, 9},
{715411, 57212, 10},
{794901, 63569, 10},
{914137, 73104, 10},
{1192352, 95353, 11}
};
// Misc @formatter:on
private static final int MIN_LEVEL = 70;
public Q00463_IMustBeaGenius()
{
super(463, Q00463_IMustBeaGenius.class.getSimpleName(), "I Must Be a Genius");
addStartNpc(GUTENHAGEN);
addTalkId(GUTENHAGEN);
addKillId(MOBS.keySet());
registerQuestItems(COLLECTION, CORPSE_LOG);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
if (st == null)
{
return null;
}
String htmltext = event;
switch (event)
{
case "32069-03.htm":
st.startQuest();
int number = getRandom(51) + 550;
st.set("number", String.valueOf(number));
st.set("chance", String.valueOf(getRandom(4)));
htmltext = getHtm(player.getHtmlPrefix(), event).replace("%num%", String.valueOf(number));
break;
case "32069-05.htm":
htmltext = getHtm(player.getHtmlPrefix(), event).replace("%num%", st.get("number"));
break;
case "reward":
if (st.isCond(2))
{
int rnd = getRandom(REWARD.length);
String str = (REWARD[rnd][2] < 10) ? "0" + REWARD[rnd][2] : String.valueOf(REWARD[rnd][2]);
st.addExpAndSp(REWARD[rnd][0], REWARD[rnd][1]);
st.exitQuest(QuestType.DAILY, true);
htmltext = "32069-" + str + ".html";
}
break;
case "32069-02.htm":
break;
default:
htmltext = null;
break;
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final QuestState st = getQuestState(player, false);
if (st == null)
{
return super.onKill(npc, player, isSummon);
}
if (st.isCond(1))
{
boolean msg = false;
int number = MOBS.get(npc.getId()).getCount();
if (MOBS.get(npc.getId()).getSpecialChance() == st.getInt("chance"))
{
number = getRandom(100) + 1;
}
if (number > 0)
{
st.giveItems(CORPSE_LOG, number);
msg = true;
}
else if ((number < 0) && ((st.getQuestItemsCount(CORPSE_LOG) + number) > 0))
{
st.takeItems(CORPSE_LOG, Math.abs(number));
msg = true;
}
if (msg)
{
final NpcSay ns = new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getId(), NpcStringId.ATT_ATTACK_S1_RO_ROGUE_S2);
ns.addStringParameter(player.getName());
ns.addStringParameter(String.valueOf(number));
npc.broadcastPacket(ns);
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (st.getQuestItemsCount(CORPSE_LOG) == st.getInt("number"))
{
st.takeItems(CORPSE_LOG, -1);
st.giveItems(COLLECTION, 1);
st.setCond(2, true);
}
}
}
return super.onKill(npc, player, isSummon);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
{
return htmltext;
}
switch (st.getState())
{
case State.COMPLETED:
if (!st.isNowAvailable())
{
htmltext = "32069-07.htm";
break;
}
st.setState(State.CREATED);
case State.CREATED:
htmltext = (player.getLevel() >= MIN_LEVEL) ? "32069-01.htm" : "32069-00.htm";
break;
case State.STARTED:
if (st.isCond(1))
{
htmltext = "32069-04.html";
}
else
{
if (st.getInt("var") == 1)
{
htmltext = "32069-06a.html";
}
else
{
st.takeItems(COLLECTION, -1);
st.set("var", "1");
htmltext = "32069-06.html";
}
}
break;
}
return htmltext;
}
}