summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/commands/event.txt11
-rw-r--r--npc/functions/seasons.txt5
2 files changed, 15 insertions, 1 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
diff --git a/npc/functions/seasons.txt b/npc/functions/seasons.txt
index 030581417..61b7b86a8 100644
--- a/npc/functions/seasons.txt
+++ b/npc/functions/seasons.txt
@@ -153,7 +153,7 @@ OnSummerEnd:
OnAutumnStart:
// Ched's Quest Winner
- .@nb = query_sql("SELECT c.name FROM `quest` AS i, `char` AS c WHERE i.quest_id=305 AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 1", .@name$);
+ .@nb = query_sql("SELECT c.name FROM `quest` AS i, `char` AS c WHERE i.quest_id="+SQuest_Ched+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 1", .@name$);
$@AUTUMN_VICTOR$=.@name$[0];
// Fancy trees
@@ -176,6 +176,9 @@ OnAutumnStart:
end;
OnAutumnEnd:
+ // Ched's rewards can't be claimed anymore. Delete that from all players.
+ DelQuestFromEveryPlayer(SQuest_Ched);
+
removemapmask "012-1", MASK_AUTUMN;
delmonsterdrop(FafiDragon, PumpkandySeed);
delmonsterdrop(Mouboo, PumpkandySeed);