Skip to content

Instantly share code, notes, and snippets.

@ivantotov
Created October 17, 2015 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivantotov/3431b99f88f05760bf38 to your computer and use it in GitHub Desktop.
Save ivantotov/3431b99f88f05760bf38 to your computer and use it in GitHub Desktop.
diff --git a/dist/game/data/scripts.cfg b/dist/game/data/scripts.cfg
index 593f42d..4c6144d 100644
--- a/dist/game/data/scripts.cfg
+++ b/dist/game/data/scripts.cfg
@@ -245,3 +245,4 @@
#events/FreyaCelebration/FreyaCelebration.java
#events/MasterOfEnchanting/MasterOfEnchanting.java
#events/LoveYourGatekeeper/LoveYourGatekeeper.java
+events/LoversJubilee/LoversJubilee.java
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-001.html b/dist/game/data/scripts/events/LoversJubilee/4305-001.html
new file mode 100644
index 0000000..948ecd2
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-001.html
@@ -0,0 +1,9 @@
+<html><body>Rosalia<br>
+Hello. I'm a magic researcher.<br>
+I finally succeed on substantialization of <font color="LEVEL">Rose Spirit</font>after the long research!<br><br>
+...By the way, will you be able to test this <font color="LEVEL">Rose Spirit</font>? Or will you buy a <font color="LEVEL">rose</font>for my research fund raising?<br><br><br>
+<a action="bypass -h Quest LoversJubilee 50020_1">I'll test the Rose Spirit.</a><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-003.html">Let's go out on a date.</a><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-006.html">I will buy the rose.</a><br><br>
+<a action="bypass -h Quest LoversJubilee 50020_8">I want an improved Rose Spirit.</a><br><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-002.html b/dist/game/data/scripts/events/LoversJubilee/4305-002.html
new file mode 100644
index 0000000..54af4a6
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-002.html
@@ -0,0 +1,9 @@
+<html><body>Rosalia:<br>
+Which Rose Spirit will you test? (Rose Spirits can be received once a day. They each take 2 slots of your inventory. You can't receive the item if you don't have the required space. Rose Necklaces cannot be received for 24 hours once it has been deleted.)<br><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-011.html">Male, Warrior</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-012.html">Male, Wizard</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-013.html">Male, War Smith</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-014.html">Female, Warrior</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-015.html">Female, Wizard</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-016.html">Female, War Smith</a><br><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-003.html b/dist/game/data/scripts/events/LoversJubilee/4305-003.html
new file mode 100644
index 0000000..6556622
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-003.html
@@ -0,0 +1,7 @@
+<html><body>Rosalia:<br>
+��Do you just ask for a date to any Elf you see for the first time?<br>
+I'm sorry, but I don't have time other than magic research. I might think about it if you buy a <font color="LEVEL">rose</font> from me.<br><br>
+Propose to me with a <font color="LEVEL">rose</font>. Put out a beautiful flower in front of me and shout out so all town people can hear it<br><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-004.html">Alright.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-005.html">I can't do it..</a><br><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-004.html b/dist/game/data/scripts/events/LoversJubilee/4305-004.html
new file mode 100644
index 0000000..86751a7
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-004.html
@@ -0,0 +1,4 @@
+<html><body>Rosalia:<br><br>
+Are you��really do it?<br><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-001.html">Back</a>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-005.html b/dist/game/data/scripts/events/LoversJubilee/4305-005.html
new file mode 100644
index 0000000..b9c9340
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-005.html
@@ -0,0 +1,4 @@
+<html><body>Rosalia:<br><br>
+��I guess you don't like me too much..?<br><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-001.html">Back</a>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-006.html b/dist/game/data/scripts/events/LoversJubilee/4305-006.html
new file mode 100644
index 0000000..3c52e1c
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-006.html
@@ -0,0 +1,10 @@
+<html><body>Rosalia:<br>
+What kind of rose would you like?<br><br>
+Oh, you can sell the flower back to the store at half price.<br><br><br>
+<a action="bypass -h Quest LoversJubilee 50020_2">One Red Rose. (500 Adena).</a><br>
+<a action="bypass -h Quest LoversJubilee 50020_3">One Blue Rose. (500 Adena).</a><br>
+<a action="bypass -h Quest LoversJubilee 50020_4">One Blue Rose. (500 Adena).</a><br><br>
+<a action="bypass -h Quest LoversJubilee 50020_5">Ten Blue Roses. (5000 Adena).</a><br>
+<a action="bypass -h Quest LoversJubilee 50020_6">Ten Blue Roses. (5000 Adena).</a><br>
+<a action="bypass -h Quest LoversJubilee 50020_7">Ten White Roses. (5000 Adena).</a><br><br><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-007.html b/dist/game/data/scripts/events/LoversJubilee/4305-007.html
new file mode 100644
index 0000000..cd639b1
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-007.html
@@ -0,0 +1,9 @@
+<html><body>Rosalia:<br>
+Which improved Rose Spirit would you like? (When the inventory is full, you can't receive the item..)<br><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-017.html">Male, Warrior Type</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-018.html">Male, Wizard Type</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-019.html">Male, Warsmith Type</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-020.html">Female, Warrior Type</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-021.html">Female, Wizard Type</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-022.html">Female, Warsmith Type</a><br><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-008.html b/dist/game/data/scripts/events/LoversJubilee/4305-008.html
new file mode 100644
index 0000000..9f2960f
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-008.html
@@ -0,0 +1,4 @@
+<html><body>Rosalia:<br>
+I'm sorry. There aren't enough improved Rose Spirit, so I give out to a qualified person with a special exchange ticket.<br><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-001.html">Back</a>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-010.html b/dist/game/data/scripts/events/LoversJubilee/4305-010.html
new file mode 100644
index 0000000..827c7af
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-010.html
@@ -0,0 +1,4 @@
+<html><body>Rosalia:<br>
+I'm sorry. Today's test materials have ran out. Please come back tomorrow.<br><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-001.html">Back</a>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-011.html b/dist/game/data/scripts/events/LoversJubilee/4305-011.html
new file mode 100644
index 0000000..5db60a3
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-011.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the warrior type Rose Spirit.<br><br>
+Name of the spirit is Deseloph.<br>
+<font color="LEVEL">Deseloph is a rose spirit which uses various warrior type buffs and heals while attacking enemies with a sword.</font><br><br>
+Will you test with the Deseloph?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_9">Yes. I'll test with Deseloph.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-002.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-012.html b/dist/game/data/scripts/events/LoversJubilee/4305-012.html
new file mode 100644
index 0000000..4552908
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-012.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the wizard type Rose Spirit.<br><br>
+Name of the spirit is Hyum.<br>
+<font color="LEVEL">Hyum is a rose spirit which uses wizard type buffs, heals, and recharge while attacking enemies with magic.</font><br><br>
+Will you test with Hyum?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_10">Yes. I'll test with Hyum.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-002.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-013.html b/dist/game/data/scripts/events/LoversJubilee/4305-013.html
new file mode 100644
index 0000000..148a483
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-013.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the warsmith type Rose Spirit.<br><br>
+Name of the spirit is Rekang.<br>
+<font color="LEVEL">Rekang is a rose spirit which uses weapon or magic to attach enemies as well as heal and recharge while managing (warsmith buff) the owner's weapon and armor.</font><br><br>
+Will you test with Rekang?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_11">Yes. I'll test with Rekang.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-002.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-014.html b/dist/game/data/scripts/events/LoversJubilee/4305-014.html
new file mode 100644
index 0000000..5f87c6f
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-014.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the warrior type Rose Spirit.<br><br>
+Name of the spirit is Lilias.<br>
+<font color="LEVEL">Lilias is a rose spirit which uses various warrior type buffs and heals while attacking enemies with a sword..</font><br><br>
+Will you test with Lilias?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_12">Yes. I'll test with Lilias.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-002.html">No</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-015.html b/dist/game/data/scripts/events/LoversJubilee/4305-015.html
new file mode 100644
index 0000000..3951355
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-015.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the wizard type Rose Spirit.<br><br>
+Name of the spirit is Lapham.<br>
+<font color="LEVEL">Lapham is a rose spirit which uses wizard type buffs, heals, and recharge while attacking enemies with magic.</font><br><br>
+Will you test with Lapham?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_13">Yes. I'll test with Lapham.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-002.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-016.html b/dist/game/data/scripts/events/LoversJubilee/4305-016.html
new file mode 100644
index 0000000..69495e2
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-016.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the warsmith type Rose Spirit.<br><br>
+Name of the spirit is Maphum.<br>
+<font color="LEVEL">Maphum is a rose spirit which uses weapon or magic to attach enemies as well as heal and recharge while managing (warsmith buff) the owner's weapon and armor.</font><br><br>
+Will you test with Maphum?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_14">Yes. I'll test with Maphum.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-002.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-017.html b/dist/game/data/scripts/events/LoversJubilee/4305-017.html
new file mode 100644
index 0000000..4b30d82
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-017.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the warrior type Rose Spirit.<br><br>
+Name of the spirit is Deseloph.<br>
+<font color="LEVEL">Deseloph is a rose spirit which uses various warrior type buffs and heals while attacking enemies with a sword.</font><br><br>
+Will you exchange to Deseloph?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_15">Yes. I'll exchange to Deseloph.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-007.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-018.html b/dist/game/data/scripts/events/LoversJubilee/4305-018.html
new file mode 100644
index 0000000..8f99f34
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-018.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the wizard type Rose Spirit.<br><br>
+Name of the spirit is Hyum.<br>
+<font color="LEVEL">Hyum is a rose spirit which uses wizard type buffs, heals, and recharge while attacking enemies with magic.</font><br><br>
+Will you exchange to Hyum?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_16">Yes. I'll exchange to Hyum.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-007.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-019.html b/dist/game/data/scripts/events/LoversJubilee/4305-019.html
new file mode 100644
index 0000000..1326f04
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-019.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the warsmith type Rose Spirit.<br><br>
+Name of the spirit is Rekang.<br>
+<font color="LEVEL">Rekang is a rose spirit which uses weapon or magic to attach enemies as well as heal and recharge while managing (warsmith buff) the owner's weapon and armor.</font><br><br>
+Will you test with Rekang?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_17">Yes. I'll exchange to Rekang.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-007.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-020.html b/dist/game/data/scripts/events/LoversJubilee/4305-020.html
new file mode 100644
index 0000000..a3c4b01
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-020.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the warrior type Rose Spirit.<br><br>
+Name of the spirit is Lilias.<br>
+<font color="LEVEL">Lilias is a rose spirit which uses various warrior type buffs and heals while attacking enemies with a sword..</font><br><br>
+Will you exchange to Lilias?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_18">Yes. I'll exchange to Lilias.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-007.html">No</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-021.html b/dist/game/data/scripts/events/LoversJubilee/4305-021.html
new file mode 100644
index 0000000..48b5e60
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-021.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the wizard type Rose Spirit.<br><br>
+Name of the spirit is Lapham.<br>
+<font color="LEVEL">Lapham is a rose spirit which uses wizard type buffs, heals, and recharge while attacking enemies with magic.</font><br><br>
+Will you exchange to Lapham?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_19">Yes. I'll exchange to Lapham.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-007.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-022.html b/dist/game/data/scripts/events/LoversJubilee/4305-022.html
new file mode 100644
index 0000000..4ef757b
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-022.html
@@ -0,0 +1,8 @@
+<html><body>Rosalia:<br>
+You have chosen the warsmith type Rose Spirit.<br><br>
+Name of the spirit is Maphum.<br>
+<font color="LEVEL">Maphum is a rose spirit which uses weapon or magic to attach enemies as well as heal and recharge while managing (warsmith buff) the owner's weapon and armor.</font><br><br>
+Will you exchange to Maphum?<br><br>
+<a action="bypass -h Quest LoversJubilee 50020_20">Yes. I'll exchange to Maphum.</a><br>
+<a action="bypass -h Quest LoversJubilee 4305-007.html">No.</a><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-023.html b/dist/game/data/scripts/events/LoversJubilee/4305-023.html
new file mode 100644
index 0000000..978bac7
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-023.html
@@ -0,0 +1,3 @@
+<html><body>Rosalia:<br><br><br>
+Thank you for supporting my research♡<br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-024.html b/dist/game/data/scripts/events/LoversJubilee/4305-024.html
new file mode 100644
index 0000000..7490a3a
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-024.html
@@ -0,0 +1,4 @@
+<html><body>Rosalia:<br><br><br>
+You don't seem to have enough Adena.<br><br><br>
+<a action="bypass -h Quest LoversJubilee 4305-001.html">Back</a>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-025.html b/dist/game/data/scripts/events/LoversJubilee/4305-025.html
new file mode 100644
index 0000000..af995c4
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-025.html
@@ -0,0 +1,5 @@
+<html><body>Rosalia:<br>
+Here, take this <font color="LEVEL">Rose Necklace</font>.<br>
+You can summon the Rose Spirit with this necklace. You can summon for 3 hours.<br><br>
+If you bring test record after 24 hours, you will be able to perform more test.<br><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/4305-026.html b/dist/game/data/scripts/events/LoversJubilee/4305-026.html
new file mode 100644
index 0000000..6ed206f
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/4305-026.html
@@ -0,0 +1,4 @@
+<html><body>Rosalia:<br>
+Here, take this <font color="LEVEL">Improved Rose Necklace</font>.<br>
+You can summon the Improved Rose Spirit with this Necklace. You can summon for 5 hours.<br><br>
+</body></html>
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/LoversJubilee.java b/dist/game/data/scripts/events/LoversJubilee/LoversJubilee.java
new file mode 100644
index 0000000..088c2cf
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/LoversJubilee.java
@@ -0,0 +1,266 @@
+/*
+ * 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 events.LoversJubilee;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.event.LongTimeEvent;
+import com.l2jserver.gameserver.model.events.EventType;
+import com.l2jserver.gameserver.model.events.ListenerRegisterType;
+import com.l2jserver.gameserver.model.events.annotations.RegisterEvent;
+import com.l2jserver.gameserver.model.events.annotations.RegisterType;
+import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerLogin;
+import com.l2jserver.gameserver.model.itemcontainer.Inventory;
+import com.l2jserver.gameserver.network.serverpackets.ExBrBroadcastEventState;
+
+/**
+ * Lover's Jubilee event AI.
+ * @author ivantotov
+ */
+public final class LoversJubilee extends LongTimeEvent
+{
+ // NPC
+ private static final int ROSALIA = 4305;
+ // Item
+ private static final int ONE_RED_ROSE_BUD = 20905;
+ private static final int ONE_BLUE_ROSE_BUD = 20906;
+ private static final int ONE_WHILE_ROSE_BUD = 20907;
+ private static final int DESELOPH_ROSE_NECKLACE = 20908;
+ private static final int HYUM_ROSE_NECKLACE = 20909;
+ private static final int REKANG_ROSE_NECKLACE = 20910;
+ private static final int LILIAS_ROSE_NECKLACE = 20911;
+ private static final int LAPHAM_ROSE_NECKLACE = 20912;
+ private static final int MAFUM_ROSE_NECKLACE = 20913;
+ private static final int IMPROVED_ROSE_SPIRIT_EXCHANGE_TICKET = 20914;
+ private static final int IMPROVED_DESELOPH_ROSE_NECKLACE = 20915;
+ private static final int IMPROVED_HYUM_ROSE_NECKLACE = 20916;
+ private static final int IMPROVED_REKANG_ROSE_NECKLACE = 20917;
+ private static final int IMPROVED_LILIAS_ROSE_NECKLACE = 20918;
+ private static final int IMPROVED_LAPHAM_ROSE_NECKLACE = 20919;
+ private static final int IMPROVED_MAFUM_ROSE_NECKLACE = 20920;
+ private static final int SPIRIT_TEST_REPORT = 20921;
+ // Misc
+ private static final int ONE_ROSE_PRICE = 500;
+ private static final int TEN_ROSES_PRICE = 5000;
+ public static final int LOVERS_JUBILEE = 20100214;
+
+ private LoversJubilee()
+ {
+ super(LoversJubilee.class.getSimpleName(), "events");
+ addStartNpc(ROSALIA);
+ addFirstTalkId(ROSALIA);
+ addTalkId(ROSALIA);
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ event.getActiveChar().sendPacket(new ExBrBroadcastEventState(ExBrBroadcastEventState.LOVERS_JUBILEE, 1));
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ String htmltext = event;
+ switch (event)
+ {
+ case "50020_1":
+ {
+ htmltext = hasQuestItems(player, SPIRIT_TEST_REPORT) ? "4305-010.html" : "4305-002.html";
+ break;
+ }
+ case "50020_2":
+ case "50020_3":
+ case "50020_4":
+ {
+ if (getQuestItemsCount(player, Inventory.ADENA_ID) < ONE_ROSE_PRICE)
+ {
+ htmltext = "4305-024.html";
+ }
+ else
+ {
+ takeItems(player, Inventory.ADENA_ID, ONE_ROSE_PRICE);
+ switch (event)
+ {
+ case "50020_2":
+ {
+ giveItems(player, ONE_RED_ROSE_BUD, 1);
+ break;
+ }
+ case "50020_3":
+ {
+ giveItems(player, ONE_BLUE_ROSE_BUD, 1);
+ break;
+ }
+ case "50020_4":
+ {
+ giveItems(player, ONE_WHILE_ROSE_BUD, 1);
+ break;
+ }
+ }
+ htmltext = "4305-023.html";
+ }
+ }
+ case "50020_5":
+ case "50020_6":
+ case "50020_7":
+ {
+ if (getQuestItemsCount(player, Inventory.ADENA_ID) < TEN_ROSES_PRICE)
+ {
+ htmltext = "4305-024.html";
+ }
+ else
+ {
+ takeItems(player, Inventory.ADENA_ID, TEN_ROSES_PRICE);
+ switch (event)
+ {
+ case "50020_5":
+ {
+ giveItems(player, ONE_RED_ROSE_BUD, 10);
+ break;
+ }
+ case "50020_6":
+ {
+ giveItems(player, ONE_BLUE_ROSE_BUD, 10);
+ break;
+ }
+ case "50020_7":
+ {
+ giveItems(player, ONE_WHILE_ROSE_BUD, 10);
+ break;
+ }
+ }
+ htmltext = "4305-023.html";
+ }
+ }
+ case "50020_8":
+ {
+ if (hasQuestItems(player, IMPROVED_ROSE_SPIRIT_EXCHANGE_TICKET))
+ {
+ htmltext = "4305-007.html";
+ }
+ else
+ {
+ htmltext = "4305-008.html";
+ }
+ break;
+ }
+ case "50020_9":
+ case "50020_10":
+ case "50020_11":
+ case "50020_12":
+ case "50020_13":
+ case "50020_14":
+ {
+ giveItems(player, SPIRIT_TEST_REPORT, 1);
+ switch (event)
+ {
+ case "50020_9":
+ {
+ giveItems(player, DESELOPH_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_10":
+ {
+ giveItems(player, HYUM_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_11":
+ {
+ giveItems(player, REKANG_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_12":
+ {
+ giveItems(player, LILIAS_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_13":
+ {
+ giveItems(player, LAPHAM_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_14":
+ {
+ giveItems(player, MAFUM_ROSE_NECKLACE, 1);
+ break;
+ }
+ }
+ htmltext = "4305-025.html";
+ }
+ case "50020_15":
+ case "50020_16":
+ case "50020_17":
+ case "50020_18":
+ case "50020_19":
+ case "50020_20":
+ {
+ takeItems(player, IMPROVED_ROSE_SPIRIT_EXCHANGE_TICKET, 1);
+ switch (event)
+ {
+ case "50020_15":
+ {
+ giveItems(player, IMPROVED_DESELOPH_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_16":
+ {
+ giveItems(player, IMPROVED_HYUM_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_17":
+ {
+ giveItems(player, IMPROVED_REKANG_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_18":
+ {
+ giveItems(player, IMPROVED_LILIAS_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_19":
+ {
+ giveItems(player, IMPROVED_LAPHAM_ROSE_NECKLACE, 1);
+ break;
+ }
+ case "50020_20":
+ {
+ giveItems(player, IMPROVED_MAFUM_ROSE_NECKLACE, 1);
+ break;
+ }
+ }
+ htmltext = "4305-026.html";
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onFirstTalk(L2Npc npc, L2PcInstance player)
+ {
+ return "4305-001.html";
+ }
+
+ public static void main(String[] args)
+ {
+
+ new LoversJubilee();
+ }
+}
\ No newline at end of file
diff --git a/dist/game/data/scripts/events/LoversJubilee/config.xml b/dist/game/data/scripts/events/LoversJubilee/config.xml
new file mode 100644
index 0000000..642f240
--- /dev/null
+++ b/dist/game/data/scripts/events/LoversJubilee/config.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<event name="Lovers' Jubilee" active="09 02 2010-23 02 2010" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
+ <spawnlist>
+ <add npc="4305" x="87792" y="-142240" z="-1343" heading="44000" />
+ <add npc="4305" x="87616" y="-140688" z="-1542" heading="16500" />
+ <add npc="4305" x="16622" y="142834" z="-2708" heading="16384" />
+ <add npc="4305" x="18559" y="145920" z="-3075" heading="49152" />
+ <add npc="4305" x="82160" y="148544" z="-3469" heading="0" />
+ <add npc="4305" x="82543" y="149728" z="-3471" heading="49151" />
+ <add npc="4305" x="82173" y="146432" z="-3535" heading="16384" />
+ <add npc="4305" x="-81024" y="149848" z="-3046" heading="0" />
+ <add npc="4305" x="-83169" y="151208" z="-3131" heading="0" />
+ <add npc="4305" x="-13726" y="122416" z="-2990" heading="49151" />
+ <add npc="4305" x="-14192" y="124319" z="-3119" heading="32768" />
+ <add npc="4305" x="-84600" y="244586" z="-3731" heading="57343" />
+ <add npc="4305" x="-84240" y="243255" z="-3731" heading="16000" />
+ <add npc="4305" x="46767" y="51007" z="-2998" heading="8192" />
+ <add npc="4305" x="46070" y="48610" z="-3062" heading="23000" />
+ <add npc="4305" x="9912" y="15307" z="-4577" heading="14000" />
+ <add npc="4305" x="11491" y="17663" z="-4587" heading="46999" />
+ <add npc="4305" x="80304" y="56527" z="-1562" heading="49151" />
+ <add npc="4305" x="82160" y="53255" z="-1498" heading="16384" />
+ <add npc="4305" x="148550" y="26781" z="-2208" heading="32768" />
+ <add npc="4305" x="146224" y="25846" z="-2016" heading="0" />
+ <add npc="4305" x="117354" y="76690" z="-2695" heading="45000" />
+ <add npc="4305" x="116210" y="77084" z="-2728" heading="4096" />
+ <add npc="4305" x="-119420" y="44881" z="368" heading="25500" />
+ <add npc="4305" x="-117265" y="46367" z="367" heading="16384" />
+ <add npc="4305" x="111871" y="219198" z="-3545" heading="49151" />
+ <add npc="4305" x="108303" y="221815" z="-3600" heading="0" />
+ <add npc="4305" x="-44687" y="-113169" z="-241" heading="16384" />
+ <add npc="4305" x="115067" y="-177823" z="-882" heading="0" />
+ <add npc="4305" x="117047" y="-182670" z="-1530" heading="24576" />
+ <add npc="4305" x="149022" y="-56015" z="-2783" heading="45055" />
+ <add npc="4305" x="147471" y="-56834" z="-2782" heading="0" />
+ <add npc="4305" x="42896" y="-48479" z="-798" heading="16384" />
+ <add npc="4305" x="44694" y="-50684" z="-799" heading="22000" />
+ </spawnlist>
+ <messages>
+ <add type="onEnd" text="Lovers' Jubilee: Event end!" />
+ <add type="onEnter" text="Lovers' Jubilee: Event ongoing!" />
+ </messages>
+</event>
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment