From c41c433dd6e1aea44a7b4c2147a93b1d617ae05e Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 22 May 2018 14:29:22 +0000 Subject: [PATCH] Addition of Happy Hours event. Thanks quangnguyen and Liamxroy. --- .../dist/game/data/multisell/3426200.xml | 146 +++++++++ .../dist/game/data/multisell/3426201.xml | 20 ++ .../dist/game/data/multisell/3426202.xml | 25 ++ .../scripts/events/HappyHours/34262-1.htm | 6 + .../scripts/events/HappyHours/34262-2.htm | 6 + .../scripts/events/HappyHours/34262-3.htm | 6 + .../data/scripts/events/HappyHours/34262.htm | 13 + .../scripts/events/HappyHours/HappyHours.java | 122 ++++++++ .../data/scripts/events/HappyHours/config.xml | 27 ++ .../game/data/stats/items/49500-49599.xml | 11 + .../game/data/stats/items/49700-49799.xml | 27 +- .../game/data/stats/items/90500-90599.xml | 4 + .../dist/game/data/stats/npcs/34200-34299.xml | 2 +- .../game/data/stats/skills/39000-39099.xml | 132 +++++++- .../game/data/stats/skills/39100-39199.xml | 283 +++++++++++++++++- .../game/data/stats/skills/39200-39299.xml | 32 +- .../dist/game/data/multisell/3426200.xml | 146 +++++++++ .../dist/game/data/multisell/3426201.xml | 20 ++ .../dist/game/data/multisell/3426202.xml | 25 ++ .../scripts/events/HappyHours/34262-1.htm | 6 + .../scripts/events/HappyHours/34262-2.htm | 6 + .../scripts/events/HappyHours/34262-3.htm | 6 + .../data/scripts/events/HappyHours/34262.htm | 13 + .../scripts/events/HappyHours/HappyHours.java | 122 ++++++++ .../data/scripts/events/HappyHours/config.xml | 27 ++ .../game/data/stats/items/49500-49599.xml | 11 + .../game/data/stats/items/49700-49799.xml | 27 +- .../game/data/stats/items/90500-90599.xml | 4 + .../dist/game/data/stats/npcs/34200-34299.xml | 2 +- .../game/data/stats/skills/39000-39099.xml | 132 +++++++- .../game/data/stats/skills/39100-39199.xml | 283 +++++++++++++++++- .../game/data/stats/skills/39200-39299.xml | 32 +- 32 files changed, 1666 insertions(+), 58 deletions(-) create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426200.xml create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426201.xml create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426202.xml create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-1.htm create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-2.htm create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-3.htm create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262.htm create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/HappyHours.java create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/config.xml create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426200.xml create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426201.xml create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426202.xml create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-1.htm create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-2.htm create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-3.htm create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262.htm create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/HappyHours.java create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/config.xml diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426200.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426200.xml new file mode 100644 index 0000000000..45bc1a341f --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426200.xml @@ -0,0 +1,146 @@ + + + + 34262 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426201.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426201.xml new file mode 100644 index 0000000000..9db386faeb --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426201.xml @@ -0,0 +1,20 @@ + + + + 34262 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426202.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426202.xml new file mode 100644 index 0000000000..9a19a52d1b --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/multisell/3426202.xml @@ -0,0 +1,25 @@ + + + + 34262 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-1.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-1.htm new file mode 100644 index 0000000000..562496c789 --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-1.htm @@ -0,0 +1,6 @@ +Balthus Knights Supply Officer Sibi:
+Balthus Knight's Supply Box is a special item prepared by Duke Balthus Van Dyke for the Bathus Knights to alleviate their hardship.
+Can I really supply for the great warrior Lemniscate? Balthus Knight's Supply Box can only be obtained by one character Lv.20 and above per account.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-2.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-2.htm new file mode 100644 index 0000000000..a323d5815f --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-2.htm @@ -0,0 +1,6 @@ +Balthus Knights Supply Officer Sibi:
+Augh! You're not a Balthus Knight! How come you had the crust to pretend being one!
+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!
+(Supplies are given once a day, one piece per one account of a character who reached Level 20.)
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-3.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-3.htm new file mode 100644 index 0000000000..94a50a595c --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262-3.htm @@ -0,0 +1,6 @@ +Balthus Knights Supply Officer Sibi:
+Hello! Do you know that greed comes before a fall? +You have already received your Supply Box, that's enough for you!
+Open your inventory, probably the box is there.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262.htm b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262.htm new file mode 100644 index 0000000000..09c0594652 --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/34262.htm @@ -0,0 +1,13 @@ +Balthus Knights Supply Officer Sibi:
+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.
+Besides, if you have Sibi's Coins, I can exchange them for useful consumables and some special rewards!
+When event ends the following items will be deleted: +-Sibi's Coin +-Balthus Knight's Mark +-Balthus Knight's Supply Box +-Sibi's Coin Box
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/HappyHours.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/HappyHours.java new file mode 100644 index 0000000000..2824aea737 --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/HappyHours.java @@ -0,0 +1,122 @@ +/* + * 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 . + */ +package events.HappyHours; + +import com.l2jmobius.gameserver.model.L2World; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.quest.LongTimeEvent; +import com.l2jmobius.gameserver.network.SystemMessageId; +import com.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 = 49782; + 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 = System.currentTimeMillis(); + + private HappyHours() + { + addStartNpc(SIBI); + addFirstTalkId(SIBI); + addTalkId(SIBI); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance 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 (hasQuestItems(player, SUPPLY_BOX)) + { + return "34262-3.htm"; + } + giveItems(player, SUPPLY_BOX, 1); + break; + } + case "REWARD_SIBI_COINS": + { + if (isEventPeriod()) + { + if ((System.currentTimeMillis() - (_lastRewardTime + REWARD_INTERVAL)) > 0) // Exploit check - Just in case. + { + _lastRewardTime = System.currentTimeMillis(); + final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.YOU_OBTAINED_S1_SIBI_S_COINS); + msg.addInt(20); + for (L2PcInstance plr : L2World.getInstance().getPlayers()) + { + if ((plr != null) && (plr.isOnlineInt() == 1) && plr.isAffectedBySkill(TRANSFORMATION_SKILL)) + { + plr.addItem("HappyHours", SIBIS_COIN, 20, player, false); + plr.sendPacket(msg); + // TODO: Random reward. + } + } + } + } + else + { + cancelQuestTimers("REWARD_SIBI_COINS"); + } + break; + } + } + return htmltext; + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance 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(); + } +} diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/config.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/config.xml new file mode 100644 index 0000000000..7ba32e7dec --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/events/HappyHours/config.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/49500-49599.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/49500-49599.xml index ee502837e2..920caf2dc9 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/49500-49599.xml +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/49500-49599.xml @@ -511,6 +511,7 @@ + @@ -518,6 +519,12 @@ + + + + + + @@ -1066,6 +1073,10 @@ + + + + diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/49700-49799.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/49700-49799.xml index 026b8012c7..d8b874b323 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/49700-49799.xml +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/49700-49799.xml @@ -1096,11 +1096,16 @@ + + + + + @@ -1108,17 +1113,23 @@ + + + + + + @@ -1128,7 +1139,7 @@ - + @@ -1139,7 +1150,7 @@ - + @@ -1161,16 +1172,24 @@ - + + + + + - + + + + + diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/90500-90599.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/90500-90599.xml index 3e3ec6b153..5d71563175 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/90500-90599.xml +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/items/90500-90599.xml @@ -61,6 +61,10 @@ + + + + diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/34200-34299.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/34200-34299.xml index 298480a34f..a308f47e1f 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/34200-34299.xml +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/npcs/34200-34299.xml @@ -200,7 +200,7 @@ - + HUMAN FEMALE diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39000-39099.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39000-39099.xml index b851a851fe..a314b91cfb 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39000-39099.xml +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39000-39099.xml @@ -579,11 +579,11 @@ 5 - PER + DIFF 5 - PER + DIFF @@ -819,7 +819,7 @@ - + icon.skill19226 P 5 @@ -1097,14 +1097,132 @@ A1 - - icon.skill0000 + icon.skill39072 + 2 + 1 + 49491 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - icon.skill0000 + icon.skill39073 + 2 + 1 + 49492 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39100-39199.xml index 7d38c5ed34..c2cb12bdc4 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39100-39199.xml @@ -69,9 +69,28 @@ A1 - - icon.skill0000 + 400 + 1 + 600 + 1000 + 2 + 1 + 49542 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 500 + PC_BODY + SINGLE + + + + + + 50 + + @@ -89,9 +108,35 @@ A1 - - icon.skill0000 - A1 + icon.skill39113 + 1 + 3600 + VOTE + 1 + 49585 + A2 + 5 + 1 + true + SELF + SINGLE + + + 1 + 85 + CASTER + + + + + 50 + PER + + + 50 + PER + + @@ -1092,14 +1137,73 @@ A1 - - icon.skill0000 + icon.skill39172 + 2 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + 86400000 + + + 20 + 10 + + + + + + + + + + + - - icon.skill0000 - A1 + 1 + 49784 + 1 + 3600 + CHANGEBODY + CHANGESHAPE_TRANSFORM + true + true + 1 + icon.skill39171 + 4 + 56 + A2 + 60000 + true + true + 3000 + NONE;STRIDER;WYVERN;WOLF + NONE + 5 + 0 + SELF + SINGLE + + + 20 + 85 + CASTER + + + + + 10 + PER + + + 10 + PER + + icon.skill39172 @@ -1305,14 +1409,165 @@ - - icon.skill0000 + icon.skill39174 + 2 + 1 + 49789 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - icon.skill0000 + icon.skill39175 + 2 + 1 + 49790 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39200-39299.xml b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39200-39299.xml index 6266d3d14c..31a89fc938 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39200-39299.xml +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/39200-39299.xml @@ -814,9 +814,35 @@ A1 - - icon.skill0000 - A1 + 1 + 90506 + 1 + 3600 + VOTE + icon.skill39171 + A2 + 5 + 1 + true + SELF + SINGLE + + + 20 + 85 + CASTER + + + + + 20 + PER + + + 20 + PER + + diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426200.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426200.xml new file mode 100644 index 0000000000..45bc1a341f --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426200.xml @@ -0,0 +1,146 @@ + + + + 34262 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426201.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426201.xml new file mode 100644 index 0000000000..9db386faeb --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426201.xml @@ -0,0 +1,20 @@ + + + + 34262 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426202.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426202.xml new file mode 100644 index 0000000000..ef2508b312 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/multisell/3426202.xml @@ -0,0 +1,25 @@ + + + + 34262 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-1.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-1.htm new file mode 100644 index 0000000000..562496c789 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-1.htm @@ -0,0 +1,6 @@ +Balthus Knights Supply Officer Sibi:
+Balthus Knight's Supply Box is a special item prepared by Duke Balthus Van Dyke for the Bathus Knights to alleviate their hardship.
+Can I really supply for the great warrior Lemniscate? Balthus Knight's Supply Box can only be obtained by one character Lv.20 and above per account.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-2.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-2.htm new file mode 100644 index 0000000000..a323d5815f --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-2.htm @@ -0,0 +1,6 @@ +Balthus Knights Supply Officer Sibi:
+Augh! You're not a Balthus Knight! How come you had the crust to pretend being one!
+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!
+(Supplies are given once a day, one piece per one account of a character who reached Level 20.)
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-3.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-3.htm new file mode 100644 index 0000000000..94a50a595c --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262-3.htm @@ -0,0 +1,6 @@ +Balthus Knights Supply Officer Sibi:
+Hello! Do you know that greed comes before a fall? +You have already received your Supply Box, that's enough for you!
+Open your inventory, probably the box is there.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262.htm b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262.htm new file mode 100644 index 0000000000..09c0594652 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/34262.htm @@ -0,0 +1,13 @@ +Balthus Knights Supply Officer Sibi:
+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.
+Besides, if you have Sibi's Coins, I can exchange them for useful consumables and some special rewards!
+When event ends the following items will be deleted: +-Sibi's Coin +-Balthus Knight's Mark +-Balthus Knight's Supply Box +-Sibi's Coin Box
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/HappyHours.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/HappyHours.java new file mode 100644 index 0000000000..2824aea737 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/HappyHours.java @@ -0,0 +1,122 @@ +/* + * 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 . + */ +package events.HappyHours; + +import com.l2jmobius.gameserver.model.L2World; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.quest.LongTimeEvent; +import com.l2jmobius.gameserver.network.SystemMessageId; +import com.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 = 49782; + 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 = System.currentTimeMillis(); + + private HappyHours() + { + addStartNpc(SIBI); + addFirstTalkId(SIBI); + addTalkId(SIBI); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance 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 (hasQuestItems(player, SUPPLY_BOX)) + { + return "34262-3.htm"; + } + giveItems(player, SUPPLY_BOX, 1); + break; + } + case "REWARD_SIBI_COINS": + { + if (isEventPeriod()) + { + if ((System.currentTimeMillis() - (_lastRewardTime + REWARD_INTERVAL)) > 0) // Exploit check - Just in case. + { + _lastRewardTime = System.currentTimeMillis(); + final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.YOU_OBTAINED_S1_SIBI_S_COINS); + msg.addInt(20); + for (L2PcInstance plr : L2World.getInstance().getPlayers()) + { + if ((plr != null) && (plr.isOnlineInt() == 1) && plr.isAffectedBySkill(TRANSFORMATION_SKILL)) + { + plr.addItem("HappyHours", SIBIS_COIN, 20, player, false); + plr.sendPacket(msg); + // TODO: Random reward. + } + } + } + } + else + { + cancelQuestTimers("REWARD_SIBI_COINS"); + } + break; + } + } + return htmltext; + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance 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(); + } +} diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/config.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/config.xml new file mode 100644 index 0000000000..7ba32e7dec --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/events/HappyHours/config.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/49500-49599.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/49500-49599.xml index d44745fe9a..9e935805ca 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/49500-49599.xml +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/49500-49599.xml @@ -511,6 +511,7 @@ + @@ -518,6 +519,12 @@ + + + + + +
@@ -1066,6 +1073,10 @@ + + + + diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/49700-49799.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/49700-49799.xml index 026b8012c7..d8b874b323 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/49700-49799.xml +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/49700-49799.xml @@ -1096,11 +1096,16 @@ + + + + + @@ -1108,17 +1113,23 @@ + + + + + + @@ -1128,7 +1139,7 @@ - + @@ -1139,7 +1150,7 @@ - + @@ -1161,16 +1172,24 @@ - + + + + + - + + + + + diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/90500-90599.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/90500-90599.xml index 3e3ec6b153..5d71563175 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/90500-90599.xml +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/items/90500-90599.xml @@ -61,6 +61,10 @@ + + + + diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/34200-34299.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/34200-34299.xml index d86408aed9..a23dabb743 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/34200-34299.xml +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/npcs/34200-34299.xml @@ -200,7 +200,7 @@ - + HUMAN FEMALE diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39000-39099.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39000-39099.xml index feb8ef7c2d..56311b910e 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39000-39099.xml +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39000-39099.xml @@ -579,11 +579,11 @@ 5 - PER + DIFF 5 - PER + DIFF @@ -819,7 +819,7 @@ - + icon.skill19226 P 5 @@ -1097,14 +1097,132 @@ A1 - - icon.skill0000 + icon.skill39072 + 2 + 1 + 49491 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - icon.skill0000 + icon.skill39073 + 2 + 1 + 49492 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39100-39199.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39100-39199.xml index f2fef5c3ec..e376b21d6b 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39100-39199.xml +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39100-39199.xml @@ -69,9 +69,28 @@ A1 - - icon.skill0000 + 400 + 1 + 600 + 1000 + 2 + 1 + 49542 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 500 + PC_BODY + SINGLE + + + + + + 50 + + @@ -89,9 +108,35 @@ A1 - - icon.skill0000 - A1 + icon.skill39113 + 1 + 3600 + VOTE + 1 + 49585 + A2 + 5 + 1 + true + SELF + SINGLE + + + 1 + 85 + CASTER + + + + + 50 + PER + + + 50 + PER + + @@ -1092,14 +1137,73 @@ A1 - - icon.skill0000 + icon.skill39172 + 2 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + 86400000 + + + 20 + 10 + + + + + + + + + + + - - icon.skill0000 - A1 + 1 + 49784 + 1 + 3600 + CHANGEBODY + CHANGESHAPE_TRANSFORM + true + true + 1 + icon.skill39171 + 4 + 56 + A2 + 60000 + true + true + 3000 + NONE;STRIDER;WYVERN;WOLF + NONE + 5 + 0 + SELF + SINGLE + + + 20 + 85 + CASTER + + + + + 10 + PER + + + 10 + PER + + icon.skill39172 @@ -1305,14 +1409,165 @@ - - icon.skill0000 + icon.skill39174 + 2 + 1 + 49789 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - icon.skill0000 + icon.skill39175 + 2 + 1 + 49790 + 1 A1 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 20 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39200-39299.xml b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39200-39299.xml index 56524eb19c..a31f83ed78 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39200-39299.xml +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/39200-39299.xml @@ -814,9 +814,35 @@ A1 - - icon.skill0000 - A1 + 1 + 90506 + 1 + 3600 + VOTE + icon.skill39171 + A2 + 5 + 1 + true + SELF + SINGLE + + + 20 + 85 + CASTER + + + + + 20 + PER + + + 20 + PER + +