summaryrefslogtreecommitdiff
path: root/npc/functions
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/functions
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/functions')
-rw-r--r--npc/functions/seasons.txt5
1 files changed, 4 insertions, 1 deletions
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);