Removal of Happy Hours event.
This commit is contained in:
parent
42f263443f
commit
d96cc7075a
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Balthus Knight's Supply Box is a special item prepared by Duke Balthus Van Dyke for the Bathus Knights to alleviate their hardship.<br>
|
||||
Can I really supply for the great warrior <font color="LEVEL">Lemniscate</font>? <font color="LEVEL">Balthus Knight's Supply Box</font> can only be obtained by <font color="LEVEL">one character Lv.20 and above per account.</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HappyHours giveSupplyBox">"Please give me the Balthus Knight's Supply Box."</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Augh! You're not a Balthus Knight! How come you had the crust to pretend being one!<br>
|
||||
Well then, I forgive you this time. But if you try again to pass as ab Balthus Knight, you won't get away with that!<br>
|
||||
(Supplies are given once a day, one piece per one account of a character who reached Level 20.)<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Hello! Do you know that greed comes before a fall?<br1>
|
||||
You have already received your Supply Box, that's enough for you!<br>
|
||||
Open your inventory, probably the box is there.<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,13 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
My name is Sibi, I am Balthus Knight's Supply Officer. The Lord of Oren Castle, Balthus Van Dyke, entrusted me with an important mission. Come to me whenever you need supplies for your missions.<br>
|
||||
Besides, if you have <font color="LEVEL">Sibi's Coins</font>, I can exchange them for useful consumables and some special rewards!<br>
|
||||
When event ends the following items will be deleted:<br1>
|
||||
-Sibi's Coin<br1>
|
||||
-Balthus Knight's Mark<br1>
|
||||
-Balthus Knight's Supply Box<br1>
|
||||
-Sibi's Coin Box<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HappyHours 34262-1.htm">"What is the Balthus Knights Supply Box?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426200">"I want to exchange Sibi's Coins for consumables."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426201">"I want to get an Infinite Arrow Quiver."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426202">"I want to get some special reward."</Button>
|
||||
</body></html>
|
@ -1,126 +0,0 @@
|
||||
/*
|
||||
* 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.HappyHours;
|
||||
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class HappyHours extends LongTimeEvent
|
||||
{
|
||||
// NPC
|
||||
private static final int SIBI = 34262;
|
||||
// Items
|
||||
private static final int SUPPLY_BOX = 47399;
|
||||
private static final int SIBIS_COIN = 49783;
|
||||
// Skill
|
||||
private static final int TRANSFORMATION_SKILL = 39171;
|
||||
// Other
|
||||
private static final int MIN_LEVEL = 20;
|
||||
private static final int REWARD_INTERVAL = 60 * 60 * 1000; // 1 hour
|
||||
private static long _lastRewardTime = Chronos.currentTimeMillis();
|
||||
|
||||
private HappyHours()
|
||||
{
|
||||
addStartNpc(SIBI);
|
||||
addFirstTalkId(SIBI);
|
||||
addTalkId(SIBI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "34262-1.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "giveSupplyBox":
|
||||
{
|
||||
if (player.getLevel() < MIN_LEVEL)
|
||||
{
|
||||
return "34262-2.htm";
|
||||
}
|
||||
if (ownsAtLeastOneItem(player, SUPPLY_BOX))
|
||||
{
|
||||
return "34262-3.htm";
|
||||
}
|
||||
giveItems(player, SUPPLY_BOX, 1);
|
||||
break;
|
||||
}
|
||||
case "REWARD_SIBI_COINS":
|
||||
{
|
||||
if (isEventPeriod())
|
||||
{
|
||||
if ((Chronos.currentTimeMillis() - (_lastRewardTime + REWARD_INTERVAL)) > 0) // Exploit check - Just in case.
|
||||
{
|
||||
_lastRewardTime = Chronos.currentTimeMillis();
|
||||
final ExShowScreenMessage screenMsg = new ExShowScreenMessage("You obtained 20 Sibi's coins.", ExShowScreenMessage.TOP_CENTER, 7000, 0, true, true);
|
||||
final SystemMessage systemMsg = new SystemMessage(SystemMessageId.YOU_VE_OBTAINED_S1_LUCKY_COINS);
|
||||
systemMsg.addInt(20);
|
||||
for (Player plr : World.getInstance().getPlayers())
|
||||
{
|
||||
if ((plr != null) && (plr.isOnlineInt() == 1) && plr.isAffectedBySkill(TRANSFORMATION_SKILL))
|
||||
{
|
||||
plr.addItem("HappyHours", SIBIS_COIN, 20, player, false);
|
||||
plr.sendPacket(screenMsg);
|
||||
plr.sendPacket(systemMsg);
|
||||
// TODO: Random reward.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelQuestTimers("REWARD_SIBI_COINS");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, Player player)
|
||||
{
|
||||
return "34262.htm";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void startEvent()
|
||||
{
|
||||
super.startEvent();
|
||||
cancelQuestTimers("REWARD_SIBI_COINS");
|
||||
startQuestTimer("REWARD_SIBI_COINS", REWARD_INTERVAL + 1000, null, null, true);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HappyHours();
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<event name="Happy Hours" active="05 09 2017-03 10 2017" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
|
||||
<spawnlist>
|
||||
<add npc="34262" x="-14143" y="123176" z="-3096" heading="30212" /> <!-- Gludio -->
|
||||
<add npc="34262" x="16354" y="142848" z="-2680" heading="14450" /> <!-- Dion -->
|
||||
<add npc="34262" x="80814" y="147987" z="-3448" heading="3355" /> <!-- Giran -->
|
||||
<add npc="34262" x="82008" y="53874" z="-1472" heading="3355" /> <!-- Oren -->
|
||||
<add npc="34262" x="147457" y="27863" z="-2248" heading="17863" /> <!-- Aden -->
|
||||
<add npc="34262" x="112172" y="220447" z="-3648" heading="30708" /> <!-- Heine -->
|
||||
<add npc="34262" x="148195" y="-57368" z="-2752" heading="17863" /> <!-- Goddard -->
|
||||
<add npc="34262" x="44530" y="-48368" z="-776" heading="14450" /> <!-- Rune -->
|
||||
<add npc="34262" x="86897" y="-141346" z="-1320" heading="49153" /> <!-- Shutgard -->
|
||||
<add npc="34262" x="-114822" y="256385" z="-1472" heading="49744" /> <!-- Talking Island -->
|
||||
<add npc="34262" x="-78832" y="249115" z="-3272" heading="56380" /> <!-- Faeron Village -->
|
||||
<add npc="34262" x="-80485" y="149537" z="-3016" heading="16383" /> <!-- Gluddin -->
|
||||
<add npc="34262" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
|
||||
<add npc="34262" x="208499" y="87743" z="-1006" heading="11264" /> <!-- Arcan -->
|
||||
</spawnlist>
|
||||
<destroyItemsOnEnd>
|
||||
<item id="49783" /> <!-- Sibi's Coin -->
|
||||
<item id="47385" /> <!-- Balthus Knight Mark -->
|
||||
<item id="47387" /> <!-- Balthus Knight Supply Box -->
|
||||
<item id="47399" /> <!-- Sibi's Coin Box -->
|
||||
</destroyItemsOnEnd>
|
||||
<messages>
|
||||
<add type="onEnd" text="Happy Hours: Event end!" />
|
||||
<add type="onEnter" text="Happy Hours: Event ongoing!" />
|
||||
</messages>
|
||||
</event>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Balthus Knight's Supply Box is a special item prepared by Duke Balthus Van Dyke for the Bathus Knights to alleviate their hardship.<br>
|
||||
Can I really supply for the great warrior <font color="LEVEL">Lemniscate</font>? <font color="LEVEL">Balthus Knight's Supply Box</font> can only be obtained by <font color="LEVEL">one character Lv.20 and above per account.</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HappyHours giveSupplyBox">"Please give me the Balthus Knight's Supply Box."</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Augh! You're not a Balthus Knight! How come you had the crust to pretend being one!<br>
|
||||
Well then, I forgive you this time. But if you try again to pass as ab Balthus Knight, you won't get away with that!<br>
|
||||
(Supplies are given once a day, one piece per one account of a character who reached Level 20.)<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Hello! Do you know that greed comes before a fall?<br1>
|
||||
You have already received your Supply Box, that's enough for you!<br>
|
||||
Open your inventory, probably the box is there.<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,13 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
My name is Sibi, I am Balthus Knight's Supply Officer. The Lord of Oren Castle, Balthus Van Dyke, entrusted me with an important mission. Come to me whenever you need supplies for your missions.<br>
|
||||
Besides, if you have <font color="LEVEL">Sibi's Coins</font>, I can exchange them for useful consumables and some special rewards!<br>
|
||||
When event ends the following items will be deleted:<br1>
|
||||
-Sibi's Coin<br1>
|
||||
-Balthus Knight's Mark<br1>
|
||||
-Balthus Knight's Supply Box<br1>
|
||||
-Sibi's Coin Box<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HappyHours 34262-1.htm">"What is the Balthus Knights Supply Box?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426200">"I want to exchange Sibi's Coins for consumables."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426201">"I want to get an Infinite Arrow Quiver."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426202">"I want to get some special reward."</Button>
|
||||
</body></html>
|
@ -1,126 +0,0 @@
|
||||
/*
|
||||
* 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.HappyHours;
|
||||
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class HappyHours extends LongTimeEvent
|
||||
{
|
||||
// NPC
|
||||
private static final int SIBI = 34262;
|
||||
// Items
|
||||
private static final int SUPPLY_BOX = 47399;
|
||||
private static final int SIBIS_COIN = 49783;
|
||||
// Skill
|
||||
private static final int TRANSFORMATION_SKILL = 39171;
|
||||
// Other
|
||||
private static final int MIN_LEVEL = 20;
|
||||
private static final int REWARD_INTERVAL = 60 * 60 * 1000; // 1 hour
|
||||
private static long _lastRewardTime = Chronos.currentTimeMillis();
|
||||
|
||||
private HappyHours()
|
||||
{
|
||||
addStartNpc(SIBI);
|
||||
addFirstTalkId(SIBI);
|
||||
addTalkId(SIBI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "34262-1.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "giveSupplyBox":
|
||||
{
|
||||
if (player.getLevel() < MIN_LEVEL)
|
||||
{
|
||||
return "34262-2.htm";
|
||||
}
|
||||
if (ownsAtLeastOneItem(player, SUPPLY_BOX))
|
||||
{
|
||||
return "34262-3.htm";
|
||||
}
|
||||
giveItems(player, SUPPLY_BOX, 1);
|
||||
break;
|
||||
}
|
||||
case "REWARD_SIBI_COINS":
|
||||
{
|
||||
if (isEventPeriod())
|
||||
{
|
||||
if ((Chronos.currentTimeMillis() - (_lastRewardTime + REWARD_INTERVAL)) > 0) // Exploit check - Just in case.
|
||||
{
|
||||
_lastRewardTime = Chronos.currentTimeMillis();
|
||||
final ExShowScreenMessage screenMsg = new ExShowScreenMessage("You obtained 20 Sibi's coins.", ExShowScreenMessage.TOP_CENTER, 7000, 0, true, true);
|
||||
final SystemMessage systemMsg = new SystemMessage(SystemMessageId.YOU_VE_OBTAINED_S1_FAIRY_S_LUCKY_COINS);
|
||||
systemMsg.addInt(20);
|
||||
for (Player plr : World.getInstance().getPlayers())
|
||||
{
|
||||
if ((plr != null) && (plr.isOnlineInt() == 1) && plr.isAffectedBySkill(TRANSFORMATION_SKILL))
|
||||
{
|
||||
plr.addItem("HappyHours", SIBIS_COIN, 20, player, false);
|
||||
plr.sendPacket(screenMsg);
|
||||
plr.sendPacket(systemMsg);
|
||||
// TODO: Random reward.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelQuestTimers("REWARD_SIBI_COINS");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, Player player)
|
||||
{
|
||||
return "34262.htm";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void startEvent()
|
||||
{
|
||||
super.startEvent();
|
||||
cancelQuestTimers("REWARD_SIBI_COINS");
|
||||
startQuestTimer("REWARD_SIBI_COINS", REWARD_INTERVAL + 1000, null, null, true);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HappyHours();
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<event name="Happy Hours" active="05 09 2017-03 10 2017" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
|
||||
<spawnlist>
|
||||
<add npc="34262" x="-14143" y="123176" z="-3096" heading="30212" /> <!-- Gludio -->
|
||||
<add npc="34262" x="16354" y="142848" z="-2680" heading="14450" /> <!-- Dion -->
|
||||
<add npc="34262" x="80814" y="147987" z="-3448" heading="3355" /> <!-- Giran -->
|
||||
<add npc="34262" x="82008" y="53874" z="-1472" heading="3355" /> <!-- Oren -->
|
||||
<add npc="34262" x="147457" y="27863" z="-2248" heading="17863" /> <!-- Aden -->
|
||||
<add npc="34262" x="112172" y="220447" z="-3648" heading="30708" /> <!-- Heine -->
|
||||
<add npc="34262" x="148195" y="-57368" z="-2752" heading="17863" /> <!-- Goddard -->
|
||||
<add npc="34262" x="44530" y="-48368" z="-776" heading="14450" /> <!-- Rune -->
|
||||
<add npc="34262" x="86897" y="-141346" z="-1320" heading="49153" /> <!-- Shutgard -->
|
||||
<add npc="34262" x="-114822" y="256385" z="-1472" heading="49744" /> <!-- Talking Island -->
|
||||
<add npc="34262" x="-78832" y="249115" z="-3272" heading="56380" /> <!-- Faeron Village -->
|
||||
<add npc="34262" x="-80485" y="149537" z="-3016" heading="16383" /> <!-- Gluddin -->
|
||||
<add npc="34262" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
|
||||
<add npc="34262" x="208499" y="87743" z="-1006" heading="11264" /> <!-- Arcan -->
|
||||
</spawnlist>
|
||||
<destroyItemsOnEnd>
|
||||
<item id="49783" /> <!-- Sibi's Coin -->
|
||||
<item id="47385" /> <!-- Balthus Knight Mark -->
|
||||
<item id="47387" /> <!-- Balthus Knight Supply Box -->
|
||||
<item id="47399" /> <!-- Sibi's Coin Box -->
|
||||
</destroyItemsOnEnd>
|
||||
<messages>
|
||||
<add type="onEnd" text="Happy Hours: Event end!" />
|
||||
<add type="onEnter" text="Happy Hours: Event ongoing!" />
|
||||
</messages>
|
||||
</event>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Balthus Knight's Supply Box is a special item prepared by Duke Balthus Van Dyke for the Bathus Knights to alleviate their hardship.<br>
|
||||
Can I really supply for the great warrior <font color="LEVEL">Lemniscate</font>? <font color="LEVEL">Balthus Knight's Supply Box</font> can only be obtained by <font color="LEVEL">one character Lv.20 and above per account.</font><br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HappyHours giveSupplyBox">"Please give me the Balthus Knight's Supply Box."</Button>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Augh! You're not a Balthus Knight! How come you had the crust to pretend being one!<br>
|
||||
Well then, I forgive you this time. But if you try again to pass as ab Balthus Knight, you won't get away with that!<br>
|
||||
(Supplies are given once a day, one piece per one account of a character who reached Level 20.)<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,6 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
Hello! Do you know that greed comes before a fall?<br1>
|
||||
You have already received your Supply Box, that's enough for you!<br>
|
||||
Open your inventory, probably the box is there.<br>
|
||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||
</body></html>
|
@ -1,13 +0,0 @@
|
||||
<html><body>Balthus Knights Supply Officer Sibi:<br>
|
||||
My name is Sibi, I am Balthus Knight's Supply Officer. The Lord of Oren Castle, Balthus Van Dyke, entrusted me with an important mission. Come to me whenever you need supplies for your missions.<br>
|
||||
Besides, if you have <font color="LEVEL">Sibi's Coins</font>, I can exchange them for useful consumables and some special rewards!<br>
|
||||
When event ends the following items will be deleted:<br1>
|
||||
-Sibi's Coin<br1>
|
||||
-Balthus Knight's Mark<br1>
|
||||
-Balthus Knight's Supply Box<br1>
|
||||
-Sibi's Coin Box<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HappyHours 34262-1.htm">"What is the Balthus Knights Supply Box?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426200">"I want to exchange Sibi's Coins for consumables."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426201">"I want to get an Infinite Arrow Quiver."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3426202">"I want to get some special reward."</Button>
|
||||
</body></html>
|
@ -1,126 +0,0 @@
|
||||
/*
|
||||
* 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.HappyHours;
|
||||
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class HappyHours extends LongTimeEvent
|
||||
{
|
||||
// NPC
|
||||
private static final int SIBI = 34262;
|
||||
// Items
|
||||
private static final int SUPPLY_BOX = 47399;
|
||||
private static final int SIBIS_COIN = 49783;
|
||||
// Skill
|
||||
private static final int TRANSFORMATION_SKILL = 39171;
|
||||
// Other
|
||||
private static final int MIN_LEVEL = 20;
|
||||
private static final int REWARD_INTERVAL = 60 * 60 * 1000; // 1 hour
|
||||
private static long _lastRewardTime = Chronos.currentTimeMillis();
|
||||
|
||||
private HappyHours()
|
||||
{
|
||||
addStartNpc(SIBI);
|
||||
addFirstTalkId(SIBI);
|
||||
addTalkId(SIBI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "34262-1.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "giveSupplyBox":
|
||||
{
|
||||
if (player.getLevel() < MIN_LEVEL)
|
||||
{
|
||||
return "34262-2.htm";
|
||||
}
|
||||
if (ownsAtLeastOneItem(player, SUPPLY_BOX))
|
||||
{
|
||||
return "34262-3.htm";
|
||||
}
|
||||
giveItems(player, SUPPLY_BOX, 1);
|
||||
break;
|
||||
}
|
||||
case "REWARD_SIBI_COINS":
|
||||
{
|
||||
if (isEventPeriod())
|
||||
{
|
||||
if ((Chronos.currentTimeMillis() - (_lastRewardTime + REWARD_INTERVAL)) > 0) // Exploit check - Just in case.
|
||||
{
|
||||
_lastRewardTime = Chronos.currentTimeMillis();
|
||||
final ExShowScreenMessage screenMsg = new ExShowScreenMessage("You obtained 20 Sibi's coins.", ExShowScreenMessage.TOP_CENTER, 7000, 0, true, true);
|
||||
final SystemMessage systemMsg = new SystemMessage(SystemMessageId.YOU_VE_OBTAINED_S1_FAIRY_S_LUCKY_COINS);
|
||||
systemMsg.addInt(20);
|
||||
for (Player plr : World.getInstance().getPlayers())
|
||||
{
|
||||
if ((plr != null) && (plr.isOnlineInt() == 1) && plr.isAffectedBySkill(TRANSFORMATION_SKILL))
|
||||
{
|
||||
plr.addItem("HappyHours", SIBIS_COIN, 20, player, false);
|
||||
plr.sendPacket(screenMsg);
|
||||
plr.sendPacket(systemMsg);
|
||||
// TODO: Random reward.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelQuestTimers("REWARD_SIBI_COINS");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(Npc npc, Player player)
|
||||
{
|
||||
return "34262.htm";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void startEvent()
|
||||
{
|
||||
super.startEvent();
|
||||
cancelQuestTimers("REWARD_SIBI_COINS");
|
||||
startQuestTimer("REWARD_SIBI_COINS", REWARD_INTERVAL + 1000, null, null, true);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HappyHours();
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<event name="Happy Hours" active="05 09 2017-03 10 2017" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
|
||||
<spawnlist>
|
||||
<add npc="34262" x="-14143" y="123176" z="-3096" heading="30212" /> <!-- Gludio -->
|
||||
<add npc="34262" x="16354" y="142848" z="-2680" heading="14450" /> <!-- Dion -->
|
||||
<add npc="34262" x="80814" y="147987" z="-3448" heading="3355" /> <!-- Giran -->
|
||||
<add npc="34262" x="82008" y="53874" z="-1472" heading="3355" /> <!-- Oren -->
|
||||
<add npc="34262" x="147457" y="27863" z="-2248" heading="17863" /> <!-- Aden -->
|
||||
<add npc="34262" x="112172" y="220447" z="-3648" heading="30708" /> <!-- Heine -->
|
||||
<add npc="34262" x="148195" y="-57368" z="-2752" heading="17863" /> <!-- Goddard -->
|
||||
<add npc="34262" x="44530" y="-48368" z="-776" heading="14450" /> <!-- Rune -->
|
||||
<add npc="34262" x="86897" y="-141346" z="-1320" heading="49153" /> <!-- Shutgard -->
|
||||
<add npc="34262" x="-114822" y="256385" z="-1472" heading="49744" /> <!-- Talking Island -->
|
||||
<add npc="34262" x="-78832" y="249115" z="-3272" heading="56380" /> <!-- Faeron Village -->
|
||||
<add npc="34262" x="-80485" y="149537" z="-3016" heading="16383" /> <!-- Gluddin -->
|
||||
<add npc="34262" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
|
||||
<add npc="34262" x="208499" y="87743" z="-1006" heading="11264" /> <!-- Arcan -->
|
||||
</spawnlist>
|
||||
<destroyItemsOnEnd>
|
||||
<item id="49783" /> <!-- Sibi's Coin -->
|
||||
<item id="47385" /> <!-- Balthus Knight Mark -->
|
||||
<item id="47387" /> <!-- Balthus Knight Supply Box -->
|
||||
<item id="47399" /> <!-- Sibi's Coin Box -->
|
||||
</destroyItemsOnEnd>
|
||||
<messages>
|
||||
<add type="onEnd" text="Happy Hours: Event end!" />
|
||||
<add type="onEnter" text="Happy Hours: Event ongoing!" />
|
||||
</messages>
|
||||
</event>
|
Loading…
Reference in New Issue
Block a user