Addition of Hungry Horse event.
This commit is contained in:
parent
fff3ada61b
commit
274f028aed
11
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/34010-01.htm
vendored
Normal file
11
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/34010-01.htm
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<html><body>Galup:<br>
|
||||
What a strange place! Even my great clan is unknown here.<br>
|
||||
Aden, is it? Beh. All these dimensions twisting around... thanks to that, I fell while flying. And I lost all my carrots!<br>
|
||||
I was raised in a proud family, so I only eat organic. That means I have a hard time finding food...<br>
|
||||
Do you know if there are any carrots around? Organic, of course.<br>
|
||||
Or better yet, how about you bring me the carrots? I'll give you something nice in return!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse 34010-02.htm">"I brought 7 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots40">"I brought 40 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots4000">"I brought 4,000 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots40000">"I brought 40,000 carrots."</Button>
|
||||
</body></html>
|
7
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/34010-02.htm
vendored
Normal file
7
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/34010-02.htm
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<html><body>Galup:<br>
|
||||
You brought 7 carrots? Hmm.. I'm still hungry. Well, at least you got me some, so I'll give you the Abundant blessing. Pick the one you want.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse knight">"I want the Knight's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse warrior">"I want the Warrior's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse wizard">"I want the Wizard's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest HungryHorse 34010-01.htm">Back</Button>
|
||||
</body></html>
|
3
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/34010-03.htm
vendored
Normal file
3
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/34010-03.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Galup:<br>
|
||||
Huh? This isn't enough. Bring me more carrots.
|
||||
</body></html>
|
4
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/34010-04.htm
vendored
Normal file
4
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/34010-04.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Galup:<br>
|
||||
Thanks for gathering these carrots. By any chance, do you have any more?<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest HungryHorse 34010-01.htm">Back</Button>
|
||||
</body></html>
|
180
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/HungryHorse.java
vendored
Normal file
180
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/HungryHorse.java
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 events.HungryHorse;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
import com.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
|
||||
/**
|
||||
* Hungry Horse
|
||||
* @URL http://www.lineage2.com/en/news/events/hungry-horse-event-09192017.php
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class HungryHorse extends LongTimeEvent
|
||||
{
|
||||
// NPC
|
||||
private static final int GALUP = 34010;
|
||||
// Items
|
||||
private static final int CARROT = 40363;
|
||||
private static final int POUCH = 40365;
|
||||
// Skills
|
||||
private static final SkillHolder KNIGHT = new SkillHolder(15648, 1); // Knight's Harmony
|
||||
private static final SkillHolder WARRIOR = new SkillHolder(15649, 1); // Warrior's Harmony
|
||||
private static final SkillHolder WIZARD = new SkillHolder(15650, 1); // Wizard's Harmony
|
||||
private static final SkillHolder[] GROUP_BUFFS =
|
||||
{
|
||||
new SkillHolder(15642, 1), // Horn Melody
|
||||
new SkillHolder(15643, 1), // Drum Melody
|
||||
new SkillHolder(15644, 1), // Pipe Organ Melody
|
||||
new SkillHolder(15645, 1), // Guitar Melody
|
||||
new SkillHolder(15646, 1), // Harp Melody
|
||||
new SkillHolder(15647, 1), // Lute Melody
|
||||
new SkillHolder(15651, 1), // Prevailing Sonata
|
||||
new SkillHolder(15652, 1), // Daring Sonata
|
||||
new SkillHolder(15653, 1), // Refreshing Sonata
|
||||
};
|
||||
|
||||
private HungryHorse()
|
||||
{
|
||||
addStartNpc(GALUP);
|
||||
addFirstTalkId(GALUP);
|
||||
addTalkId(GALUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "34010-01.htm":
|
||||
case "34010-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "knight":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, KNIGHT.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "warrior":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, WARRIOR.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "wizard":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, WIZARD.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots40":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 40)
|
||||
{
|
||||
takeItems(player, CARROT, 40);
|
||||
giveItems(player, POUCH, 1);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots4000":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 4000)
|
||||
{
|
||||
takeItems(player, CARROT, 4000);
|
||||
giveItems(player, POUCH, 100);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots40000":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 40000)
|
||||
{
|
||||
takeItems(player, CARROT, 40000);
|
||||
giveItems(player, POUCH, 1000);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return npc.getId() + "-01.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HungryHorse();
|
||||
}
|
||||
}
|
26
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/config.xml
vendored
Normal file
26
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HungryHorse/config.xml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<event name="Hungry Horse" active="23 09 2017-18 10 2017" enableShrines="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
|
||||
<droplist>
|
||||
<add item="40363" min="1" max="1" chance="3%" /> <!-- Carrot -->
|
||||
</droplist>
|
||||
<spawnlist>
|
||||
<add npc="34010" x="-14143" y="123176" z="-3096" heading="30212" /> <!-- Gludio -->
|
||||
<add npc="34010" x="16354" y="142848" z="-2680" heading="14450" /> <!-- Dion -->
|
||||
<add npc="34010" x="80814" y="147987" z="-3448" heading="3355" /> <!-- Giran -->
|
||||
<add npc="34010" x="82008" y="53874" z="-1472" heading="3355" /> <!-- Oren -->
|
||||
<add npc="34010" x="147457" y="27863" z="-2248" heading="17863" /> <!-- Aden -->
|
||||
<add npc="34010" x="112172" y="220447" z="-3648" heading="30708" /> <!-- Heine -->
|
||||
<add npc="34010" x="148195" y="-57368" z="-2752" heading="17863" /> <!-- Goddard -->
|
||||
<add npc="34010" x="44530" y="-48368" z="-776" heading="14450" /> <!-- Rune -->
|
||||
<add npc="34010" x="86897" y="-141346" z="-1320" heading="49153" /> <!-- Shutgard -->
|
||||
<add npc="34010" x="-114822" y="256385" z="-1472" heading="49744" /> <!-- Talking Island -->
|
||||
<add npc="34010" x="-78832" y="249115" z="-3272" heading="56380" /> <!-- Faeron Village -->
|
||||
<add npc="34010" x="-80485" y="149537" z="-3016" heading="16383" /> <!-- Gluddin -->
|
||||
<add npc="34010" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
|
||||
<add npc="34010" x="208499" y="87743" z="-1006" heading="11264" /> <!-- Arcan -->
|
||||
</spawnlist>
|
||||
<messages>
|
||||
<add type="onEnd" text="Hungry Horse: Event end!" />
|
||||
<add type="onEnter" text="Hungry Horse: Event ongoing!" />
|
||||
</messages>
|
||||
</event>
|
11
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/34010-01.htm
vendored
Normal file
11
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/34010-01.htm
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<html><body>Galup:<br>
|
||||
What a strange place! Even my great clan is unknown here.<br>
|
||||
Aden, is it? Beh. All these dimensions twisting around... thanks to that, I fell while flying. And I lost all my carrots!<br>
|
||||
I was raised in a proud family, so I only eat organic. That means I have a hard time finding food...<br>
|
||||
Do you know if there are any carrots around? Organic, of course.<br>
|
||||
Or better yet, how about you bring me the carrots? I'll give you something nice in return!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse 34010-02.htm">"I brought 7 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots40">"I brought 40 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots4000">"I brought 4,000 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots40000">"I brought 40,000 carrots."</Button>
|
||||
</body></html>
|
7
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/34010-02.htm
vendored
Normal file
7
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/34010-02.htm
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<html><body>Galup:<br>
|
||||
You brought 7 carrots? Hmm.. I'm still hungry. Well, at least you got me some, so I'll give you the Abundant blessing. Pick the one you want.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse knight">"I want the Knight's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse warrior">"I want the Warrior's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse wizard">"I want the Wizard's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest HungryHorse 34010-01.htm">Back</Button>
|
||||
</body></html>
|
3
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/34010-03.htm
vendored
Normal file
3
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/34010-03.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Galup:<br>
|
||||
Huh? This isn't enough. Bring me more carrots.
|
||||
</body></html>
|
4
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/34010-04.htm
vendored
Normal file
4
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/34010-04.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Galup:<br>
|
||||
Thanks for gathering these carrots. By any chance, do you have any more?<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest HungryHorse 34010-01.htm">Back</Button>
|
||||
</body></html>
|
180
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/HungryHorse.java
vendored
Normal file
180
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/HungryHorse.java
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 events.HungryHorse;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
import com.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
|
||||
/**
|
||||
* Hungry Horse
|
||||
* @URL http://www.lineage2.com/en/news/events/hungry-horse-event-09192017.php
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class HungryHorse extends LongTimeEvent
|
||||
{
|
||||
// NPC
|
||||
private static final int GALUP = 34010;
|
||||
// Items
|
||||
private static final int CARROT = 40363;
|
||||
private static final int POUCH = 40365;
|
||||
// Skills
|
||||
private static final SkillHolder KNIGHT = new SkillHolder(15648, 1); // Knight's Harmony
|
||||
private static final SkillHolder WARRIOR = new SkillHolder(15649, 1); // Warrior's Harmony
|
||||
private static final SkillHolder WIZARD = new SkillHolder(15650, 1); // Wizard's Harmony
|
||||
private static final SkillHolder[] GROUP_BUFFS =
|
||||
{
|
||||
new SkillHolder(15642, 1), // Horn Melody
|
||||
new SkillHolder(15643, 1), // Drum Melody
|
||||
new SkillHolder(15644, 1), // Pipe Organ Melody
|
||||
new SkillHolder(15645, 1), // Guitar Melody
|
||||
new SkillHolder(15646, 1), // Harp Melody
|
||||
new SkillHolder(15647, 1), // Lute Melody
|
||||
new SkillHolder(15651, 1), // Prevailing Sonata
|
||||
new SkillHolder(15652, 1), // Daring Sonata
|
||||
new SkillHolder(15653, 1), // Refreshing Sonata
|
||||
};
|
||||
|
||||
private HungryHorse()
|
||||
{
|
||||
addStartNpc(GALUP);
|
||||
addFirstTalkId(GALUP);
|
||||
addTalkId(GALUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "34010-01.htm":
|
||||
case "34010-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "knight":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, KNIGHT.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "warrior":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, WARRIOR.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "wizard":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, WIZARD.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots40":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 40)
|
||||
{
|
||||
takeItems(player, CARROT, 40);
|
||||
giveItems(player, POUCH, 1);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots4000":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 4000)
|
||||
{
|
||||
takeItems(player, CARROT, 4000);
|
||||
giveItems(player, POUCH, 100);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots40000":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 40000)
|
||||
{
|
||||
takeItems(player, CARROT, 40000);
|
||||
giveItems(player, POUCH, 1000);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return npc.getId() + "-01.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HungryHorse();
|
||||
}
|
||||
}
|
26
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/config.xml
vendored
Normal file
26
L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/HungryHorse/config.xml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<event name="Hungry Horse" active="23 09 2017-18 10 2017" enableShrines="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
|
||||
<droplist>
|
||||
<add item="40363" min="1" max="1" chance="3%" /> <!-- Carrot -->
|
||||
</droplist>
|
||||
<spawnlist>
|
||||
<add npc="34010" x="-14143" y="123176" z="-3096" heading="30212" /> <!-- Gludio -->
|
||||
<add npc="34010" x="16354" y="142848" z="-2680" heading="14450" /> <!-- Dion -->
|
||||
<add npc="34010" x="80814" y="147987" z="-3448" heading="3355" /> <!-- Giran -->
|
||||
<add npc="34010" x="82008" y="53874" z="-1472" heading="3355" /> <!-- Oren -->
|
||||
<add npc="34010" x="147457" y="27863" z="-2248" heading="17863" /> <!-- Aden -->
|
||||
<add npc="34010" x="112172" y="220447" z="-3648" heading="30708" /> <!-- Heine -->
|
||||
<add npc="34010" x="148195" y="-57368" z="-2752" heading="17863" /> <!-- Goddard -->
|
||||
<add npc="34010" x="44530" y="-48368" z="-776" heading="14450" /> <!-- Rune -->
|
||||
<add npc="34010" x="86897" y="-141346" z="-1320" heading="49153" /> <!-- Shutgard -->
|
||||
<add npc="34010" x="-114822" y="256385" z="-1472" heading="49744" /> <!-- Talking Island -->
|
||||
<add npc="34010" x="-78832" y="249115" z="-3272" heading="56380" /> <!-- Faeron Village -->
|
||||
<add npc="34010" x="-80485" y="149537" z="-3016" heading="16383" /> <!-- Gluddin -->
|
||||
<add npc="34010" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
|
||||
<add npc="34010" x="208499" y="87743" z="-1006" heading="11264" /> <!-- Arcan -->
|
||||
</spawnlist>
|
||||
<messages>
|
||||
<add type="onEnd" text="Hungry Horse: Event end!" />
|
||||
<add type="onEnter" text="Hungry Horse: Event ongoing!" />
|
||||
</messages>
|
||||
</event>
|
11
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/34010-01.htm
vendored
Normal file
11
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/34010-01.htm
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<html><body>Galup:<br>
|
||||
What a strange place! Even my great clan is unknown here.<br>
|
||||
Aden, is it? Beh. All these dimensions twisting around... thanks to that, I fell while flying. And I lost all my carrots!<br>
|
||||
I was raised in a proud family, so I only eat organic. That means I have a hard time finding food...<br>
|
||||
Do you know if there are any carrots around? Organic, of course.<br>
|
||||
Or better yet, how about you bring me the carrots? I'll give you something nice in return!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse 34010-02.htm">"I brought 7 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots40">"I brought 40 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots4000">"I brought 4,000 carrots."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse giveCarrots40000">"I brought 40,000 carrots."</Button>
|
||||
</body></html>
|
7
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/34010-02.htm
vendored
Normal file
7
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/34010-02.htm
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<html><body>Galup:<br>
|
||||
You brought 7 carrots? Hmm.. I'm still hungry. Well, at least you got me some, so I'll give you the Abundant blessing. Pick the one you want.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse knight">"I want the Knight's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse warrior">"I want the Warrior's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HungryHorse wizard">"I want the Wizard's Adundant Blessing."</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest HungryHorse 34010-01.htm">Back</Button>
|
||||
</body></html>
|
3
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/34010-03.htm
vendored
Normal file
3
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/34010-03.htm
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<html><body>Galup:<br>
|
||||
Huh? This isn't enough. Bring me more carrots.
|
||||
</body></html>
|
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/34010-04.htm
vendored
Normal file
4
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/34010-04.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><body>Galup:<br>
|
||||
Thanks for gathering these carrots. By any chance, do you have any more?<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest HungryHorse 34010-01.htm">Back</Button>
|
||||
</body></html>
|
180
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/HungryHorse.java
vendored
Normal file
180
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/HungryHorse.java
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 events.HungryHorse;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
import com.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
|
||||
/**
|
||||
* Hungry Horse
|
||||
* @URL http://www.lineage2.com/en/news/events/hungry-horse-event-09192017.php
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class HungryHorse extends LongTimeEvent
|
||||
{
|
||||
// NPC
|
||||
private static final int GALUP = 34010;
|
||||
// Items
|
||||
private static final int CARROT = 40363;
|
||||
private static final int POUCH = 40365;
|
||||
// Skills
|
||||
private static final SkillHolder KNIGHT = new SkillHolder(15648, 1); // Knight's Harmony
|
||||
private static final SkillHolder WARRIOR = new SkillHolder(15649, 1); // Warrior's Harmony
|
||||
private static final SkillHolder WIZARD = new SkillHolder(15650, 1); // Wizard's Harmony
|
||||
private static final SkillHolder[] GROUP_BUFFS =
|
||||
{
|
||||
new SkillHolder(15642, 1), // Horn Melody
|
||||
new SkillHolder(15643, 1), // Drum Melody
|
||||
new SkillHolder(15644, 1), // Pipe Organ Melody
|
||||
new SkillHolder(15645, 1), // Guitar Melody
|
||||
new SkillHolder(15646, 1), // Harp Melody
|
||||
new SkillHolder(15647, 1), // Lute Melody
|
||||
new SkillHolder(15651, 1), // Prevailing Sonata
|
||||
new SkillHolder(15652, 1), // Daring Sonata
|
||||
new SkillHolder(15653, 1), // Refreshing Sonata
|
||||
};
|
||||
|
||||
private HungryHorse()
|
||||
{
|
||||
addStartNpc(GALUP);
|
||||
addFirstTalkId(GALUP);
|
||||
addTalkId(GALUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "34010-01.htm":
|
||||
case "34010-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "knight":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, KNIGHT.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "warrior":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, WARRIOR.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "wizard":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 7)
|
||||
{
|
||||
takeItems(player, CARROT, 7);
|
||||
for (SkillHolder holder : GROUP_BUFFS)
|
||||
{
|
||||
SkillCaster.triggerCast(npc, player, holder.getSkill());
|
||||
}
|
||||
SkillCaster.triggerCast(npc, player, WIZARD.getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots40":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 40)
|
||||
{
|
||||
takeItems(player, CARROT, 40);
|
||||
giveItems(player, POUCH, 1);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots4000":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 4000)
|
||||
{
|
||||
takeItems(player, CARROT, 4000);
|
||||
giveItems(player, POUCH, 100);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "giveCarrots40000":
|
||||
{
|
||||
if (getQuestItemsCount(player, CARROT) >= 40000)
|
||||
{
|
||||
takeItems(player, CARROT, 40000);
|
||||
giveItems(player, POUCH, 1000);
|
||||
htmltext = "34010-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "34010-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return npc.getId() + "-01.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HungryHorse();
|
||||
}
|
||||
}
|
26
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/config.xml
vendored
Normal file
26
L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/HungryHorse/config.xml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<event name="Hungry Horse" active="23 09 2017-18 10 2017" enableShrines="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
|
||||
<droplist>
|
||||
<add item="40363" min="1" max="1" chance="3%" /> <!-- Carrot -->
|
||||
</droplist>
|
||||
<spawnlist>
|
||||
<add npc="34010" x="-14143" y="123176" z="-3096" heading="30212" /> <!-- Gludio -->
|
||||
<add npc="34010" x="16354" y="142848" z="-2680" heading="14450" /> <!-- Dion -->
|
||||
<add npc="34010" x="80814" y="147987" z="-3448" heading="3355" /> <!-- Giran -->
|
||||
<add npc="34010" x="82008" y="53874" z="-1472" heading="3355" /> <!-- Oren -->
|
||||
<add npc="34010" x="147457" y="27863" z="-2248" heading="17863" /> <!-- Aden -->
|
||||
<add npc="34010" x="112172" y="220447" z="-3648" heading="30708" /> <!-- Heine -->
|
||||
<add npc="34010" x="148195" y="-57368" z="-2752" heading="17863" /> <!-- Goddard -->
|
||||
<add npc="34010" x="44530" y="-48368" z="-776" heading="14450" /> <!-- Rune -->
|
||||
<add npc="34010" x="86897" y="-141346" z="-1320" heading="49153" /> <!-- Shutgard -->
|
||||
<add npc="34010" x="-114822" y="256385" z="-1472" heading="49744" /> <!-- Talking Island -->
|
||||
<add npc="34010" x="-78832" y="249115" z="-3272" heading="56380" /> <!-- Faeron Village -->
|
||||
<add npc="34010" x="-80485" y="149537" z="-3016" heading="16383" /> <!-- Gluddin -->
|
||||
<add npc="34010" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
|
||||
<add npc="34010" x="208499" y="87743" z="-1006" heading="11264" /> <!-- Arcan -->
|
||||
</spawnlist>
|
||||
<messages>
|
||||
<add type="onEnd" text="Hungry Horse: Event end!" />
|
||||
<add type="onEnter" text="Hungry Horse: Event ongoing!" />
|
||||
</messages>
|
||||
</event>
|
Loading…
Reference in New Issue
Block a user