summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/event.txt3
-rw-r--r--npc/functions/aurora.txt14
2 files changed, 17 insertions, 0 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index 0d9d161bf..f7a99bdda 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -69,6 +69,9 @@ function script sClear {
kamibroadcast("Regnum's Blessing is over.");
}
+ // Hand Aurora Event Rewards
+ callfunc("FYRewardEvent");
+
// Simpler events
$PATRICK_DAYCTRL=0;
$PATRICK_DAYMAX=0;
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index 217dfce8e..7ebd4c616 100644
--- a/npc/functions/aurora.txt
+++ b/npc/functions/aurora.txt
@@ -170,3 +170,17 @@ function script FYStopEvent {
return;
}
+// Handle the ending of Aurora Events
+function script FYRewardEvent {
+ setarray .@av$, "Expo", "Fishing";
+ if (array_find(.@av$, $EVENT$) >= 0) {
+ debugmes("Rewards are due");
+ // This code absolutely can't fail:
+ .@nb = query_sql("SELECT c.name, i.count2, c.char_id FROM `quest` AS i, `char` AS c WHERE i.quest_id="+Q_AuroraEvent+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 10", $@aurora_name$, $@aurora_value, $@aurora_charid);
+ // rodex_sendmail($@aurora_charid, "Aurora Events", "Event Reward!", "Message", gp, item, $@aurora_value);
+ // Destroy the quest
+ DelQuestFromEveryPlayer(Q_AuroraEvent);
+ }
+ return;
+}
+