Skip to content

Instantly share code, notes, and snippets.

@Williams-BR
Created October 22, 2021 17:46
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 Williams-BR/fc23eafd4815db6ef4d280a0ee611a2a to your computer and use it in GitHub Desktop.
Save Williams-BR/fc23eafd4815db6ef4d280a0ee611a2a to your computer and use it in GitHub Desktop.
diff --git a/aCis_datapack/data/xml/scripts.xml b/aCis_datapack/data/xml/scripts.xml
index 0a94de0..34e0d82 100644
--- a/aCis_datapack/data/xml/scripts.xml
+++ b/aCis_datapack/data/xml/scripts.xml
@@ -395,6 +395,7 @@
<!-- <script path="script.event.HeavyMedal" schedule="YEARLY_WEEK" start="MON-6 18:00:00" end="SUN-8 18:00:00"/> -->
<!-- <script path="script.event.TheValentineEvent"/> -->
<script path="script.event.MasterOfEnchanting" schedule="WEEKLY" start="SUN 14:32:00" end="MON 00:00:00"/>
+ <script path="script.event.CrazyRate" schedule="WEEKLY" start="FRI 14:33:00" end="SAT 23:59:00"/>
<!-- Feature -->
diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/scripting/script/event/CrazyRate.java b/aCis_gameserver/java/net/sf/l2j/gameserver/scripting/script/event/CrazyRate.java
new file mode 100644
index 0000000..adfdad2
--- /dev/null
+++ b/aCis_gameserver/java/net/sf/l2j/gameserver/scripting/script/event/CrazyRate.java
@@ -0,0 +1,41 @@
+package net.sf.l2j.gameserver.scripting.script.event;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.model.World;
+import net.sf.l2j.gameserver.scripting.ScheduledQuest;
+
+public class CrazyRate extends ScheduledQuest
+{
+ private int _multipler = 2;
+
+ public CrazyRate()
+ {
+ super(-1, "event");
+ }
+
+ @Override
+ protected void onStart()
+ {
+ LOGGER.info("Crazy Rate: Event ongoing!");
+ World.announceToOnlinePlayers("Crazy rate started together let's level up multiplied "+_multipler+"x Rates.", true);
+
+ Config.RATE_XP = _multipler * Config.RATE_XP;
+ Config.RATE_SP = _multipler * Config.RATE_SP;
+ Config.RATE_DROP_ITEMS = _multipler * Config.RATE_DROP_ITEMS;
+ Config.RATE_DROP_ITEMS_BY_RAID = _multipler * Config.RATE_DROP_ITEMS_BY_RAID;
+ Config.RATE_DROP_ADENA = _multipler * Config.RATE_DROP_ADENA;
+ }
+
+ @Override
+ protected void onEnd()
+ {
+ LOGGER.info("Crazy Rate: Event end!");
+ World.announceToOnlinePlayers("Crazy Rate came to an end rates returned to normal!");
+
+ Config.RATE_XP = Config.RATE_XP / _multipler;
+ Config.RATE_SP = Config.RATE_SP / _multipler;
+ Config.RATE_DROP_ITEMS = Config.RATE_DROP_ITEMS / _multipler;
+ Config.RATE_DROP_ITEMS_BY_RAID = Config.RATE_DROP_ITEMS_BY_RAID / _multipler;
+ Config.RATE_DROP_ADENA = Config.RATE_DROP_ADENA / _multipler;
+ }
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment