summaryrefslogtreecommitdiff
path: root/npc/commands/event.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-22 21:45:19 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-22 21:45:19 -0200
commit953bb7a4ed1a224501318eb35fa4ff6e02a096d0 (patch)
tree03528d629968b01fea07f5827119b2754ef28cd0 /npc/commands/event.txt
parent49aa38ec122789a2e62086a79524bf587be4d0c2 (diff)
downloadserverdata-953bb7a4ed1a224501318eb35fa4ff6e02a096d0.tar.gz
serverdata-953bb7a4ed1a224501318eb35fa4ff6e02a096d0.tar.bz2
serverdata-953bb7a4ed1a224501318eb35fa4ff6e02a096d0.tar.xz
serverdata-953bb7a4ed1a224501318eb35fa4ff6e02a096d0.zip
When autumn quest is over, clear all Ched's completions/incompletions from
the whole table. Even without this, the game should do just fine, but this prevents some spam on quest_db. Security-wise, dangerous function.
Diffstat (limited to 'npc/commands/event.txt')
-rw-r--r--npc/commands/event.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index 6ee100cfe..82862e01a 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -26,6 +26,17 @@ function script DelAccRegFromEveryPlayer {
return;
}
+// Delete a quest entry from all players. This includes all counters. Use with caution.
+// WARNING, irreversible and dangerous!
+// DelQuestFromEveryPlayer( ID )
+function script DelQuestFromEveryPlayer {
+ if (getarg(0, -1) < 0)
+ return;
+
+ query_sql("DELETE FROM `quest` WHERE `quest_id`="+getarg(0));
+ return;
+}
+
// Christmas cannot be on GlobalEventMenu because it affects seasons system
function script sChristmas {
// Add Christmas drops