summaryrefslogtreecommitdiff
path: root/npc/commands/event.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands/event.txt')
-rw-r--r--npc/commands/event.txt49
1 files changed, 48 insertions, 1 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index 46b9737ae..c3d21b329 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -1,3 +1,19 @@
+// Delete item ID on inventories, storages, guild storages and carts. Also affects mails.
+// WARNING, irreversible and dangerous!
+// DelItemFromEveryPlayer( ID )
+function script DelItemFromEveryPlayer {
+ if (getarg(0, -1) < 0)
+ return;
+
+ query_sql("DELETE FROM `inventory` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `cart_inventory` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `storage` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `guild_storage` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `rodex_items` WHERE `nameid`="+getarg(0));
+ query_sql("DELETE FROM `auction` WHERE `nameid`="+getarg(0));
+ return;
+}
+
function script GlobalEventMenu {
function rateManagement {
@@ -28,6 +44,37 @@ function script GlobalEventMenu {
return;
}
+ function sEaster {
+ // Delete all GoldenEasteregg and SilverEasteregg from every player
+ // WARNING, possibly dangerous.
+ DelItemFromEveryPlayer(GoldenEasteregg);
+ DelItemFromEveryPlayer(GoldenEasteregg);
+
+ // Enable event
+ set $EVENT$, "Easter";
+ logmes "Enabled EASTER event.", LOGMES_ATCOMMAND;
+ return;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function seasonManagement {
clear;
mes l("Current event: @@", $EVENT$);
@@ -39,7 +86,7 @@ function script GlobalEventMenu {
switch (@menu) {
case 1: set $EVENT$, ""; logmes "Disabled events.", LOGMES_ATCOMMAND;
break;
- case 2: set $EVENT$, "Easter"; logmes "Enabled EASTER event.", LOGMES_ATCOMMAND; break;
+ case 2: sEaster(); break;
case 3:
set $EVENT$, "Worker Day";
logmes "Enabled WORKERS DAY event.", LOGMES_ATCOMMAND;